summaryrefslogtreecommitdiffstats
path: root/src/styles/qcompactstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/styles/qcompactstyle.cpp')
-rw-r--r--src/styles/qcompactstyle.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/styles/qcompactstyle.cpp b/src/styles/qcompactstyle.cpp
index 7dc0ab37c..97f6aca86 100644
--- a/src/styles/qcompactstyle.cpp
+++ b/src/styles/qcompactstyle.cpp
@@ -55,7 +55,7 @@ TQCompactStyle::TQCompactStyle()
}
/*! \reimp */
-int TQCompactStyle::pixelMetric( PixelMetric metric, const TQWidget *widget )
+int TQCompactStyle::pixelMetric( PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget )
{
int ret;
switch ( metric ) {
@@ -68,7 +68,7 @@ int TQCompactStyle::pixelMetric( PixelMetric metric, const TQWidget *widget )
ret = -1;
break;
default:
- ret = TQWindowsStyle::pixelMetric( metric, widget );
+ ret = TQWindowsStyle::pixelMetric( metric, ceData, elementFlags, widget );
break;
}
return ret;
@@ -143,16 +143,15 @@ void drawPopupMenuItem( TQPainter* p, bool checkable,
}
/*! \reimp */
-void TQCompactStyle::drawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r,
- const TQColorGroup &g, SFlags flags, const TQStyleOption& opt )
+void TQCompactStyle::drawControl( ControlElement element, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r,
+ const TQColorGroup &g, SFlags flags, const TQStyleOption& opt, const TQWidget *widget )
{
switch ( element ) {
case CE_PopupMenuItem:
{
- if (! widget || opt.isDefault())
+ if (! (elementFlags & CEF_HasWidget) || opt.isDefault())
break;
- const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
TQMenuItem *mi = opt.menuItem();
if ( !mi )
break;
@@ -160,7 +159,7 @@ void TQCompactStyle::drawControl( ControlElement element, TQPainter *p, const TQ
int tab = opt.tabWidth();
int maxpmw = opt.maxIconWidth();
bool dis = !(flags & Style_Enabled);
- bool checkable = popupmenu->isCheckable();
+ bool checkable = (elementFlags & CEF_IsCheckable);
bool act = flags & Style_Active;
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -313,7 +312,7 @@ void TQCompactStyle::drawControl( ControlElement element, TQPainter *p, const TQ
break;
default:
- TQWindowsStyle::drawControl( element, p, widget, r, g, flags, opt );
+ TQWindowsStyle::drawControl( element, p, ceData, elementFlags, r, g, flags, opt, widget );
break;
}
}