* BUG: Found a workaround for forcing Oxygen style to draw small push buttons correctly.

[GB.QT5]
* BUG: Found a workaround for forcing Oxygen style to draw small push buttons correctly.


git-svn-id: svn://localhost/gambas/trunk@7729 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2016-04-07 20:41:37 +00:00
parent 409bc82577
commit ad2a5315e4
2 changed files with 15 additions and 0 deletions

View file

@ -205,3 +205,17 @@ void FixBreezeStyle::drawComplexControl(ComplexControl element, const QStyleOpti
QProxyStyle::drawComplexControl(element, option, painter, widget); QProxyStyle::drawComplexControl(element, option, painter, widget);
} }
void FixBreezeStyle::drawControl(ControlElement element, const QStyleOption * option, QPainter * painter, const QWidget * widget) const
{
QStyleOptionButton newOption;
if (element == CE_PushButtonBevel)
{
newOption = *(QStyleOptionButton *)option;
newOption.iconSize = QSize(0, 0);
option = &newOption;
}
QProxyStyle::drawControl(element, option, painter, widget);
}

View file

@ -36,6 +36,7 @@ public:
void drawComplexControl(ComplexControl, const QStyleOptionComplex*, QPainter*, const QWidget*) const; void drawComplexControl(ComplexControl, const QStyleOptionComplex*, QPainter*, const QWidget*) const;
void drawPrimitive(PrimitiveElement, const QStyleOption*, QPainter*, const QWidget*) const; void drawPrimitive(PrimitiveElement, const QStyleOption*, QPainter*, const QWidget*) const;
void drawControl(ControlElement, const QStyleOption *, QPainter *, const QWidget *) const;
QRect visualRect(const QStyleOption* opt, const QRect& subRect) const QRect visualRect(const QStyleOption* opt, const QRect& subRect) const
{ return QProxyStyle::visualRect(opt->direction, opt->rect, subRect); } { return QProxyStyle::visualRect(opt->direction, opt->rect, subRect); }