|
|
@ -965,13 +965,13 @@ void LipstikStyle::renderPanel(TQPainter *p,
|
|
|
|
p->setPen(g.mid());
|
|
|
|
p->setPen(g.mid());
|
|
|
|
p->drawConvexPolygon(TQPointArray(4, corners));
|
|
|
|
p->drawConvexPolygon(TQPointArray(4, corners));
|
|
|
|
p->setPen(g.mid());
|
|
|
|
p->setPen(g.mid());
|
|
|
|
p->drawPolyline(TQPointArray(4, corners), 0, 3);
|
|
|
|
p->tqdrawPolyline(TQPointArray(4, corners), 0, 3);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
|
|
|
|
const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
|
|
|
|
p->setPen(g.background().dark());
|
|
|
|
p->setPen(g.background().dark());
|
|
|
|
p->drawPolygon(TQPointArray(4, corners));
|
|
|
|
p->drawPolygon(TQPointArray(4, corners));
|
|
|
|
p->setPen(g.background().light());
|
|
|
|
p->setPen(g.background().light());
|
|
|
|
p->drawPolyline(TQPointArray(4, corners), 0, 3);
|
|
|
|
p->tqdrawPolyline(TQPointArray(4, corners), 0, 3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
renderContour(p, r, g.background(), getColor(g, PanelContour) );
|
|
|
|
renderContour(p, r, g.background(), getColor(g, PanelContour) );
|
|
|
@ -1236,7 +1236,7 @@ void LipstikStyle::renderTab(TQPainter *p,
|
|
|
|
// fake the panel border edge for tabs which are aligned left-most
|
|
|
|
// fake the panel border edge for tabs which are aligned left-most
|
|
|
|
// (i.e. only if there is no widget in the corner of the tabwidget!)
|
|
|
|
// (i.e. only if there is no widget in the corner of the tabwidget!)
|
|
|
|
if(isFirst&&!reverseLayout&&!cornerWidget)
|
|
|
|
if(isFirst&&!reverseLayout&&!cornerWidget)
|
|
|
|
// normal layout
|
|
|
|
// normal tqlayout
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!bottom) {
|
|
|
|
if (!bottom) {
|
|
|
|
p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
|
|
|
|
p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
|
|
|
@ -1258,7 +1258,7 @@ void LipstikStyle::renderTab(TQPainter *p,
|
|
|
|
p->drawPoint(Rb.x()+1, Rb.bottom() );
|
|
|
|
p->drawPoint(Rb.x()+1, Rb.bottom() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if(isFirst&&reverseLayout&&!cornerWidget)
|
|
|
|
} else if(isFirst&&reverseLayout&&!cornerWidget)
|
|
|
|
// reverse layout
|
|
|
|
// reverse tqlayout
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!bottom) {
|
|
|
|
if (!bottom) {
|
|
|
|
p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
|
|
|
|
p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
|
|
|
@ -2407,11 +2407,11 @@ void LipstikStyle::tqdrawPrimitive(PrimitiveElement pe,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const TQWMatrix oldMatrix( p->worldMatrix() );
|
|
|
|
const TQWMatrix oldMatrix( p->tqworldMatrix() );
|
|
|
|
|
|
|
|
|
|
|
|
if (flags & Style_Down) {
|
|
|
|
if (flags & Style_Down) {
|
|
|
|
p->translate(pixelMetric(PM_ButtonShiftHorizontal),
|
|
|
|
p->translate(tqpixelMetric(PM_ButtonShiftHorizontal),
|
|
|
|
pixelMetric(PM_ButtonShiftVertical));
|
|
|
|
tqpixelMetric(PM_ButtonShiftVertical));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
a.translate((r.x()+r.width()/2), (r.y()+r.height()/2));
|
|
|
|
a.translate((r.x()+r.width()/2), (r.y()+r.height()/2));
|
|
|
@ -2452,7 +2452,7 @@ void LipstikStyle::tqdrawPrimitive(PrimitiveElement pe,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
void LipstikStyle::tqdrawControl(ControlElement element,
|
|
|
|
TQPainter *p,
|
|
|
|
TQPainter *p,
|
|
|
|
const TQWidget *widget,
|
|
|
|
const TQWidget *widget,
|
|
|
|
const TQRect &r,
|
|
|
|
const TQRect &r,
|
|
|
@ -2614,7 +2614,7 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
if(cw)
|
|
|
|
if(cw)
|
|
|
|
cornerWidget = true;
|
|
|
|
cornerWidget = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TQTabBar::Shape tbs = tb->shape();
|
|
|
|
TQTabBar::Shape tbs = tb->tqshape();
|
|
|
|
bool selected = false;
|
|
|
|
bool selected = false;
|
|
|
|
if (flags & Style_Selected) selected = true;
|
|
|
|
if (flags & Style_Selected) selected = true;
|
|
|
|
TabPosition pos;
|
|
|
|
TabPosition pos;
|
|
|
@ -2650,7 +2650,7 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget);
|
|
|
|
renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
KStyle::drawControl(element, p, widget, r, cg, flags, opt);
|
|
|
|
KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -2693,15 +2693,15 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
// Shift button contents if pushed.
|
|
|
|
// Shift button contents if pushed.
|
|
|
|
if ( active )
|
|
|
|
if ( active )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
x += pixelMetric(PM_ButtonShiftHorizontal, widget);
|
|
|
|
x += tqpixelMetric(PM_ButtonShiftHorizontal, widget);
|
|
|
|
y += pixelMetric(PM_ButtonShiftVertical, widget);
|
|
|
|
y += tqpixelMetric(PM_ButtonShiftVertical, widget);
|
|
|
|
flags |= Style_Sunken;
|
|
|
|
flags |= Style_Sunken;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Does the button have a popup menu?
|
|
|
|
// Does the button have a popup menu?
|
|
|
|
if ( button->isMenuButton() )
|
|
|
|
if ( button->isMenuButton() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
|
|
|
|
int dx = tqpixelMetric( PM_MenuButtonIndicator, widget );
|
|
|
|
if ( button->iconSet() && !button->iconSet()->isNull() &&
|
|
|
|
if ( button->iconSet() && !button->iconSet()->isNull() &&
|
|
|
|
(dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w )
|
|
|
|
(dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2710,7 +2710,7 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
p->setPen(cg.buttonText());
|
|
|
|
p->setPen(cg.buttonText());
|
|
|
|
tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
|
|
|
|
tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
|
|
|
|
cg, flags, opt );
|
|
|
|
cg, flags, opt );
|
|
|
|
w -= dx;
|
|
|
|
w -= dx;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2736,7 +2736,7 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap );
|
|
|
|
p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap );
|
|
|
|
|
|
|
|
|
|
|
|
if (cornArrow) //Draw over the icon
|
|
|
|
if (cornArrow) //Draw over the icon
|
|
|
|
tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
|
|
|
|
tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
|
|
|
|
cg, flags, opt );
|
|
|
|
cg, flags, opt );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2746,14 +2746,14 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Make the label indicate if the button is a default button or not
|
|
|
|
// Make the label indicate if the button is a default button or not
|
|
|
|
drawItem( p, TQRect(x, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
|
|
|
|
drawItem( p, TQRect(x, y, w, h), AlignCenter|ShowPrefix, button->tqcolorGroup(),
|
|
|
|
button->isEnabled(), button->pixmap(), button->text(), -1,
|
|
|
|
button->isEnabled(), button->pixmap(), button->text(), -1,
|
|
|
|
&button->colorGroup().buttonText() );
|
|
|
|
&button->tqcolorGroup().buttonText() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( flags & Style_HasFocus )
|
|
|
|
if ( flags & Style_HasFocus )
|
|
|
|
tqdrawPrimitive( PE_FocusRect, p,
|
|
|
|
tqdrawPrimitive( PE_FocusRect, p,
|
|
|
|
visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
|
|
|
|
tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
|
|
|
|
cg, flags );
|
|
|
|
cg, flags );
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2837,7 +2837,7 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
bool enabled = mi->isEnabled();
|
|
|
|
bool enabled = mi->isEnabled();
|
|
|
|
bool checkable = popupmenu->isCheckable();
|
|
|
|
bool checkable = popupmenu->isCheckable();
|
|
|
|
bool active = flags & Style_Active;
|
|
|
|
bool active = flags & Style_Active;
|
|
|
|
bool etchtext = styleHint( SH_EtchDisabledText );
|
|
|
|
bool etchtext = tqstyleHint( SH_EtchDisabledText );
|
|
|
|
bool reverse = TQApplication::reverseLayout();
|
|
|
|
bool reverse = TQApplication::reverseLayout();
|
|
|
|
|
|
|
|
|
|
|
|
if ( checkable )
|
|
|
|
if ( checkable )
|
|
|
@ -2924,7 +2924,7 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQRect cr = visualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
|
|
|
|
TQRect cr = tqvisualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
|
|
|
|
|
|
|
|
|
|
|
|
// Do we have an icon?
|
|
|
|
// Do we have an icon?
|
|
|
|
if ( mi->iconSet() ) {
|
|
|
|
if ( mi->iconSet() ) {
|
|
|
@ -3077,8 +3077,8 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
// Does the menu item have a submenu?
|
|
|
|
// Does the menu item have a submenu?
|
|
|
|
if ( mi->popup() ) {
|
|
|
|
if ( mi->popup() ) {
|
|
|
|
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
|
|
|
|
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
|
|
|
|
int dim = pixelMetric(PM_MenuButtonIndicator) - 1;
|
|
|
|
int dim = tqpixelMetric(PM_MenuButtonIndicator) - 1;
|
|
|
|
TQRect vr = visualRect( TQRect( r.x() + r.width() - 5 - 1 - dim,
|
|
|
|
TQRect vr = tqvisualRect( TQRect( r.x() + r.width() - 5 - 1 - dim,
|
|
|
|
r.y() + r.height() / 2 - dim / 2, dim, dim), r );
|
|
|
|
r.y() + r.height() / 2 - dim / 2, dim, dim), r );
|
|
|
|
|
|
|
|
|
|
|
|
// Draw an arrow at the far end of the menu item
|
|
|
|
// Draw an arrow at the far end of the menu item
|
|
|
@ -3124,11 +3124,11 @@ void LipstikStyle::drawControl(ControlElement element,
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
KStyle::drawControl(element, p, widget, r, cg, flags, opt);
|
|
|
|
KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LipstikStyle::drawControlMask(ControlElement element,
|
|
|
|
void LipstikStyle::tqdrawControlMask(ControlElement element,
|
|
|
|
TQPainter *p,
|
|
|
|
TQPainter *p,
|
|
|
|
const TQWidget *w,
|
|
|
|
const TQWidget *w,
|
|
|
|
const TQRect &r,
|
|
|
|
const TQRect &r,
|
|
|
@ -3143,12 +3143,12 @@ void LipstikStyle::drawControlMask(ControlElement element,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
default: {
|
|
|
|
default: {
|
|
|
|
KStyle::drawControlMask (element, p, w, r, opt);
|
|
|
|
KStyle::tqdrawControlMask (element, p, w, r, opt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LipstikStyle::drawComplexControlMask(ComplexControl c,
|
|
|
|
void LipstikStyle::tqdrawComplexControlMask(ComplexControl c,
|
|
|
|
TQPainter *p,
|
|
|
|
TQPainter *p,
|
|
|
|
const TQWidget *w,
|
|
|
|
const TQWidget *w,
|
|
|
|
const TQRect &r,
|
|
|
|
const TQRect &r,
|
|
|
@ -3164,12 +3164,12 @@ void LipstikStyle::drawComplexControlMask(ComplexControl c,
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
default: {
|
|
|
|
KStyle::drawComplexControlMask (c, p, w, r, o);
|
|
|
|
KStyle::tqdrawComplexControlMask (c, p, w, r, o);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LipstikStyle::drawComplexControl(ComplexControl control,
|
|
|
|
void LipstikStyle::tqdrawComplexControl(ComplexControl control,
|
|
|
|
TQPainter *p,
|
|
|
|
TQPainter *p,
|
|
|
|
const TQWidget *widget,
|
|
|
|
const TQWidget *widget,
|
|
|
|
const TQRect &r,
|
|
|
|
const TQRect &r,
|
|
|
@ -3596,7 +3596,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
KStyle::drawComplexControl(control, p, widget,
|
|
|
|
KStyle::tqdrawComplexControl(control, p, widget,
|
|
|
|
r, cg, flags, controls,
|
|
|
|
r, cg, flags, controls,
|
|
|
|
active, opt);
|
|
|
|
active, opt);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -3701,15 +3701,15 @@ TQRect LipstikStyle::querySubControlMetrics(ComplexControl control,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int LipstikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
|
|
|
|
int LipstikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
switch(m) {
|
|
|
|
switch(m) {
|
|
|
|
// TABS
|
|
|
|
// TABS
|
|
|
|
// ----
|
|
|
|
// ----
|
|
|
|
case PM_TabBarTabVSpace: {
|
|
|
|
case PM_TabBarTabVSpace: {
|
|
|
|
const TQTabBar * tb = (const TQTabBar *) widget;
|
|
|
|
const TQTabBar * tb = (const TQTabBar *) widget;
|
|
|
|
if (tb->shape() == TQTabBar::RoundedAbove ||
|
|
|
|
if (tb->tqshape() == TQTabBar::RoundedAbove ||
|
|
|
|
tb->shape() == TQTabBar::RoundedBelow)
|
|
|
|
tb->tqshape() == TQTabBar::RoundedBelow)
|
|
|
|
return 12;
|
|
|
|
return 12;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return 4;
|
|
|
|
return 4;
|
|
|
@ -3813,7 +3813,7 @@ int LipstikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
return KStyle::pixelMetric(m, widget);
|
|
|
|
return KStyle::tqpixelMetric(m, widget);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3835,8 +3835,8 @@ TQSize LipstikStyle::tqsizeFromContents(ContentsType t,
|
|
|
|
bool checkable = popup->isCheckable();
|
|
|
|
bool checkable = popup->isCheckable();
|
|
|
|
|
|
|
|
|
|
|
|
if (mi->custom()) {
|
|
|
|
if (mi->custom()) {
|
|
|
|
w = mi->custom()->sizeHint().width();
|
|
|
|
w = mi->custom()->tqsizeHint().width();
|
|
|
|
h = mi->custom()->sizeHint().height();
|
|
|
|
h = mi->custom()->tqsizeHint().height();
|
|
|
|
if (!mi->custom()->fullSpan() )
|
|
|
|
if (!mi->custom()->fullSpan() )
|
|
|
|
h += 4;
|
|
|
|
h += 4;
|
|
|
|
} else if (mi->widget()) {
|
|
|
|
} else if (mi->widget()) {
|
|
|
@ -3882,8 +3882,8 @@ TQSize LipstikStyle::tqsizeFromContents(ContentsType t,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const TQPushButton* btn = static_cast<const TQPushButton*>(widget);
|
|
|
|
const TQPushButton* btn = static_cast<const TQPushButton*>(widget);
|
|
|
|
|
|
|
|
|
|
|
|
int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget);
|
|
|
|
int w = s.width() + 2 * tqpixelMetric(PM_ButtonMargin, widget);
|
|
|
|
int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget);
|
|
|
|
int h = s.height() + 2 * tqpixelMetric(PM_ButtonMargin, widget);
|
|
|
|
if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize(w, h);
|
|
|
|
if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize(w, h);
|
|
|
|
|
|
|
|
|
|
|
|
return TQSize( w+25, h+5 );
|
|
|
|
return TQSize( w+25, h+5 );
|
|
|
@ -3904,7 +3904,7 @@ TQSize LipstikStyle::tqsizeFromContents(ContentsType t,
|
|
|
|
return KStyle::tqsizeFromContents (t, widget, s, opt);
|
|
|
|
return KStyle::tqsizeFromContents (t, widget, s, opt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int LipstikStyle::styleHint( StyleHint stylehint,
|
|
|
|
int LipstikStyle::tqstyleHint( StyleHint stylehint,
|
|
|
|
const TQWidget *widget,
|
|
|
|
const TQWidget *widget,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
TQStyleHintReturn* returnData ) const
|
|
|
|
TQStyleHintReturn* returnData ) const
|
|
|
@ -3914,7 +3914,7 @@ int LipstikStyle::styleHint( StyleHint stylehint,
|
|
|
|
return 96; // Motif-like delay...
|
|
|
|
return 96; // Motif-like delay...
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
return KStyle::styleHint(stylehint, widget, option, returnData);
|
|
|
|
return KStyle::tqstyleHint(stylehint, widget, option, returnData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3934,14 +3934,14 @@ bool LipstikStyle::eventFilter(TQObject *obj, TQEvent *ev)
|
|
|
|
TQWidget* spinbox = widget->parentWidget();
|
|
|
|
TQWidget* spinbox = widget->parentWidget();
|
|
|
|
if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
|
|
|
|
if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
spinbox->repaint(false);
|
|
|
|
spinbox->tqrepaint(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
|
|
|
|
if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
widget->repaint(false);
|
|
|
|
widget->tqrepaint(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3957,13 +3957,13 @@ bool LipstikStyle::eventFilter(TQObject *obj, TQEvent *ev)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQWidget* button = TQT_TQWIDGET(obj);
|
|
|
|
TQWidget* button = TQT_TQWIDGET(obj);
|
|
|
|
hoverWidget = button;
|
|
|
|
hoverWidget = button;
|
|
|
|
button->repaint(false);
|
|
|
|
button->tqrepaint(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((ev->type() == TQEvent::Leave) && (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(hoverWidget)) )
|
|
|
|
else if ((ev->type() == TQEvent::Leave) && (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(hoverWidget)) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQWidget* button = TQT_TQWIDGET(obj);
|
|
|
|
TQWidget* button = TQT_TQWIDGET(obj);
|
|
|
|
hoverWidget = 0;
|
|
|
|
hoverWidget = 0;
|
|
|
|
button->repaint(false);
|
|
|
|
button->tqrepaint(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3973,7 +3973,7 @@ bool LipstikStyle::eventFilter(TQObject *obj, TQEvent *ev)
|
|
|
|
TQWidget* tabbar = TQT_TQWIDGET(obj);
|
|
|
|
TQWidget* tabbar = TQT_TQWIDGET(obj);
|
|
|
|
hoverWidget = tabbar;
|
|
|
|
hoverWidget = tabbar;
|
|
|
|
hoverTab = 0;
|
|
|
|
hoverTab = 0;
|
|
|
|
tabbar->repaint(false);
|
|
|
|
tabbar->tqrepaint(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (ev->type() == TQEvent::MouseMove)
|
|
|
|
else if (ev->type() == TQEvent::MouseMove)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -3984,15 +3984,15 @@ bool LipstikStyle::eventFilter(TQObject *obj, TQEvent *ev)
|
|
|
|
// avoid unnecessary repaints (which otherwise would occour on every
|
|
|
|
// avoid unnecessary repaints (which otherwise would occour on every
|
|
|
|
// MouseMove event causing high cpu load).
|
|
|
|
// MouseMove event causing high cpu load).
|
|
|
|
|
|
|
|
|
|
|
|
bool repaint = true;
|
|
|
|
bool tqrepaint = true;
|
|
|
|
|
|
|
|
|
|
|
|
TQTab *tab = tabbar->selectTab(me->pos() );
|
|
|
|
TQTab *tab = tabbar->selectTab(me->pos() );
|
|
|
|
if (hoverTab == tab)
|
|
|
|
if (hoverTab == tab)
|
|
|
|
repaint = false;
|
|
|
|
tqrepaint = false;
|
|
|
|
hoverTab = tab;
|
|
|
|
hoverTab = tab;
|
|
|
|
|
|
|
|
|
|
|
|
if (repaint)
|
|
|
|
if (tqrepaint)
|
|
|
|
tabbar->repaint(false);
|
|
|
|
tabbar->tqrepaint(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (ev->type() == TQEvent::Leave)
|
|
|
|
else if (ev->type() == TQEvent::Leave)
|
|
|
@ -4000,7 +4000,7 @@ bool LipstikStyle::eventFilter(TQObject *obj, TQEvent *ev)
|
|
|
|
TQWidget* tabbar = TQT_TQWIDGET(obj);
|
|
|
|
TQWidget* tabbar = TQT_TQWIDGET(obj);
|
|
|
|
hoverWidget = 0;
|
|
|
|
hoverWidget = 0;
|
|
|
|
hoverTab = 0;
|
|
|
|
hoverTab = 0;
|
|
|
|
tabbar->repaint(false);
|
|
|
|
tabbar->tqrepaint(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|