diff options
| author | Jay Taoko <jay.taoko@canonical.com> | 2011-10-19 16:55:40 -0400 |
|---|---|---|
| committer | Jay Taoko <jay.taoko@canonical.com> | 2011-10-19 16:55:40 -0400 |
| commit | 04856f6833fff048a716c6b2dfba9caafcb897d0 (patch) | |
| tree | b3bf217b9f880e7db80a100ddede9d1f8292e77e /plugins | |
| parent | d551b2f8b56be6b9c1aff452fa9bf6b69a45927c (diff) | |
* Fixed window states.
(bzr r1721.1.3)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/PanelStyle.cpp | 4 | ||||
| -rw-r--r-- | plugins/unityshell/src/PanelStyle.h | 6 | ||||
| -rw-r--r-- | plugins/unityshell/src/WindowButtons.cpp | 24 |
3 files changed, 17 insertions, 17 deletions
diff --git a/plugins/unityshell/src/PanelStyle.cpp b/plugins/unityshell/src/PanelStyle.cpp index 2e9426b4e..c54c7090f 100644 --- a/plugins/unityshell/src/PanelStyle.cpp +++ b/plugins/unityshell/src/PanelStyle.cpp @@ -222,9 +222,9 @@ PanelStyle::GetWindowButtonForTheme(WindowButtonType type, WindowState state) main = nux::Color(1.0f, 0.3f, 0.3f, 0.8f); } - if (state == WINDOW_VISUAL_STATE_PRELIGHT) + if (state == WINDOW_STATE_PRELIGHT) main = main * 1.2f; - else if (state == WINDOW_VISUAL_STATE_PRESSED) + else if (state == WINDOW_STATE_PRESSED) main = main * 0.8f; cr = cairo_graphics.GetContext(); diff --git a/plugins/unityshell/src/PanelStyle.h b/plugins/unityshell/src/PanelStyle.h index d43ea1290..f7df8bc56 100644 --- a/plugins/unityshell/src/PanelStyle.h +++ b/plugins/unityshell/src/PanelStyle.h @@ -37,9 +37,9 @@ public: typedef enum { - WINDOW_VISUAL_STATE_NORMAL, - WINDOW_VISUAL_STATE_PRELIGHT, - WINDOW_VISUAL_STATE_PRESSED + WINDOW_STATE_NORMAL, + WINDOW_STATE_PRELIGHT, + WINDOW_STATE_PRESSED } WindowState; diff --git a/plugins/unityshell/src/WindowButtons.cpp b/plugins/unityshell/src/WindowButtons.cpp index c08506ada..1001a33bf 100644 --- a/plugins/unityshell/src/WindowButtons.cpp +++ b/plugins/unityshell/src/WindowButtons.cpp @@ -156,12 +156,12 @@ public: if (_pressed_dash_tex) _pressed_dash_tex->UnReference(); - _normal_tex = style->GetWindowButton(_type, PanelStyle::WINDOW_VISUAL_STATE_NORMAL); - _prelight_tex = style->GetWindowButton(_type, PanelStyle::WINDOW_VISUAL_STATE_PRELIGHT); - _pressed_tex = style->GetWindowButton(_type, PanelStyle::WINDOW_VISUAL_STATE_PRESSED); - _normal_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_VISUAL_STATE_NORMAL); - _prelight_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_VISUAL_STATE_PRELIGHT); - _pressed_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_VISUAL_STATE_PRESSED); + _normal_tex = style->GetWindowButton(_type, PanelStyle::WINDOW_STATE_NORMAL); + _prelight_tex = style->GetWindowButton(_type, PanelStyle::WINDOW_STATE_PRELIGHT); + _pressed_tex = style->GetWindowButton(_type, PanelStyle::WINDOW_STATE_PRESSED); + _normal_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_STATE_NORMAL); + _prelight_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_STATE_PRELIGHT); + _pressed_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_STATE_PRESSED); if (_dash_is_open) { @@ -193,16 +193,16 @@ public: if (DashSettings::GetDefault()->GetFormFactor() == DashSettings::DESKTOP) { // get maximize buttons - _normal_dash_tex = GetDashMaximizeWindowButton(PanelStyle::WINDOW_VISUAL_STATE_NORMAL); - _prelight_dash_tex = GetDashMaximizeWindowButton(PanelStyle::WINDOW_VISUAL_STATE_PRELIGHT); - _pressed_dash_tex = GetDashMaximizeWindowButton(PanelStyle::WINDOW_VISUAL_STATE_PRESSED); + _normal_dash_tex = GetDashMaximizeWindowButton(PanelStyle::WINDOW_STATE_NORMAL); + _prelight_dash_tex = GetDashMaximizeWindowButton(PanelStyle::WINDOW_STATE_PRELIGHT); + _pressed_dash_tex = GetDashMaximizeWindowButton(PanelStyle::WINDOW_STATE_PRESSED); } else { // get unmaximize buttons - _normal_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_VISUAL_STATE_NORMAL); - _prelight_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_VISUAL_STATE_PRELIGHT); - _pressed_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_VISUAL_STATE_PRESSED); + _normal_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_STATE_NORMAL); + _prelight_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_STATE_PRELIGHT); + _pressed_dash_tex = GetDashWindowButton(_type, PanelStyle::WINDOW_STATE_PRESSED); } // still check if the dash is really opened, |
