more button state fixing for shade, should be right now plus noticed typo in theme for unshade
simonb simonb
2 files changed,
11 insertions(+),
3 deletions(-)
M
src/WinButton.cc
→
src/WinButton.cc
@@ -187,9 +187,9 @@ case CLOSE:
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())@@ -381,6 +381,14 @@ // to potentially override that. Just make sure background pm is ok
Pixmap my_pm = getBackgroundPixmap(); 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(); }
M
src/WinButtonTheme.cc
→
src/WinButtonTheme.cc
@@ -44,7 +44,7 @@ m_shade_pm(*this, "window.shade.pixmap", "Window.Shade.Pixmap"),
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"),