RSIP_OnMouseClick as Oxygen style does

This commit is contained in:
Marco Martin 2011-10-03 17:26:12 +02:00
parent 28ab3be499
commit ef069ab402
2 changed files with 11 additions and 0 deletions

View File

@ -314,6 +314,16 @@ QRect Style::subControlRect(ComplexControl control, const QStyleOptionComplex *o
}
}
int Style::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const
{
switch (hint) {
case SH_RequestSoftwareInputPanel:
return RSIP_OnMouseClick;
default:
return QCommonStyle::styleHint(hint, option, widget, returnData);
}
}
int Style::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const
{
if (Theme::defaultTheme()->useNativeWidgetStyle()) {

View File

@ -45,6 +45,7 @@ public:
~Style();
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0) const;
int styleHint(StyleHint hint, const QStyleOption *option=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const;
protected:
void drawComplexControl(ComplexControl control,