diff --git a/src/WinButton.cc b/src/WinButton.cc index afdfb7f6..4f509352 100644 --- a/src/WinButton.cc +++ b/src/WinButton.cc @@ -187,9 +187,9 @@ Pixmap WinButton::getPressedPixmap() const { return m_theme.closePressedPixmap().pixmap().drawable(); case SHADE: if (m_listen_to.isShaded()) - return m_theme.shadePressedPixmap().pixmap().drawable(); - else return m_theme.unshadePressedPixmap().pixmap().drawable(); + else + return m_theme.shadePressedPixmap().pixmap().drawable(); case MENUICON: if (m_icon_pixmap.drawable()) if (m_listen_to.isFocused()) @@ -382,5 +382,13 @@ void WinButton::update(FbTk::Subject *subj) { if (my_pm != None) setBackgroundPixmap(my_pm); + // incorrect, pressed_pixmap is stateful in shade, so we'll do oneoff for now + if (m_type == SHADE) { + Pixmap p_pm = getPressedPixmap(); + if (p_pm != None) + setPressedPixmap(p_pm); + } + + clear(); } diff --git a/src/WinButtonTheme.cc b/src/WinButtonTheme.cc index 11041f20..22e86fcd 100644 --- a/src/WinButtonTheme.cc +++ b/src/WinButtonTheme.cc @@ -44,7 +44,7 @@ WinButtonTheme::WinButtonTheme(int screen_num, FbWinFrameTheme &frame_theme): m_shade_unfocus_pm(*this, "window.shade.unfocus.pixmap", "Window.Shade.Unfocus.Pixmap"), m_shade_pressed_pm(*this, "window.shade.pressed.pixmap", "Window.Shade.Pressed.Pixmap"), m_unshade_pm(*this, "window.unshade.pixmap", "Window.Unshade.Pixmap"), - m_unshade_unfocus_pm(*this, "window.unshade.unfocus.pixmap", "Window.Unhade.Unfocus.Pixmap"), + m_unshade_unfocus_pm(*this, "window.unshade.unfocus.pixmap", "Window.Unshade.Unfocus.Pixmap"), m_unshade_pressed_pm(*this, "window.unshade.pressed.pixmap", "Window.Unshade.Pressed.Pixmap"), m_menuicon_pm(*this, "window.menuicon.pixmap", "Window.MenuIcon.Pixmap"), m_menuicon_unfocus_pm(*this, "window.menuicon.unfocus.pixmap", "Window.MenuIcon.Unfocus.Pixmap"),