From 1f01d84c080d607a91eb417efcaf5e500b5f1d7e Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Tue, 8 Jan 2008 00:50:58 -0800 Subject: split WinButtonTheme into multiple themes --- src/Screen.cc | 4 ++- src/Screen.hh | 12 ++++++-- src/WinButton.cc | 81 +++++++++++++++------------------------------------ src/WinButton.hh | 3 +- src/WinButtonTheme.cc | 72 ++++++++++++++------------------------------- src/WinButtonTheme.hh | 44 +++++----------------------- src/Window.cc | 22 +++++++++----- src/Window.hh | 1 + 8 files changed, 82 insertions(+), 157 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 8e5d8af..eba9eb7 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -326,7 +326,9 @@ BScreen::BScreen(FbTk::ResourceManager &rm, // the order of windowtheme and winbutton theme is important // because winbutton need to rescale the pixmaps in winbutton theme // after fbwinframe have resized them - m_winbutton_theme(new WinButtonTheme(scrn, *m_focused_windowtheme)), + m_focused_winbutton_theme(new WinButtonTheme(scrn, "", "", *m_focused_windowtheme)), + m_unfocused_winbutton_theme(new WinButtonTheme(scrn, ".unfocus", ".Unfocus", *m_unfocused_windowtheme)), + m_pressed_winbutton_theme(new WinButtonTheme(scrn, ".pressed", ".Pressed", *m_focused_windowtheme)), m_menutheme(new FbTk::MenuTheme(scrn)), m_root_window(scrn), m_geom_window(m_root_window, diff --git a/src/Screen.hh b/src/Screen.hh index 5815395..1d41d82 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -281,8 +281,13 @@ public: FbTk::ThemeProxy &menuTheme() { return *m_menutheme.get(); } const FbTk::ThemeProxy &menuTheme() const { return *m_menutheme.get(); } const FbTk::ThemeProxy &rootTheme() const { return *m_root_theme.get(); } - FbTk::ThemeProxy &winButtonTheme() { return *m_winbutton_theme.get(); } - const FbTk::ThemeProxy &winButtonTheme() const { return *m_winbutton_theme.get(); } + + FbTk::ThemeProxy &focusedWinButtonTheme() { return *m_focused_winbutton_theme.get(); } + const FbTk::ThemeProxy &focusedWinButtonTheme() const { return *m_focused_winbutton_theme.get(); } + FbTk::ThemeProxy &unfocusedWinButtonTheme() { return *m_unfocused_winbutton_theme.get(); } + const FbTk::ThemeProxy &unfocusedWinButtonTheme() const { return *m_unfocused_winbutton_theme.get(); } + FbTk::ThemeProxy &pressedWinButtonTheme() { return *m_pressed_winbutton_theme.get(); } + const FbTk::ThemeProxy &pressedWinButtonTheme() const { return *m_pressed_winbutton_theme.get(); } FbRootWindow &rootWindow() { return m_root_window; } const FbRootWindow &rootWindow() const { return m_root_window; } @@ -519,7 +524,8 @@ private: std::auto_ptr m_focused_windowtheme, m_unfocused_windowtheme; - std::auto_ptr m_winbutton_theme; + std::auto_ptr m_focused_winbutton_theme, + m_unfocused_winbutton_theme, m_pressed_winbutton_theme; std::auto_ptr m_menutheme; std::auto_ptr m_root_theme; diff --git a/src/WinButton.cc b/src/WinButton.cc index 5c6c99c..e8cf0bd 100644 --- a/src/WinButton.cc +++ b/src/WinButton.cc @@ -34,11 +34,13 @@ WinButton::WinButton(const FluxboxWindow &listen_to, FbTk::ThemeProxy &theme, + FbTk::ThemeProxy &pressed, Type buttontype, const FbTk::FbWindow &parent, int x, int y, unsigned int width, unsigned int height): FbTk::Button(parent, x, y, width, height), - m_type(buttontype), m_listen_to(listen_to), m_theme(theme), + m_type(buttontype), m_listen_to(listen_to), + m_theme(theme), m_pressed_theme(pressed), m_icon_pixmap(0), m_icon_mask(0), overrode_bg(false), overrode_pressed(false) { theme.reconfigSig().attach(this); @@ -108,64 +110,30 @@ void WinButton::setPressedColor(const FbTk::Color &color) { } Pixmap WinButton::getBackgroundPixmap() const { - bool focused = m_listen_to.isFocused(); switch(m_type) { case MAXIMIZE: - if (focused) - return m_theme->maximizePixmap().pixmap().drawable(); - else - return m_theme->maximizeUnfocusPixmap().pixmap().drawable(); + return m_theme->maximizePixmap().pixmap().drawable(); break; case MINIMIZE: - if (focused) - return m_theme->iconifyPixmap().pixmap().drawable(); - else - return m_theme->iconifyUnfocusPixmap().pixmap().drawable(); + return m_theme->iconifyPixmap().pixmap().drawable(); break; case STICK: - if (m_listen_to.isStuck()) { - if (focused) - return m_theme->stuckPixmap().pixmap().drawable(); - else - return m_theme->stuckUnfocusPixmap().pixmap().drawable(); - } else { - if (focused) - return m_theme->stickPixmap().pixmap().drawable(); - else - return m_theme->stickUnfocusPixmap().pixmap().drawable(); - } + if (m_listen_to.isStuck()) + return m_theme->stuckPixmap().pixmap().drawable(); + return m_theme->stickPixmap().pixmap().drawable(); break; case CLOSE: - if (focused) - return m_theme->closePixmap().pixmap().drawable(); - else - return m_theme->closeUnfocusPixmap().pixmap().drawable(); + return m_theme->closePixmap().pixmap().drawable(); break; case SHADE: - if (m_listen_to.isShaded()) { - if (focused) - return m_theme->unshadePixmap().pixmap().drawable(); - else - return m_theme->unshadeUnfocusPixmap().pixmap().drawable(); - } else { - if (focused) - return m_theme->shadePixmap().pixmap().drawable(); - else - return m_theme->shadeUnfocusPixmap().pixmap().drawable(); - } + if (m_listen_to.isShaded()) + return m_theme->unshadePixmap().pixmap().drawable(); + return m_theme->shadePixmap().pixmap().drawable(); break; case MENUICON: - if (m_icon_pixmap.drawable()) { - if (focused) - return m_theme->titleFocusPixmap().pixmap().drawable(); - else - return m_theme->titleUnfocusPixmap().pixmap().drawable(); - } else { - if (focused) - return m_theme->menuiconPixmap().pixmap().drawable(); - else - return m_theme->menuiconUnfocusPixmap().pixmap().drawable(); - } + if (m_icon_pixmap.drawable()) + return m_theme->titlePixmap().pixmap().drawable(); + return m_theme->menuiconPixmap().pixmap().drawable(); break; } return None; @@ -174,26 +142,23 @@ Pixmap WinButton::getBackgroundPixmap() const { Pixmap WinButton::getPressedPixmap() const { switch(m_type) { case MAXIMIZE: - return m_theme->maximizePressedPixmap().pixmap().drawable(); + return m_pressed_theme->maximizePixmap().pixmap().drawable(); case MINIMIZE: - return m_theme->iconifyPressedPixmap().pixmap().drawable(); + return m_pressed_theme->iconifyPixmap().pixmap().drawable(); case STICK: - return m_theme->stickPressedPixmap().pixmap().drawable(); + return m_pressed_theme->stickPixmap().pixmap().drawable(); case CLOSE: - return m_theme->closePressedPixmap().pixmap().drawable(); + return m_pressed_theme->closePixmap().pixmap().drawable(); case SHADE: if (m_listen_to.isShaded()) - return m_theme->unshadePressedPixmap().pixmap().drawable(); + return m_pressed_theme->unshadePixmap().pixmap().drawable(); else - return m_theme->shadePressedPixmap().pixmap().drawable(); + return m_pressed_theme->shadePixmap().pixmap().drawable(); case MENUICON: if (m_icon_pixmap.drawable()) - if (m_listen_to.isFocused()) - return m_theme->titleFocusPixmap().pixmap().drawable(); - else - return m_theme->titleUnfocusPixmap().pixmap().drawable(); + return m_theme->titlePixmap().pixmap().drawable(); else - return m_theme->menuiconPressedPixmap().pixmap().drawable(); + return m_pressed_theme->menuiconPixmap().pixmap().drawable(); } return None; } diff --git a/src/WinButton.hh b/src/WinButton.hh index c493491..db2fdf9 100644 --- a/src/WinButton.hh +++ b/src/WinButton.hh @@ -41,6 +41,7 @@ public: enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE, MENUICON}; WinButton(const FluxboxWindow &listen_to, FbTk::ThemeProxy &theme, + FbTk::ThemeProxy &pressed, Type buttontype, const FbTk::FbWindow &parent, int x, int y, unsigned int width, unsigned int height); /// override for drawing @@ -60,7 +61,7 @@ private: void drawType(); Type m_type; ///< the button type const FluxboxWindow &m_listen_to; - FbTk::ThemeProxy &m_theme; + FbTk::ThemeProxy &m_theme, &m_pressed_theme; FbTk::FbPixmap m_icon_pixmap; FbTk::FbPixmap m_icon_mask; diff --git a/src/WinButtonTheme.cc b/src/WinButtonTheme.cc index d58af35..3763176 100644 --- a/src/WinButtonTheme.cc +++ b/src/WinButtonTheme.cc @@ -28,33 +28,29 @@ #include "FbWinFrameTheme.hh" WinButtonTheme::WinButtonTheme(int screen_num, - FbTk::ThemeProxy &frame_theme): + const std::string &extra, const std::string &altextra, + FbTk::ThemeProxy &frame_theme): FbTk::Theme(screen_num), - m_close_pm(*this, "window.close.pixmap", "Window.Close.Pixmap"), - m_close_unfocus_pm(*this, "window.close.unfocus.pixmap", "Window.Close.Unfocus.Pixmap"), - m_close_pressed_pm(*this, "window.close.pressed.pixmap", "Window.Close.Pressed.Pixmap"), - m_maximize_pm(*this, "window.maximize.pixmap", "Window.Maximize.Pixmap"), - m_maximize_unfocus_pm(*this, "window.maximize.unfocus.pixmap", "Window.Maximize.Unfocus.pixmap"), - m_maximize_pressed_pm(*this, "window.maximize.pressed.pixmap", "Window.Maximize.Pressed.Pixmap"), - m_iconify_pm(*this, "window.iconify.pixmap", "Window.Iconify.Pixmap"), - m_iconify_unfocus_pm(*this, "window.iconify.unfocus.pixmap", "Window.Iconify.Unfocus.Pixmap"), - m_iconify_pressed_pm(*this, "window.iconify.pressed.pixmap", "Window.Iconify.Pressed.Pixmap"), - 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.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"), - m_menuicon_pressed_pm(*this, "window.menuicon.pressed.pixmap", "Window.MenuIcon.Pressed.Pixmap"), - m_title_focus_pm(*this, "window.title.focus.pixmap", "Window.Title.Focus.Pixmap"), - m_title_unfocus_pm(*this, "window.title.unfocus.pixmap", "Window.Title.UnFocus.Pixmap"), + m_close_pm(*this, "window.close" + extra + ".pixmap", + "Window.Close" + altextra + ".Pixmap"), + m_maximize_pm(*this, "window.maximize" + extra + ".pixmap", + "Window.Maximize" + altextra + ".Pixmap"), + m_iconify_pm(*this, "window.iconify" + extra + ".pixmap", + "Window.Iconify" + altextra + ".Pixmap"), + m_shade_pm(*this, "window.shade" + extra + ".pixmap", + "Window.Shade" + altextra + ".Pixmap"), + m_unshade_pm(*this, "window.unshade" + extra + ".pixmap", + "Window.Unshade" + altextra + ".Pixmap"), + m_menuicon_pm(*this, "window.menuicon" + extra + ".pixmap", + "Window.MenuIcon" + altextra + ".Pixmap"), + // whoever designed this is going to get hit with a stick + m_title_pm(*this, "window.title" + (extra.empty() ? std::string(".focus") + : extra) + ".pixmap", + "Window.Title" + (extra.empty() ? std::string(".Focus") + : altextra) + ".Pixmap"), m_stick_pm(*this, "window.stick.pixmap", "Window.Stick.Pixmap"), - m_stick_unfocus_pm(*this, "window.stick.unfocus.pixmap", "Window.Stick.Unfocus.Pixmap"), - m_stick_pressed_pm(*this, "window.stick.pressed.pixmap", "Window.Stick.Pressed.Pixmap"), - m_stuck_pm(*this, "window.stuck.pixmap", "Window.Stuck.Pixmap"), - m_stuck_unfocus_pm(*this, "window.stuck.unfocus.pixmap", "Window.Stuck.Unfocus.Pixmap"), + m_stuck_pm(*this, "window.stuck" + extra + ".pixmap", + "Window.Stuck" + altextra + ".Pixmap"), m_frame_theme(frame_theme) { FbTk::ThemeManager::instance().loadTheme(*this); @@ -77,37 +73,13 @@ void WinButtonTheme::reconfigTheme() { // scale all pixmaps m_close_pm->scale(size, size); - m_close_unfocus_pm->scale(size, size); - m_close_pressed_pm->scale(size, size); - m_maximize_pm->scale(size, size); - m_maximize_unfocus_pm->scale(size, size); - m_maximize_pressed_pm->scale(size, size); - m_menuicon_pm->scale(size, size); - m_menuicon_unfocus_pm->scale(size, size); - m_menuicon_pressed_pm->scale(size, size); - m_iconify_pm->scale(size, size); - m_iconify_unfocus_pm->scale(size, size); - m_iconify_pressed_pm->scale(size, size); - m_shade_pm->scale(size, size); - m_shade_unfocus_pm->scale(size, size); - m_shade_pressed_pm->scale(size, size); - m_unshade_pm->scale(size, size); - m_unshade_unfocus_pm->scale(size, size); - m_unshade_pressed_pm->scale(size, size); - - m_title_focus_pm->scale(size, size); - m_title_unfocus_pm->scale(size, size); - + m_title_pm->scale(size, size); m_stick_pm->scale(size, size); - m_stick_unfocus_pm->scale(size, size); - m_stick_pressed_pm->scale(size, size); - m_stuck_pm->scale(size, size); - m_stuck_unfocus_pm->scale(size, size); } diff --git a/src/WinButtonTheme.hh b/src/WinButtonTheme.hh index 5d3e3fe..5436237 100644 --- a/src/WinButtonTheme.hh +++ b/src/WinButtonTheme.hh @@ -25,12 +25,15 @@ #include "FbTk/Theme.hh" #include "FbTk/PixmapWithMask.hh" +#include + class FbWinFrameTheme; class WinButtonTheme: public FbTk::Theme, public FbTk::ThemeProxy { public: WinButtonTheme(int screen_num, + const std::string &extra, const std::string &altextra, FbTk::ThemeProxy &frame_theme); ~WinButtonTheme(); @@ -38,53 +41,29 @@ public: const FbTk::PixmapWithMask &closePixmap() const { return *m_close_pm; } FbTk::PixmapWithMask &closePixmap() { return *m_close_pm; } - FbTk::PixmapWithMask &closeUnfocusPixmap() { return *m_close_unfocus_pm; } - const FbTk::PixmapWithMask &closePressedPixmap() const { return *m_close_pressed_pm; } - FbTk::PixmapWithMask &closePressedPixmap() { return *m_close_pressed_pm; } const FbTk::PixmapWithMask &maximizePixmap() const { return *m_maximize_pm; } FbTk::PixmapWithMask &maximizePixmap() { return *m_maximize_pm; } - FbTk::PixmapWithMask &maximizeUnfocusPixmap() { return *m_maximize_unfocus_pm; } - const FbTk::PixmapWithMask &maximizePressedPixmap() const { return *m_maximize_pressed_pm; } - FbTk::PixmapWithMask &maximizePressedPixmap() { return *m_maximize_pressed_pm; } const FbTk::PixmapWithMask &iconifyPixmap() const { return *m_iconify_pm; } FbTk::PixmapWithMask &iconifyPixmap() { return *m_iconify_pm; } - FbTk::PixmapWithMask &iconifyUnfocusPixmap() { return *m_iconify_unfocus_pm; } - const FbTk::PixmapWithMask &iconifyPressedPixmap() const { return *m_iconify_pressed_pm; } - FbTk::PixmapWithMask &iconifyPressedPixmap() { return *m_iconify_pressed_pm; } const FbTk::PixmapWithMask &stickPixmap() const { return *m_stick_pm; } FbTk::PixmapWithMask &stickPixmap() { return *m_stick_pm; } - FbTk::PixmapWithMask &stickUnfocusPixmap() { return *m_stick_unfocus_pm; } - const FbTk::PixmapWithMask &stickPressedPixmap() const { return *m_stick_pressed_pm; } - FbTk::PixmapWithMask &stickPressedPixmap() { return *m_stick_pressed_pm; } FbTk::PixmapWithMask &stuckPixmap() { return *m_stuck_pm; } - FbTk::PixmapWithMask &stuckUnfocusPixmap() { return *m_stuck_unfocus_pm; } const FbTk::PixmapWithMask &shadePixmap() const { return *m_shade_pm; } FbTk::PixmapWithMask &shadePixmap() { return *m_shade_pm; } - FbTk::PixmapWithMask &shadeUnfocusPixmap() { return *m_shade_unfocus_pm; } - const FbTk::PixmapWithMask &shadePressedPixmap() const { return *m_shade_pressed_pm; } - FbTk::PixmapWithMask &shadePressedPixmap() { return *m_shade_pressed_pm; } const FbTk::PixmapWithMask &unshadePixmap() const { return *m_unshade_pm; } FbTk::PixmapWithMask &unshadePixmap() { return *m_unshade_pm; } - FbTk::PixmapWithMask &unshadeUnfocusPixmap() { return *m_unshade_unfocus_pm; } - const FbTk::PixmapWithMask &unshadePressedPixmap() const { return *m_unshade_pressed_pm; } - FbTk::PixmapWithMask &unshadePressedPixmap() { return *m_unshade_pressed_pm; } const FbTk::PixmapWithMask &menuiconPixmap() const { return *m_menuicon_pm; } FbTk::PixmapWithMask &menuiconPixmap() { return *m_menuicon_pm; } - FbTk::PixmapWithMask &menuiconUnfocusPixmap() { return *m_menuicon_unfocus_pm; } - const FbTk::PixmapWithMask &menuiconPressedPixmap() const { return *m_menuicon_pressed_pm; } - FbTk::PixmapWithMask &menuiconPressedPixmap() { return *m_menuicon_pressed_pm; } - FbTk::PixmapWithMask &titleFocusPixmap() { return *m_title_focus_pm; } - const FbTk::PixmapWithMask &titleFocusPixmap() const { return *m_title_focus_pm; } - FbTk::PixmapWithMask &titleUnfocusPixmap() { return *m_title_unfocus_pm; } - const FbTk::PixmapWithMask &titleUnfocusPixmap() const { return *m_title_unfocus_pm; } + FbTk::PixmapWithMask &titlePixmap() { return *m_title_pm; } + const FbTk::PixmapWithMask &titlePixmap() const { return *m_title_pm; } virtual FbTk::Subject &reconfigSig() { return FbTk::Theme::reconfigSig(); } virtual const FbTk::Subject &reconfigSig() const { return FbTk::Theme::reconfigSig(); } @@ -94,16 +73,9 @@ public: private: - FbTk::ThemeItem m_close_pm, m_close_unfocus_pm, m_close_pressed_pm; - FbTk::ThemeItem m_maximize_pm, m_maximize_unfocus_pm, m_maximize_pressed_pm; - FbTk::ThemeItem m_iconify_pm, m_iconify_unfocus_pm, m_iconify_pressed_pm; - FbTk::ThemeItem m_shade_pm, m_shade_unfocus_pm, m_shade_pressed_pm; - FbTk::ThemeItem m_unshade_pm, m_unshade_unfocus_pm, m_unshade_pressed_pm; - FbTk::ThemeItem m_menuicon_pm, m_menuicon_unfocus_pm, m_menuicon_pressed_pm; - // why this? we need this for the background of the appicon in WinButtons - FbTk::ThemeItem m_title_focus_pm, m_title_unfocus_pm; - FbTk::ThemeItem m_stick_pm, m_stick_unfocus_pm, m_stick_pressed_pm; - FbTk::ThemeItem m_stuck_pm, m_stuck_unfocus_pm; + FbTk::ThemeItem m_close_pm, m_maximize_pm, + m_iconify_pm, m_shade_pm, m_unshade_pm, m_menuicon_pm, m_title_pm, + m_stick_pm, m_stuck_pm; FbTk::ThemeProxy &m_frame_theme; }; diff --git a/src/Window.cc b/src/Window.cc index 250109e..da0a9fa 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -290,6 +290,8 @@ FluxboxWindow::FluxboxWindow(WinClient &client, FbTk::XLayer &layer): m_old_pos_x(0), m_old_pos_y(0), m_old_width(1), m_old_height(1), m_last_button_x(0), m_last_button_y(0), + m_button_theme(*this, screen().focusedWinButtonTheme(), + screen().unfocusedWinButtonTheme()), m_theme(*this, screen().focusedWinFrameTheme(), screen().unfocusedWinFrameTheme()), m_frame(client.screen(), m_theme, client.screen().imageControl(), layer, @@ -3981,8 +3983,6 @@ void FluxboxWindow::updateButtons() { CommandRef stick_cmd(new WindowCmd(*this, &FluxboxWindow::stick)); CommandRef show_menu_cmd(new WindowCmd(*this, &FluxboxWindow::popupMenu)); - FbTk::ThemeProxy &winbutton_theme = screen().winButtonTheme(); - for (size_t c = 0; c < 2 ; c++) { // get titlebar configuration for current side const vector &dir = *(*titlebar_side[c]); @@ -3995,7 +3995,8 @@ void FluxboxWindow::updateButtons() { switch (dir[i]) { case WinButton::MINIMIZE: if (isIconifiable()) { - winbtn = new WinButton(*this, winbutton_theme, + winbtn = new WinButton(*this, m_button_theme, + screen().pressedWinButtonTheme(), WinButton::MINIMIZE, frame().titlebar(), 0, 0, 10, 10); @@ -4004,7 +4005,8 @@ void FluxboxWindow::updateButtons() { break; case WinButton::MAXIMIZE: if (isMaximizable()) { - winbtn = new WinButton(*this, winbutton_theme, + winbtn = new WinButton(*this, m_button_theme, + screen().pressedWinButtonTheme(), dir[i], frame().titlebar(), 0, 0, 10, 10); @@ -4016,7 +4018,8 @@ void FluxboxWindow::updateButtons() { break; case WinButton::CLOSE: if (m_client->isClosable()) { - winbtn = new WinButton(*this, winbutton_theme, + winbtn = new WinButton(*this, m_button_theme, + screen().pressedWinButtonTheme(), dir[i], frame().titlebar(), 0, 0, 10, 10); @@ -4026,7 +4029,8 @@ void FluxboxWindow::updateButtons() { } break; case WinButton::STICK: - winbtn = new WinButton(*this, winbutton_theme, + winbtn = new WinButton(*this, m_button_theme, + screen().pressedWinButtonTheme(), dir[i], frame().titlebar(), 0, 0, 10, 10); @@ -4035,7 +4039,8 @@ void FluxboxWindow::updateButtons() { winbtn->setOnClick(stick_cmd); break; case WinButton::SHADE: - winbtn = new WinButton(*this, winbutton_theme, + winbtn = new WinButton(*this, m_button_theme, + screen().pressedWinButtonTheme(), dir[i], frame().titlebar(), 0, 0, 10, 10); @@ -4043,7 +4048,8 @@ void FluxboxWindow::updateButtons() { winbtn->setOnClick(shade_cmd); break; case WinButton::MENUICON: - winbtn = new WinButton(*this, winbutton_theme, + winbtn = new WinButton(*this, m_button_theme, + screen().pressedWinButtonTheme(), dir[i], frame().titlebar(), 0, 0, 10, 10); diff --git a/src/Window.hh b/src/Window.hh index c66024a..700bd10 100644 --- a/src/Window.hh +++ b/src/Window.hh @@ -611,6 +611,7 @@ private: int m_last_button_x, ///< last known x position of the mouse button m_last_button_y; ///< last known y position of the mouse button + FocusableTheme m_button_theme; FocusableTheme m_theme; FbWinFrame m_frame; ///< the actuall window frame -- cgit v0.11.2