aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/TabWidget.cpp4
-rw-r--r--gui/ThemeNew.cpp2
-rw-r--r--gui/newgui.cpp2
-rw-r--r--gui/theme.h8
4 files changed, 12 insertions, 4 deletions
diff --git a/gui/TabWidget.cpp b/gui/TabWidget.cpp
index c57c3b2aca..32ed29dfc0 100644
--- a/gui/TabWidget.cpp
+++ b/gui/TabWidget.cpp
@@ -65,9 +65,9 @@ void TabWidget::init() {
int x = _w - _butRP - _butW * 2 - 2;
int y = _butTP - _tabHeight;
_navLeft = new ButtonWidget(this, x, y, _butW, _butH, "<", kCmdLeft, 0);
- _navLeft->clearHints(THEME_HINT_SAVE_BACKGROUND);
+ _navLeft->setHints(THEME_HINT_NO_BACKGROUND_RESTORE);
_navRight = new ButtonWidget(this, x + _butW + 2, y, _butW, _butH, ">", kCmdRight, 0);
- _navRight->clearHints(THEME_HINT_SAVE_BACKGROUND);
+ _navRight->setHints(THEME_HINT_NO_BACKGROUND_RESTORE);
}
TabWidget::~TabWidget() {
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp
index c02ff2e1d9..b7c509c0b2 100644
--- a/gui/ThemeNew.cpp
+++ b/gui/ThemeNew.cpp
@@ -400,7 +400,7 @@ void ThemeNew::drawButton(const Common::Rect &r, const Common::String &str, Stat
Common::Rect r2 = shadowRect(r, kShadowButton);
- if (hints & THEME_HINT_SAVE_BACKGROUND)
+ if (!(hints & THEME_HINT_NO_BACKGROUND_RESTORE) || state == kStateDisabled)
restoreBackground(r2);
// shadow
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index f4ec342925..57c23e35e2 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -148,6 +148,8 @@ void NewGui::redraw() {
_dialogStack[i]->drawDialog();
}
+
+ _theme->drawAll();
}
void NewGui::runLoop() {
diff --git a/gui/theme.h b/gui/theme.h
index 2fd43e98bc..db706a35a7 100644
--- a/gui/theme.h
+++ b/gui/theme.h
@@ -59,7 +59,13 @@ enum {
THEME_HINT_PLAIN_COLOR = 1 << 4,
// Indictaes that a shadows should be drawn around the background
- THEME_HINT_USE_SHADOW = 1 << 5
+ THEME_HINT_USE_SHADOW = 1 << 5,
+
+ // Indicates that no background should be restored when drawing the widget
+ // (note that this can be silently ignored if for example the theme does
+ // alpha blending and would blend over a allready drawn widget)
+ // TODO: currently only ThemeNew::drawButton supports this
+ THEME_HINT_NO_BACKGROUND_RESTORE = 1 << 6
};