diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-08 08:50:58 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-01-08 08:50:58 (GMT) |
commit | 1f01d84c080d607a91eb417efcaf5e500b5f1d7e (patch) | |
tree | 979c14aa12abfa6d0fe1aa936a9b1e9effd86a32 /src/Window.cc | |
parent | ec3125aeb95a06f08cd4895c5b7c3a8911c1b368 (diff) | |
download | fluxbox-1f01d84c080d607a91eb417efcaf5e500b5f1d7e.zip fluxbox-1f01d84c080d607a91eb417efcaf5e500b5f1d7e.tar.bz2 |
split WinButtonTheme into multiple themes
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 22 |
1 files changed, 14 insertions, 8 deletions
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): | |||
290 | m_old_pos_x(0), m_old_pos_y(0), | 290 | m_old_pos_x(0), m_old_pos_y(0), |
291 | m_old_width(1), m_old_height(1), | 291 | m_old_width(1), m_old_height(1), |
292 | m_last_button_x(0), m_last_button_y(0), | 292 | m_last_button_x(0), m_last_button_y(0), |
293 | m_button_theme(*this, screen().focusedWinButtonTheme(), | ||
294 | screen().unfocusedWinButtonTheme()), | ||
293 | m_theme(*this, screen().focusedWinFrameTheme(), | 295 | m_theme(*this, screen().focusedWinFrameTheme(), |
294 | screen().unfocusedWinFrameTheme()), | 296 | screen().unfocusedWinFrameTheme()), |
295 | m_frame(client.screen(), m_theme, client.screen().imageControl(), layer, | 297 | m_frame(client.screen(), m_theme, client.screen().imageControl(), layer, |
@@ -3981,8 +3983,6 @@ void FluxboxWindow::updateButtons() { | |||
3981 | CommandRef stick_cmd(new WindowCmd(*this, &FluxboxWindow::stick)); | 3983 | CommandRef stick_cmd(new WindowCmd(*this, &FluxboxWindow::stick)); |
3982 | CommandRef show_menu_cmd(new WindowCmd(*this, &FluxboxWindow::popupMenu)); | 3984 | CommandRef show_menu_cmd(new WindowCmd(*this, &FluxboxWindow::popupMenu)); |
3983 | 3985 | ||
3984 | FbTk::ThemeProxy<WinButtonTheme> &winbutton_theme = screen().winButtonTheme(); | ||
3985 | |||
3986 | for (size_t c = 0; c < 2 ; c++) { | 3986 | for (size_t c = 0; c < 2 ; c++) { |
3987 | // get titlebar configuration for current side | 3987 | // get titlebar configuration for current side |
3988 | const vector<WinButton::Type> &dir = *(*titlebar_side[c]); | 3988 | const vector<WinButton::Type> &dir = *(*titlebar_side[c]); |
@@ -3995,7 +3995,8 @@ void FluxboxWindow::updateButtons() { | |||
3995 | switch (dir[i]) { | 3995 | switch (dir[i]) { |
3996 | case WinButton::MINIMIZE: | 3996 | case WinButton::MINIMIZE: |
3997 | if (isIconifiable()) { | 3997 | if (isIconifiable()) { |
3998 | winbtn = new WinButton(*this, winbutton_theme, | 3998 | winbtn = new WinButton(*this, m_button_theme, |
3999 | screen().pressedWinButtonTheme(), | ||
3999 | WinButton::MINIMIZE, | 4000 | WinButton::MINIMIZE, |
4000 | frame().titlebar(), | 4001 | frame().titlebar(), |
4001 | 0, 0, 10, 10); | 4002 | 0, 0, 10, 10); |
@@ -4004,7 +4005,8 @@ void FluxboxWindow::updateButtons() { | |||
4004 | break; | 4005 | break; |
4005 | case WinButton::MAXIMIZE: | 4006 | case WinButton::MAXIMIZE: |
4006 | if (isMaximizable()) { | 4007 | if (isMaximizable()) { |
4007 | winbtn = new WinButton(*this, winbutton_theme, | 4008 | winbtn = new WinButton(*this, m_button_theme, |
4009 | screen().pressedWinButtonTheme(), | ||
4008 | dir[i], | 4010 | dir[i], |
4009 | frame().titlebar(), | 4011 | frame().titlebar(), |
4010 | 0, 0, 10, 10); | 4012 | 0, 0, 10, 10); |
@@ -4016,7 +4018,8 @@ void FluxboxWindow::updateButtons() { | |||
4016 | break; | 4018 | break; |
4017 | case WinButton::CLOSE: | 4019 | case WinButton::CLOSE: |
4018 | if (m_client->isClosable()) { | 4020 | if (m_client->isClosable()) { |
4019 | winbtn = new WinButton(*this, winbutton_theme, | 4021 | winbtn = new WinButton(*this, m_button_theme, |
4022 | screen().pressedWinButtonTheme(), | ||
4020 | dir[i], | 4023 | dir[i], |
4021 | frame().titlebar(), | 4024 | frame().titlebar(), |
4022 | 0, 0, 10, 10); | 4025 | 0, 0, 10, 10); |
@@ -4026,7 +4029,8 @@ void FluxboxWindow::updateButtons() { | |||
4026 | } | 4029 | } |
4027 | break; | 4030 | break; |
4028 | case WinButton::STICK: | 4031 | case WinButton::STICK: |
4029 | winbtn = new WinButton(*this, winbutton_theme, | 4032 | winbtn = new WinButton(*this, m_button_theme, |
4033 | screen().pressedWinButtonTheme(), | ||
4030 | dir[i], | 4034 | dir[i], |
4031 | frame().titlebar(), | 4035 | frame().titlebar(), |
4032 | 0, 0, 10, 10); | 4036 | 0, 0, 10, 10); |
@@ -4035,7 +4039,8 @@ void FluxboxWindow::updateButtons() { | |||
4035 | winbtn->setOnClick(stick_cmd); | 4039 | winbtn->setOnClick(stick_cmd); |
4036 | break; | 4040 | break; |
4037 | case WinButton::SHADE: | 4041 | case WinButton::SHADE: |
4038 | winbtn = new WinButton(*this, winbutton_theme, | 4042 | winbtn = new WinButton(*this, m_button_theme, |
4043 | screen().pressedWinButtonTheme(), | ||
4039 | dir[i], | 4044 | dir[i], |
4040 | frame().titlebar(), | 4045 | frame().titlebar(), |
4041 | 0, 0, 10, 10); | 4046 | 0, 0, 10, 10); |
@@ -4043,7 +4048,8 @@ void FluxboxWindow::updateButtons() { | |||
4043 | winbtn->setOnClick(shade_cmd); | 4048 | winbtn->setOnClick(shade_cmd); |
4044 | break; | 4049 | break; |
4045 | case WinButton::MENUICON: | 4050 | case WinButton::MENUICON: |
4046 | winbtn = new WinButton(*this, winbutton_theme, | 4051 | winbtn = new WinButton(*this, m_button_theme, |
4052 | screen().pressedWinButtonTheme(), | ||
4047 | dir[i], | 4053 | dir[i], |
4048 | frame().titlebar(), | 4054 | frame().titlebar(), |
4049 | 0, 0, 10, 10); | 4055 | 0, 0, 10, 10); |