aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsimonb <simonb>2006-04-14 15:26:25 (GMT)
committersimonb <simonb>2006-04-14 15:26:25 (GMT)
commit83a3429c395299b5acb85a3f372091037fe12603 (patch)
treee9217da59fea37de34f99b9add4350e2e5c785bd /src
parent3a7c01abed9adbac60bdd824b43a9d79ec064dea (diff)
downloadfluxbox_paul-83a3429c395299b5acb85a3f372091037fe12603.zip
fluxbox_paul-83a3429c395299b5acb85a3f372091037fe12603.tar.bz2
more button state fixing for shade, should be right now
plus noticed typo in theme for unshade
Diffstat (limited to 'src')
-rw-r--r--src/WinButton.cc12
-rw-r--r--src/WinButtonTheme.cc2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/WinButton.cc b/src/WinButton.cc
index afdfb7f..4f50935 100644
--- a/src/WinButton.cc
+++ b/src/WinButton.cc
@@ -187,9 +187,9 @@ Pixmap WinButton::getPressedPixmap() const {
187 return m_theme.closePressedPixmap().pixmap().drawable(); 187 return m_theme.closePressedPixmap().pixmap().drawable();
188 case SHADE: 188 case SHADE:
189 if (m_listen_to.isShaded()) 189 if (m_listen_to.isShaded())
190 return m_theme.shadePressedPixmap().pixmap().drawable();
191 else
192 return m_theme.unshadePressedPixmap().pixmap().drawable(); 190 return m_theme.unshadePressedPixmap().pixmap().drawable();
191 else
192 return m_theme.shadePressedPixmap().pixmap().drawable();
193 case MENUICON: 193 case MENUICON:
194 if (m_icon_pixmap.drawable()) 194 if (m_icon_pixmap.drawable())
195 if (m_listen_to.isFocused()) 195 if (m_listen_to.isFocused())
@@ -382,5 +382,13 @@ void WinButton::update(FbTk::Subject *subj) {
382 if (my_pm != None) 382 if (my_pm != None)
383 setBackgroundPixmap(my_pm); 383 setBackgroundPixmap(my_pm);
384 384
385 // incorrect, pressed_pixmap is stateful in shade, so we'll do oneoff for now
386 if (m_type == SHADE) {
387 Pixmap p_pm = getPressedPixmap();
388 if (p_pm != None)
389 setPressedPixmap(p_pm);
390 }
391
392
385 clear(); 393 clear();
386} 394}
diff --git a/src/WinButtonTheme.cc b/src/WinButtonTheme.cc
index 11041f2..22e86fc 100644
--- a/src/WinButtonTheme.cc
+++ b/src/WinButtonTheme.cc
@@ -44,7 +44,7 @@ WinButtonTheme::WinButtonTheme(int screen_num, FbWinFrameTheme &frame_theme):
44 m_shade_unfocus_pm(*this, "window.shade.unfocus.pixmap", "Window.Shade.Unfocus.Pixmap"), 44 m_shade_unfocus_pm(*this, "window.shade.unfocus.pixmap", "Window.Shade.Unfocus.Pixmap"),
45 m_shade_pressed_pm(*this, "window.shade.pressed.pixmap", "Window.Shade.Pressed.Pixmap"), 45 m_shade_pressed_pm(*this, "window.shade.pressed.pixmap", "Window.Shade.Pressed.Pixmap"),
46 m_unshade_pm(*this, "window.unshade.pixmap", "Window.Unshade.Pixmap"), 46 m_unshade_pm(*this, "window.unshade.pixmap", "Window.Unshade.Pixmap"),
47 m_unshade_unfocus_pm(*this, "window.unshade.unfocus.pixmap", "Window.Unhade.Unfocus.Pixmap"), 47 m_unshade_unfocus_pm(*this, "window.unshade.unfocus.pixmap", "Window.Unshade.Unfocus.Pixmap"),
48 m_unshade_pressed_pm(*this, "window.unshade.pressed.pixmap", "Window.Unshade.Pressed.Pixmap"), 48 m_unshade_pressed_pm(*this, "window.unshade.pressed.pixmap", "Window.Unshade.Pressed.Pixmap"),
49 m_menuicon_pm(*this, "window.menuicon.pixmap", "Window.MenuIcon.Pixmap"), 49 m_menuicon_pm(*this, "window.menuicon.pixmap", "Window.MenuIcon.Pixmap"),
50 m_menuicon_unfocus_pm(*this, "window.menuicon.unfocus.pixmap", "Window.MenuIcon.Unfocus.Pixmap"), 50 m_menuicon_unfocus_pm(*this, "window.menuicon.unfocus.pixmap", "Window.MenuIcon.Unfocus.Pixmap"),