Style API update

pull/1/head
Timothy Pearson 12 years ago
parent de6fd1852e
commit 9d466f4825

@ -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;

@ -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,

@ -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);
}
}

@ -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,

Loading…
Cancel
Save