summaryrefslogtreecommitdiff
path: root/src/WinButton.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/WinButton.cc')
-rw-r--r--src/WinButton.cc56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/WinButton.cc b/src/WinButton.cc
index 39540db..5c6c99c 100644
--- a/src/WinButton.cc
+++ b/src/WinButton.cc
@@ -33,7 +33,7 @@
33 33
34 34
35WinButton::WinButton(const FluxboxWindow &listen_to, 35WinButton::WinButton(const FluxboxWindow &listen_to,
36 WinButtonTheme &theme, 36 FbTk::ThemeProxy<WinButtonTheme> &theme,
37 Type buttontype, const FbTk::FbWindow &parent, 37 Type buttontype, const FbTk::FbWindow &parent,
38 int x, int y, 38 int x, int y,
39 unsigned int width, unsigned int height): 39 unsigned int width, unsigned int height):
@@ -112,59 +112,59 @@ Pixmap WinButton::getBackgroundPixmap() const {
112 switch(m_type) { 112 switch(m_type) {
113 case MAXIMIZE: 113 case MAXIMIZE:
114 if (focused) 114 if (focused)
115 return m_theme.maximizePixmap().pixmap().drawable(); 115 return m_theme->maximizePixmap().pixmap().drawable();
116 else 116 else
117 return m_theme.maximizeUnfocusPixmap().pixmap().drawable(); 117 return m_theme->maximizeUnfocusPixmap().pixmap().drawable();
118 break; 118 break;
119 case MINIMIZE: 119 case MINIMIZE:
120 if (focused) 120 if (focused)
121 return m_theme.iconifyPixmap().pixmap().drawable(); 121 return m_theme->iconifyPixmap().pixmap().drawable();
122 else 122 else
123 return m_theme.iconifyUnfocusPixmap().pixmap().drawable(); 123 return m_theme->iconifyUnfocusPixmap().pixmap().drawable();
124 break; 124 break;
125 case STICK: 125 case STICK:
126 if (m_listen_to.isStuck()) { 126 if (m_listen_to.isStuck()) {
127 if (focused) 127 if (focused)
128 return m_theme.stuckPixmap().pixmap().drawable(); 128 return m_theme->stuckPixmap().pixmap().drawable();
129 else 129 else
130 return m_theme.stuckUnfocusPixmap().pixmap().drawable(); 130 return m_theme->stuckUnfocusPixmap().pixmap().drawable();
131 } else { 131 } else {
132 if (focused) 132 if (focused)
133 return m_theme.stickPixmap().pixmap().drawable(); 133 return m_theme->stickPixmap().pixmap().drawable();
134 else 134 else
135 return m_theme.stickUnfocusPixmap().pixmap().drawable(); 135 return m_theme->stickUnfocusPixmap().pixmap().drawable();
136 } 136 }
137 break; 137 break;
138 case CLOSE: 138 case CLOSE:
139 if (focused) 139 if (focused)
140 return m_theme.closePixmap().pixmap().drawable(); 140 return m_theme->closePixmap().pixmap().drawable();
141 else 141 else
142 return m_theme.closeUnfocusPixmap().pixmap().drawable(); 142 return m_theme->closeUnfocusPixmap().pixmap().drawable();
143 break; 143 break;
144 case SHADE: 144 case SHADE:
145 if (m_listen_to.isShaded()) { 145 if (m_listen_to.isShaded()) {
146 if (focused) 146 if (focused)
147 return m_theme.unshadePixmap().pixmap().drawable(); 147 return m_theme->unshadePixmap().pixmap().drawable();
148 else 148 else
149 return m_theme.unshadeUnfocusPixmap().pixmap().drawable(); 149 return m_theme->unshadeUnfocusPixmap().pixmap().drawable();
150 } else { 150 } else {
151 if (focused) 151 if (focused)
152 return m_theme.shadePixmap().pixmap().drawable(); 152 return m_theme->shadePixmap().pixmap().drawable();
153 else 153 else
154 return m_theme.shadeUnfocusPixmap().pixmap().drawable(); 154 return m_theme->shadeUnfocusPixmap().pixmap().drawable();
155 } 155 }
156 break; 156 break;
157 case MENUICON: 157 case MENUICON:
158 if (m_icon_pixmap.drawable()) { 158 if (m_icon_pixmap.drawable()) {
159 if (focused) 159 if (focused)
160 return m_theme.titleFocusPixmap().pixmap().drawable(); 160 return m_theme->titleFocusPixmap().pixmap().drawable();
161 else 161 else
162 return m_theme.titleUnfocusPixmap().pixmap().drawable(); 162 return m_theme->titleUnfocusPixmap().pixmap().drawable();
163 } else { 163 } else {
164 if (focused) 164 if (focused)
165 return m_theme.menuiconPixmap().pixmap().drawable(); 165 return m_theme->menuiconPixmap().pixmap().drawable();
166 else 166 else
167 return m_theme.menuiconUnfocusPixmap().pixmap().drawable(); 167 return m_theme->menuiconUnfocusPixmap().pixmap().drawable();
168 } 168 }
169 break; 169 break;
170 } 170 }
@@ -174,26 +174,26 @@ Pixmap WinButton::getBackgroundPixmap() const {
174Pixmap WinButton::getPressedPixmap() const { 174Pixmap WinButton::getPressedPixmap() const {
175 switch(m_type) { 175 switch(m_type) {
176 case MAXIMIZE: 176 case MAXIMIZE:
177 return m_theme.maximizePressedPixmap().pixmap().drawable(); 177 return m_theme->maximizePressedPixmap().pixmap().drawable();
178 case MINIMIZE: 178 case MINIMIZE:
179 return m_theme.iconifyPressedPixmap().pixmap().drawable(); 179 return m_theme->iconifyPressedPixmap().pixmap().drawable();
180 case STICK: 180 case STICK:
181 return m_theme.stickPressedPixmap().pixmap().drawable(); 181 return m_theme->stickPressedPixmap().pixmap().drawable();
182 case CLOSE: 182 case CLOSE:
183 return m_theme.closePressedPixmap().pixmap().drawable(); 183 return m_theme->closePressedPixmap().pixmap().drawable();
184 case SHADE: 184 case SHADE:
185 if (m_listen_to.isShaded()) 185 if (m_listen_to.isShaded())
186 return m_theme.unshadePressedPixmap().pixmap().drawable(); 186 return m_theme->unshadePressedPixmap().pixmap().drawable();
187 else 187 else
188 return m_theme.shadePressedPixmap().pixmap().drawable(); 188 return m_theme->shadePressedPixmap().pixmap().drawable();
189 case MENUICON: 189 case MENUICON:
190 if (m_icon_pixmap.drawable()) 190 if (m_icon_pixmap.drawable())
191 if (m_listen_to.isFocused()) 191 if (m_listen_to.isFocused())
192 return m_theme.titleFocusPixmap().pixmap().drawable(); 192 return m_theme->titleFocusPixmap().pixmap().drawable();
193 else 193 else
194 return m_theme.titleUnfocusPixmap().pixmap().drawable(); 194 return m_theme->titleUnfocusPixmap().pixmap().drawable();
195 else 195 else
196 return m_theme.menuiconPressedPixmap().pixmap().drawable(); 196 return m_theme->menuiconPressedPixmap().pixmap().drawable();
197 } 197 }
198 return None; 198 return None;
199} 199}