From c8d0945a8ff595cd3b5015b6a253bb0a9355633c Mon Sep 17 00:00:00 2001 From: "Vladimir A. Pavlov" Date: Fri, 7 Dec 2012 23:10:23 +0300 Subject: Make use of window.stuck.pressed.pixmap --- src/WinButton.cc | 4 +++- src/WinButtonTheme.hh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/WinButton.cc b/src/WinButton.cc index 703820d..ff0ff76 100644 --- a/src/WinButton.cc +++ b/src/WinButton.cc @@ -151,6 +151,8 @@ Pixmap WinButton::getPressedPixmap() const { case MINIMIZE: return m_pressed_theme->iconifyPixmap().pixmap().drawable(); case STICK: + if (m_listen_to.isStuck()) + return m_pressed_theme->stuckPixmap().pixmap().drawable(); return m_pressed_theme->stickPixmap().pixmap().drawable(); case CLOSE: return m_pressed_theme->closePixmap().pixmap().drawable(); @@ -308,7 +310,7 @@ void WinButton::updateAll() { setBackgroundPixmap(my_pm); // incorrect, pressed_pixmap is stateful in shade, so we'll do oneoff for now - if (m_type == SHADE) { + if (m_type == SHADE || m_type == STICK) { Pixmap p_pm = getPressedPixmap(); if (p_pm != None) setPressedPixmap(p_pm); diff --git a/src/WinButtonTheme.hh b/src/WinButtonTheme.hh index 4765822..224fc6c 100644 --- a/src/WinButtonTheme.hh +++ b/src/WinButtonTheme.hh @@ -51,6 +51,7 @@ public: const FbTk::PixmapWithMask &stickPixmap() const { return *m_stick_pm; } FbTk::PixmapWithMask &stickPixmap() { return *m_stick_pm; } + const FbTk::PixmapWithMask &stuckPixmap() const { return *m_stuck_pm; } FbTk::PixmapWithMask &stuckPixmap() { return *m_stuck_pm; } const FbTk::PixmapWithMask &shadePixmap() const { return *m_shade_pm; } -- cgit v0.11.2