diff options
author | Vladimir A. Pavlov <pv4@bk.ru> | 2012-12-07 20:41:34 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2012-12-30 11:27:52 (GMT) |
commit | edcb6d57ce4823616963071cfe4f151eb3880dc1 (patch) | |
tree | 74dc5677870ee66ebca2e6ccbf277dc4a2b5cf27 /src/WinButton.cc | |
parent | c8d0945a8ff595cd3b5015b6a253bb0a9355633c (diff) | |
download | fluxbox_pavel-edcb6d57ce4823616963071cfe4f151eb3880dc1.zip fluxbox_pavel-edcb6d57ce4823616963071cfe4f151eb3880dc1.tar.bz2 |
src/WinButton.{cc,hh}: cosmetic
Diffstat (limited to 'src/WinButton.cc')
-rw-r--r-- | src/WinButton.cc | 54 |
1 files changed, 13 insertions, 41 deletions
diff --git a/src/WinButton.cc b/src/WinButton.cc index ff0ff76..e1b79a2 100644 --- a/src/WinButton.cc +++ b/src/WinButton.cc | |||
@@ -114,60 +114,32 @@ void WinButton::setPressedColor(const FbTk::Color &color) { | |||
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | Pixmap WinButton::getBackgroundPixmap() const { | 117 | Pixmap WinButton::getPixmap(const FbTk::ThemeProxy<WinButtonTheme> &theme) const { |
118 | switch(m_type) { | 118 | switch(m_type) { |
119 | case MAXIMIZE: | 119 | case MAXIMIZE: |
120 | return m_theme->maximizePixmap().pixmap().drawable(); | 120 | return theme->maximizePixmap().pixmap().drawable(); |
121 | break; | ||
122 | case MINIMIZE: | ||
123 | return m_theme->iconifyPixmap().pixmap().drawable(); | ||
124 | break; | ||
125 | case STICK: | ||
126 | if (m_listen_to.isStuck()) | ||
127 | return m_theme->stuckPixmap().pixmap().drawable(); | ||
128 | return m_theme->stickPixmap().pixmap().drawable(); | ||
129 | break; | ||
130 | case CLOSE: | ||
131 | return m_theme->closePixmap().pixmap().drawable(); | ||
132 | break; | ||
133 | case SHADE: | ||
134 | if (m_listen_to.isShaded()) | ||
135 | return m_theme->unshadePixmap().pixmap().drawable(); | ||
136 | return m_theme->shadePixmap().pixmap().drawable(); | ||
137 | break; | ||
138 | case MENUICON: | ||
139 | if (m_icon_pixmap.drawable()) | ||
140 | return m_theme->titlePixmap().pixmap().drawable(); | ||
141 | return m_theme->menuiconPixmap().pixmap().drawable(); | ||
142 | break; | ||
143 | } | ||
144 | return None; | ||
145 | } | ||
146 | |||
147 | Pixmap WinButton::getPressedPixmap() const { | ||
148 | switch(m_type) { | ||
149 | case MAXIMIZE: | ||
150 | return m_pressed_theme->maximizePixmap().pixmap().drawable(); | ||
151 | case MINIMIZE: | 121 | case MINIMIZE: |
152 | return m_pressed_theme->iconifyPixmap().pixmap().drawable(); | 122 | return theme->iconifyPixmap().pixmap().drawable(); |
153 | case STICK: | 123 | case STICK: |
154 | if (m_listen_to.isStuck()) | 124 | if (m_listen_to.isStuck()) |
155 | return m_pressed_theme->stuckPixmap().pixmap().drawable(); | 125 | return theme->stuckPixmap().pixmap().drawable(); |
156 | return m_pressed_theme->stickPixmap().pixmap().drawable(); | 126 | else |
127 | return theme->stickPixmap().pixmap().drawable(); | ||
157 | case CLOSE: | 128 | case CLOSE: |
158 | return m_pressed_theme->closePixmap().pixmap().drawable(); | 129 | return theme->closePixmap().pixmap().drawable(); |
159 | case SHADE: | 130 | case SHADE: |
160 | if (m_listen_to.isShaded()) | 131 | if (m_listen_to.isShaded()) |
161 | return m_pressed_theme->unshadePixmap().pixmap().drawable(); | 132 | return theme->unshadePixmap().pixmap().drawable(); |
162 | else | 133 | else |
163 | return m_pressed_theme->shadePixmap().pixmap().drawable(); | 134 | return theme->shadePixmap().pixmap().drawable(); |
164 | case MENUICON: | 135 | case MENUICON: |
165 | if (m_icon_pixmap.drawable()) | 136 | if (m_icon_pixmap.drawable()) |
166 | return m_theme->titlePixmap().pixmap().drawable(); | 137 | return theme->titlePixmap().pixmap().drawable(); |
167 | else | 138 | else |
168 | return m_pressed_theme->menuiconPixmap().pixmap().drawable(); | 139 | return theme->menuiconPixmap().pixmap().drawable(); |
140 | default: | ||
141 | return None; | ||
169 | } | 142 | } |
170 | return None; | ||
171 | } | 143 | } |
172 | 144 | ||
173 | // clear is used to force this to clear the window (e.g. called from clear()) | 145 | // clear is used to force this to clear the window (e.g. called from clear()) |