Diffstat (limited to 'noncore/styles/liquid/liquid.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/styles/liquid/liquid.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index 2b6eaa4..9a7d2dd 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp | |||
@@ -1,24 +1,25 @@ | |||
1 | /*- | 1 | /*- |
2 | * Copyright (C)QPL 2001 Daniel M. Duley. All rights reserved. | 2 | * Copyright (C)QPL 2001 Daniel M. Duley. All rights reserved. |
3 | */ | 3 | */ |
4 | 4 | ||
5 | 5 | ||
6 | 6 | ||
7 | #ifndef INCLUDE_MENUITEM_DEF | 7 | #ifndef INCLUDE_MENUITEM_DEF |
8 | #define INCLUDE_MENUITEM_DEF | 8 | #define INCLUDE_MENUITEM_DEF |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | #include <qmenudata.h> | 11 | #include <qmenudata.h> |
12 | #include "liquid.h" | 12 | #include "liquid.h" |
13 | #include "liquiddeco.h" | ||
13 | #include <qapplication.h> | 14 | #include <qapplication.h> |
14 | #include <qpe/config.h> | 15 | #include <qpe/config.h> |
15 | #include "effects.h" | 16 | #include "effects.h" |
16 | #include <qpalette.h> | 17 | #include <qpalette.h> |
17 | #include <qbitmap.h> | 18 | #include <qbitmap.h> |
18 | #include <qtabbar.h> | 19 | #include <qtabbar.h> |
19 | #include <qpopupmenu.h> | 20 | #include <qpopupmenu.h> |
20 | #include <qobjectlist.h> | 21 | #include <qobjectlist.h> |
21 | #include <qimage.h> | 22 | #include <qimage.h> |
22 | #include <qtimer.h> | 23 | #include <qtimer.h> |
23 | #include <qpixmapcache.h> | 24 | #include <qpixmapcache.h> |
24 | #include <qradiobutton.h> | 25 | #include <qradiobutton.h> |
@@ -978,33 +979,37 @@ void LiquidStyle::unPolish(QWidget *w) | |||
978 | void LiquidStyle::polish(QApplication *app) | 979 | void LiquidStyle::polish(QApplication *app) |
979 | { | 980 | { |
980 | 981 | ||
981 | QWindowsStyle::polish(app); | 982 | QWindowsStyle::polish(app); |
982 | menuAni = app->isEffectEnabled(UI_AnimateMenu); | 983 | menuAni = app->isEffectEnabled(UI_AnimateMenu); |
983 | menuFade = app->isEffectEnabled(UI_FadeMenu); | 984 | menuFade = app->isEffectEnabled(UI_FadeMenu); |
984 | if(menuAni) | 985 | if(menuAni) |
985 | app->setEffectEnabled(UI_AnimateMenu, false); | 986 | app->setEffectEnabled(UI_AnimateMenu, false); |
986 | if(menuFade) | 987 | if(menuFade) |
987 | app->setEffectEnabled(UI_FadeMenu, false); | 988 | app->setEffectEnabled(UI_FadeMenu, false); |
988 | 989 | ||
989 | qt_set_draw_menu_bar_impl((QDrawMenuBarItemImpl) &LiquidStyle::drawMenuBarItem); | 990 | qt_set_draw_menu_bar_impl((QDrawMenuBarItemImpl) &LiquidStyle::drawMenuBarItem); |
991 | |||
992 | QApplication::qwsSetDecoration ( new LiquidDecoration ( )); | ||
990 | } | 993 | } |
991 | 994 | ||
992 | void LiquidStyle::unPolish(QApplication *app) | 995 | void LiquidStyle::unPolish(QApplication *app) |
993 | { | 996 | { |
994 | QWindowsStyle::unPolish(app); | 997 | QWindowsStyle::unPolish(app); |
995 | app->setEffectEnabled(UI_AnimateMenu, menuAni); | 998 | app->setEffectEnabled(UI_AnimateMenu, menuAni); |
996 | app->setEffectEnabled(UI_FadeMenu, menuFade); | 999 | app->setEffectEnabled(UI_FadeMenu, menuFade); |
997 | 1000 | ||
998 | qt_set_draw_menu_bar_impl ( 0 ); | 1001 | qt_set_draw_menu_bar_impl ( 0 ); |
1002 | |||
1003 | QApplication::qwsSetDecoration ( new QPEDecoration ( )); | ||
999 | } | 1004 | } |
1000 | 1005 | ||
1001 | /* | 1006 | /* |
1002 | * This is a fun method ;-) Here's an overview. KToolBar grabs resize to | 1007 | * This is a fun method ;-) Here's an overview. KToolBar grabs resize to |
1003 | * force everything to erase and repaint on resize. This is going away, I'm | 1008 | * force everything to erase and repaint on resize. This is going away, I'm |
1004 | * trying to get shaped widgets to work right without masking. QPushButton, | 1009 | * trying to get shaped widgets to work right without masking. QPushButton, |
1005 | * QComboBox, and Panel applet handles capture mouse enter and leaves in order | 1010 | * QComboBox, and Panel applet handles capture mouse enter and leaves in order |
1006 | * to set the highlightwidget and repaint for mouse hovers. CheckBoxes and | 1011 | * to set the highlightwidget and repaint for mouse hovers. CheckBoxes and |
1007 | * RadioButtons need to do this differently. Qt buffers these in pixmaps and | 1012 | * RadioButtons need to do this differently. Qt buffers these in pixmaps and |
1008 | * caches them in QPixmapCache, which is bad for doing things like hover | 1013 | * caches them in QPixmapCache, which is bad for doing things like hover |
1009 | * because the style methods aren't called in paintEvents if everything | 1014 | * because the style methods aren't called in paintEvents if everything |
1010 | * is cached. We use our own Paint event handler instead. Taskbuttons and | 1015 | * is cached. We use our own Paint event handler instead. Taskbuttons and |