summaryrefslogtreecommitdiffstats
path: root/src/styles/qcompactstyle.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-08-05 01:01:34 -0500
committerTimothy Pearson <[email protected]>2012-08-05 01:01:34 -0500
commitc73edd8f63289c619c20a8e5d031a24d870c62ee (patch)
tree08cbff3bdbb8c46213f6cf416d5f027f58d4c5f5 /src/styles/qcompactstyle.cpp
parentfe7969ef886d7287fa959929ddd33fbad8407884 (diff)
downloadtqt3-c73edd8f63289c619c20a8e5d031a24d870c62ee.tar.gz
tqt3-c73edd8f63289c619c20a8e5d031a24d870c62ee.zip
Automated update from Qt3
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;
}
}