Diffstat (limited to 'noncore/styles/liquid/liquid.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/styles/liquid/liquid.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index 87b5488..22bf8af 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp | |||
@@ -171,2 +171,4 @@ LiquidStyle::LiquidStyle() | |||
171 | 171 | ||
172 | flatTBButtons = false; | ||
173 | |||
172 | btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); | 174 | btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); |
@@ -833,2 +835,9 @@ void LiquidStyle::polish(QWidget *w) | |||
833 | w->setBackgroundMode(QWidget::PaletteBackground); | 835 | w->setBackgroundMode(QWidget::PaletteBackground); |
836 | w->setBackgroundOrigin(QWidget::ParentOrigin); | ||
837 | return; | ||
838 | } | ||
839 | if(w->inherits("QToolBar")){ | ||
840 | w->installEventFilter(this); | ||
841 | w->setBackgroundMode(QWidget::PaletteBackground); | ||
842 | w->setBackgroundOrigin(QWidget::WidgetOrigin); | ||
834 | return; | 843 | return; |
@@ -895,4 +904,6 @@ void LiquidStyle::polish(QWidget *w) | |||
895 | } | 904 | } |
896 | if(w-> inherits("QToolButton")) { | 905 | if(w-> inherits("QToolButton")&&w->parent()->inherits("QToolBar")) { |
897 | ((QToolButton*)w)->setAutoRaise (false); | 906 | ((QToolButton*)w)->setAutoRaise (flatTBButtons); |
907 | if ( flatTBButtons ) | ||
908 | w->setBackgroundOrigin(QWidget::ParentOrigin); | ||
898 | } | 909 | } |
@@ -914,7 +925,2 @@ void LiquidStyle::polish(QWidget *w) | |||
914 | } | 925 | } |
915 | if(w->inherits("QToolBar")){ | ||
916 | w->installEventFilter(this); | ||
917 | w->setBackgroundMode(QWidget::PaletteBackground); | ||
918 | return; | ||
919 | } | ||
920 | 926 | ||
@@ -1003,2 +1009,4 @@ void LiquidStyle::polish(QApplication *app) | |||
1003 | QApplication::qwsSetDecoration ( new LiquidDecoration ( )); | 1009 | QApplication::qwsSetDecoration ( new LiquidDecoration ( )); |
1010 | |||
1011 | flatTBButtons = config. readBoolEntry ( "FlatToolButtons", false ); | ||
1004 | } | 1012 | } |
@@ -2000,4 +2008,6 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h, | |||
2000 | } | 2008 | } |
2001 | 2009 | ||
2002 | p-> fillRect ( x, y, w, h, g.brush(QColorGroup::Background)); | 2010 | QWidget *parent = (QWidget *)p->device(); |
2011 | p->setBrushOrigin(parent->pos()); | ||
2012 | parent->erase(x, y, w, h); | ||
2003 | 2013 | ||