all repos — fluxbox @ 1f01d84c080d607a91eb417efcaf5e500b5f1d7e

custom fork of the fluxbox windowmanager

split WinButtonTheme into multiple themes
Mark Tiefenbruck mark@fluxbox.org
commit

1f01d84c080d607a91eb417efcaf5e500b5f1d7e

parent

ec3125aeb95a06f08cd4895c5b7c3a8911c1b368

M src/Screen.ccsrc/Screen.cc

@@ -326,7 +326,9 @@ m_unfocused_windowtheme(new FbWinFrameTheme(scrn, ".unfocus", ".Unfocus")),

// 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,
M src/Screen.hhsrc/Screen.hh

@@ -281,8 +281,13 @@

FbTk::ThemeProxy<FbTk::MenuTheme> &menuTheme() { return *m_menutheme.get(); } const FbTk::ThemeProxy<FbTk::MenuTheme> &menuTheme() const { return *m_menutheme.get(); } const FbTk::ThemeProxy<RootTheme> &rootTheme() const { return *m_root_theme.get(); } - FbTk::ThemeProxy<WinButtonTheme> &winButtonTheme() { return *m_winbutton_theme.get(); } - const FbTk::ThemeProxy<WinButtonTheme> &winButtonTheme() const { return *m_winbutton_theme.get(); } + + FbTk::ThemeProxy<WinButtonTheme> &focusedWinButtonTheme() { return *m_focused_winbutton_theme.get(); } + const FbTk::ThemeProxy<WinButtonTheme> &focusedWinButtonTheme() const { return *m_focused_winbutton_theme.get(); } + FbTk::ThemeProxy<WinButtonTheme> &unfocusedWinButtonTheme() { return *m_unfocused_winbutton_theme.get(); } + const FbTk::ThemeProxy<WinButtonTheme> &unfocusedWinButtonTheme() const { return *m_unfocused_winbutton_theme.get(); } + FbTk::ThemeProxy<WinButtonTheme> &pressedWinButtonTheme() { return *m_pressed_winbutton_theme.get(); } + const FbTk::ThemeProxy<WinButtonTheme> &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 @@ Workspaces m_workspaces_list;

std::auto_ptr<FbWinFrameTheme> m_focused_windowtheme, m_unfocused_windowtheme; - std::auto_ptr<WinButtonTheme> m_winbutton_theme; + std::auto_ptr<WinButtonTheme> m_focused_winbutton_theme, + m_unfocused_winbutton_theme, m_pressed_winbutton_theme; std::auto_ptr<FbTk::MenuTheme> m_menutheme; std::auto_ptr<RootTheme> m_root_theme;
M src/WinButton.ccsrc/WinButton.cc

@@ -34,11 +34,13 @@

WinButton::WinButton(const FluxboxWindow &listen_to, FbTk::ThemeProxy<WinButtonTheme> &theme, + FbTk::ThemeProxy<WinButtonTheme> &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 @@ }

} 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::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; }
M src/WinButton.hhsrc/WinButton.hh

@@ -41,6 +41,7 @@ /// draw type for the button

enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE, MENUICON}; WinButton(const FluxboxWindow &listen_to, FbTk::ThemeProxy<WinButtonTheme> &theme, + FbTk::ThemeProxy<WinButtonTheme> &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<WinButtonTheme> &m_theme; + FbTk::ThemeProxy<WinButtonTheme> &m_theme, &m_pressed_theme; FbTk::FbPixmap m_icon_pixmap; FbTk::FbPixmap m_icon_mask;
M src/WinButtonTheme.ccsrc/WinButtonTheme.cc

@@ -28,33 +28,29 @@

#include "FbWinFrameTheme.hh" WinButtonTheme::WinButtonTheme(int screen_num, - FbTk::ThemeProxy<FbWinFrameTheme> &frame_theme): + const std::string &extra, const std::string &altextra, + FbTk::ThemeProxy<FbWinFrameTheme> &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 @@ } // else use specified height to scale pixmaps

// 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); }
M src/WinButtonTheme.hhsrc/WinButtonTheme.hh

@@ -25,12 +25,15 @@

#include "FbTk/Theme.hh" #include "FbTk/PixmapWithMask.hh" +#include <string> + class FbWinFrameTheme; class WinButtonTheme: public FbTk::Theme, public FbTk::ThemeProxy<WinButtonTheme> { public: WinButtonTheme(int screen_num, + const std::string &extra, const std::string &altextra, FbTk::ThemeProxy<FbWinFrameTheme> &frame_theme); ~WinButtonTheme();

@@ -38,53 +41,29 @@ void reconfigTheme();

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 @@ virtual const WinButtonTheme &operator *() const { return *this; }

private: - FbTk::ThemeItem<FbTk::PixmapWithMask> m_close_pm, m_close_unfocus_pm, m_close_pressed_pm; - FbTk::ThemeItem<FbTk::PixmapWithMask> m_maximize_pm, m_maximize_unfocus_pm, m_maximize_pressed_pm; - FbTk::ThemeItem<FbTk::PixmapWithMask> m_iconify_pm, m_iconify_unfocus_pm, m_iconify_pressed_pm; - FbTk::ThemeItem<FbTk::PixmapWithMask> m_shade_pm, m_shade_unfocus_pm, m_shade_pressed_pm; - FbTk::ThemeItem<FbTk::PixmapWithMask> m_unshade_pm, m_unshade_unfocus_pm, m_unshade_pressed_pm; - FbTk::ThemeItem<FbTk::PixmapWithMask> 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<FbTk::PixmapWithMask> m_title_focus_pm, m_title_unfocus_pm; - FbTk::ThemeItem<FbTk::PixmapWithMask> m_stick_pm, m_stick_unfocus_pm, m_stick_pressed_pm; - FbTk::ThemeItem<FbTk::PixmapWithMask> m_stuck_pm, m_stuck_unfocus_pm; + FbTk::ThemeItem<FbTk::PixmapWithMask> 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<FbWinFrameTheme> &m_frame_theme; };
M src/Window.ccsrc/Window.cc

@@ -290,6 +290,8 @@ m_click_focus(true),

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 @@ CommandRef shade_cmd(new WindowCmd(*this, &FluxboxWindow::shade));

CommandRef stick_cmd(new WindowCmd(*this, &FluxboxWindow::stick)); CommandRef show_menu_cmd(new WindowCmd(*this, &FluxboxWindow::popupMenu)); - FbTk::ThemeProxy<WinButtonTheme> &winbutton_theme = screen().winButtonTheme(); - for (size_t c = 0; c < 2 ; c++) { // get titlebar configuration for current side const vector<WinButton::Type> &dir = *(*titlebar_side[c]);

@@ -3995,7 +3995,8 @@

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 @@ }

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 @@ }

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 @@ stateSig().attach(winbtn);

} 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 @@ stateSig().attach(winbtn);

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 @@ stateSig().attach(winbtn);

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);
M src/Window.hhsrc/Window.hh

@@ -611,6 +611,7 @@ unsigned int m_old_width, m_old_height; ///< old size so we can restore from maximized state

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<WinButtonTheme> m_button_theme; FocusableTheme<FbWinFrameTheme> m_theme; FbWinFrame m_frame; ///< the actuall window frame