summaryrefslogtreecommitdiff
path: root/src/WinButtonTheme.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-08 08:50:58 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-08 08:50:58 (GMT)
commit1f01d84c080d607a91eb417efcaf5e500b5f1d7e (patch)
tree979c14aa12abfa6d0fe1aa936a9b1e9effd86a32 /src/WinButtonTheme.cc
parentec3125aeb95a06f08cd4895c5b7c3a8911c1b368 (diff)
downloadfluxbox_lack-1f01d84c080d607a91eb417efcaf5e500b5f1d7e.zip
fluxbox_lack-1f01d84c080d607a91eb417efcaf5e500b5f1d7e.tar.bz2
split WinButtonTheme into multiple themes
Diffstat (limited to 'src/WinButtonTheme.cc')
-rw-r--r--src/WinButtonTheme.cc72
1 files changed, 22 insertions, 50 deletions
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 @@
28#include "FbWinFrameTheme.hh" 28#include "FbWinFrameTheme.hh"
29 29
30WinButtonTheme::WinButtonTheme(int screen_num, 30WinButtonTheme::WinButtonTheme(int screen_num,
31 FbTk::ThemeProxy<FbWinFrameTheme> &frame_theme): 31 const std::string &extra, const std::string &altextra,
32 FbTk::ThemeProxy<FbWinFrameTheme> &frame_theme):
32 FbTk::Theme(screen_num), 33 FbTk::Theme(screen_num),
33 m_close_pm(*this, "window.close.pixmap", "Window.Close.Pixmap"), 34 m_close_pm(*this, "window.close" + extra + ".pixmap",
34 m_close_unfocus_pm(*this, "window.close.unfocus.pixmap", "Window.Close.Unfocus.Pixmap"), 35 "Window.Close" + altextra + ".Pixmap"),
35 m_close_pressed_pm(*this, "window.close.pressed.pixmap", "Window.Close.Pressed.Pixmap"), 36 m_maximize_pm(*this, "window.maximize" + extra + ".pixmap",
36 m_maximize_pm(*this, "window.maximize.pixmap", "Window.Maximize.Pixmap"), 37 "Window.Maximize" + altextra + ".Pixmap"),
37 m_maximize_unfocus_pm(*this, "window.maximize.unfocus.pixmap", "Window.Maximize.Unfocus.pixmap"), 38 m_iconify_pm(*this, "window.iconify" + extra + ".pixmap",
38 m_maximize_pressed_pm(*this, "window.maximize.pressed.pixmap", "Window.Maximize.Pressed.Pixmap"), 39 "Window.Iconify" + altextra + ".Pixmap"),
39 m_iconify_pm(*this, "window.iconify.pixmap", "Window.Iconify.Pixmap"), 40 m_shade_pm(*this, "window.shade" + extra + ".pixmap",
40 m_iconify_unfocus_pm(*this, "window.iconify.unfocus.pixmap", "Window.Iconify.Unfocus.Pixmap"), 41 "Window.Shade" + altextra + ".Pixmap"),
41 m_iconify_pressed_pm(*this, "window.iconify.pressed.pixmap", "Window.Iconify.Pressed.Pixmap"), 42 m_unshade_pm(*this, "window.unshade" + extra + ".pixmap",
42 m_shade_pm(*this, "window.shade.pixmap", "Window.Shade.Pixmap"), 43 "Window.Unshade" + altextra + ".Pixmap"),
43 m_shade_unfocus_pm(*this, "window.shade.unfocus.pixmap", "Window.Shade.Unfocus.Pixmap"), 44 m_menuicon_pm(*this, "window.menuicon" + extra + ".pixmap",
44 m_shade_pressed_pm(*this, "window.shade.pressed.pixmap", "Window.Shade.Pressed.Pixmap"), 45 "Window.MenuIcon" + altextra + ".Pixmap"),
45 m_unshade_pm(*this, "window.unshade.pixmap", "Window.Unshade.Pixmap"), 46 // whoever designed this is going to get hit with a stick
46 m_unshade_unfocus_pm(*this, "window.unshade.unfocus.pixmap", "Window.Unshade.Unfocus.Pixmap"), 47 m_title_pm(*this, "window.title" + (extra.empty() ? std::string(".focus")
47 m_unshade_pressed_pm(*this, "window.unshade.pressed.pixmap", "Window.Unshade.Pressed.Pixmap"), 48 : extra) + ".pixmap",
48 m_menuicon_pm(*this, "window.menuicon.pixmap", "Window.MenuIcon.Pixmap"), 49 "Window.Title" + (extra.empty() ? std::string(".Focus")
49 m_menuicon_unfocus_pm(*this, "window.menuicon.unfocus.pixmap", "Window.MenuIcon.Unfocus.Pixmap"), 50 : altextra) + ".Pixmap"),
50 m_menuicon_pressed_pm(*this, "window.menuicon.pressed.pixmap", "Window.MenuIcon.Pressed.Pixmap"),
51 m_title_focus_pm(*this, "window.title.focus.pixmap", "Window.Title.Focus.Pixmap"),
52 m_title_unfocus_pm(*this, "window.title.unfocus.pixmap", "Window.Title.UnFocus.Pixmap"),
53 m_stick_pm(*this, "window.stick.pixmap", "Window.Stick.Pixmap"), 51 m_stick_pm(*this, "window.stick.pixmap", "Window.Stick.Pixmap"),
54 m_stick_unfocus_pm(*this, "window.stick.unfocus.pixmap", "Window.Stick.Unfocus.Pixmap"), 52 m_stuck_pm(*this, "window.stuck" + extra + ".pixmap",
55 m_stick_pressed_pm(*this, "window.stick.pressed.pixmap", "Window.Stick.Pressed.Pixmap"), 53 "Window.Stuck" + altextra + ".Pixmap"),
56 m_stuck_pm(*this, "window.stuck.pixmap", "Window.Stuck.Pixmap"),
57 m_stuck_unfocus_pm(*this, "window.stuck.unfocus.pixmap", "Window.Stuck.Unfocus.Pixmap"),
58 m_frame_theme(frame_theme) { 54 m_frame_theme(frame_theme) {
59 55
60 FbTk::ThemeManager::instance().loadTheme(*this); 56 FbTk::ThemeManager::instance().loadTheme(*this);
@@ -77,37 +73,13 @@ void WinButtonTheme::reconfigTheme() {
77 73
78 // scale all pixmaps 74 // scale all pixmaps
79 m_close_pm->scale(size, size); 75 m_close_pm->scale(size, size);
80 m_close_unfocus_pm->scale(size, size);
81 m_close_pressed_pm->scale(size, size);
82
83 m_maximize_pm->scale(size, size); 76 m_maximize_pm->scale(size, size);
84 m_maximize_unfocus_pm->scale(size, size);
85 m_maximize_pressed_pm->scale(size, size);
86
87 m_menuicon_pm->scale(size, size); 77 m_menuicon_pm->scale(size, size);
88 m_menuicon_unfocus_pm->scale(size, size);
89 m_menuicon_pressed_pm->scale(size, size);
90
91 m_iconify_pm->scale(size, size); 78 m_iconify_pm->scale(size, size);
92 m_iconify_unfocus_pm->scale(size, size);
93 m_iconify_pressed_pm->scale(size, size);
94
95 m_shade_pm->scale(size, size); 79 m_shade_pm->scale(size, size);
96 m_shade_unfocus_pm->scale(size, size);
97 m_shade_pressed_pm->scale(size, size);
98
99 m_unshade_pm->scale(size, size); 80 m_unshade_pm->scale(size, size);
100 m_unshade_unfocus_pm->scale(size, size); 81 m_title_pm->scale(size, size);
101 m_unshade_pressed_pm->scale(size, size);
102
103 m_title_focus_pm->scale(size, size);
104 m_title_unfocus_pm->scale(size, size);
105
106 m_stick_pm->scale(size, size); 82 m_stick_pm->scale(size, size);
107 m_stick_unfocus_pm->scale(size, size);
108 m_stick_pressed_pm->scale(size, size);
109
110 m_stuck_pm->scale(size, size); 83 m_stuck_pm->scale(size, size);
111 m_stuck_unfocus_pm->scale(size, size);
112} 84}
113 85