diff options
-rw-r--r-- | style/qtc_kstyle.cpp | 11 | ||||
-rw-r--r-- | style/qtc_kstyle.h | 4 | ||||
-rw-r--r-- | style/qtcurve.cpp | 4 | ||||
-rw-r--r-- | style/qtcurve.h | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/style/qtc_kstyle.cpp b/style/qtc_kstyle.cpp index 7d73476..d29451b 100644 --- a/style/qtc_kstyle.cpp +++ b/style/qtc_kstyle.cpp @@ -154,10 +154,11 @@ void TQtCKStyle::unPolish( TQStyleControlElementData ceData, ControlElementFlags // Style changes (should) always re-polish popups. -void TQtCKStyle::polishPopupMenu( TQPopupMenu* p ) +void TQtCKStyle::polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) { - if (!p->testWState( WState_Polished )) - p->setCheckable(true); + if ( !(ceData.windowState & WState_Polished ) ) { + widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable); + } } @@ -363,7 +364,7 @@ void TQtCKStyle::drawKStylePrimitive( KStylePrimitive kpe, } -int TQtCKStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) const +int TQtCKStyle::kPixelMetric( KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const { int value; switch(kpm) @@ -1130,7 +1131,7 @@ void TQtCKStyle::drawComplexControl( ComplexControl control, } // Draw all the branches... - static int thickness = kPixelMetric( KPM_ListViewBranchThickness ); + static int thickness = kPixelMetric( KPM_ListViewBranchThickness, ceData, elementFlags ); int line; // index into dotlines TQRect branchrect; TQStyle::StyleFlags branchflags; diff --git a/style/qtc_kstyle.h b/style/qtc_kstyle.h index 855558e..63fa4fc 100644 --- a/style/qtc_kstyle.h +++ b/style/qtc_kstyle.h @@ -249,13 +249,13 @@ class TQtCKStyle: public TQCommonStyle KPM_ListViewBranchThickness = 0x00000100 }; - int kPixelMetric( KStylePixelMetric kpm, const TQWidget* widget = 0 ) const; + int kPixelMetric( KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const; // --------------------------------------------------------------------------- void polish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * ); void unPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * ); - void polishPopupMenu( TQPopupMenu* ); + void polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ); void drawPrimitive( PrimitiveElement pe, TQPainter* p, diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp index c56a99e..8314397 100644 --- a/style/qtcurve.cpp +++ b/style/qtcurve.cpp @@ -6905,14 +6905,14 @@ int TQtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceD } } -int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const +int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const { switch(kpm) { case KPM_MenuItemSeparatorHeight: return 2; default: - return BASE_STYLE::kPixelMetric(kpm, widget); + return BASE_STYLE::kPixelMetric(kpm, ceData, elementFlags, widget); } } diff --git a/style/qtcurve.h b/style/qtcurve.h index a4debc1..c3492a2 100644 --- a/style/qtcurve.h +++ b/style/qtcurve.h @@ -175,7 +175,7 @@ class TQtCurveStyle : public BASE_STYLE TQRect querySubControlMetrics(TQ_ComplexControl, TQStyleControlElementData ceData, ControlElementFlags elementFlags, SubControl, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; int pixelMetric(PixelMetric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget= 0) const; - int kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const; + int kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const; TQSize sizeFromContents(ContentsType, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQSize &, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; int styleHint(StyleHint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default, |