aboutsummaryrefslogtreecommitdiff
path: root/src/IconButton.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-05 01:39:19 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-05 01:39:19 (GMT)
commitac1bd7e0981222bf340ce7defb2bb8307d42a0a2 (patch)
treec8fb9c618184e7ac44f6138409cab3fab86b23e4 /src/IconButton.cc
parent60ba709c2f47cc2c7b877aef1b0f297b097853e5 (diff)
downloadfluxbox-ac1bd7e0981222bf340ce7defb2bb8307d42a0a2.zip
fluxbox-ac1bd7e0981222bf340ce7defb2bb8307d42a0a2.tar.bz2
update code to use ThemeProxy
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r--src/IconButton.cc38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc
index 456312b..d64e23c 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -46,9 +46,9 @@
46#endif // SHAPE 46#endif // SHAPE
47 47
48 48
49IconButton::IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme, 49IconButton::IconButton(const FbTk::FbWindow &parent,
50 Focusable &win): 50 FbTk::ThemeProxy<IconbarTheme> &theme, Focusable &win):
51 FbTk::TextButton(parent, theme.focusedText().font(), win.title()), 51 FbTk::TextButton(parent, theme->focusedText().font(), win.title()),
52 m_win(win), 52 m_win(win),
53 m_icon_window(*this, 1, 1, 1, 1, 53 m_icon_window(*this, 1, 1, 1, 1,
54 ExposureMask | ButtonPressMask | ButtonReleaseMask), 54 ExposureMask | ButtonPressMask | ButtonReleaseMask),
@@ -118,16 +118,16 @@ void IconButton::setPixmap(bool use) {
118 118
119void IconButton::reconfigTheme() { 119void IconButton::reconfigTheme() {
120 120
121 if (m_theme.focusedTexture().usePixmap()) 121 if (m_theme->focusedTexture().usePixmap())
122 m_focused_pm.reset(m_win.screen().imageControl().renderImage( 122 m_focused_pm.reset(m_win.screen().imageControl().renderImage(
123 width(), height(), m_theme.focusedTexture(), 123 width(), height(), m_theme->focusedTexture(),
124 orientation())); 124 orientation()));
125 else 125 else
126 m_focused_pm.reset(0); 126 m_focused_pm.reset(0);
127 127
128 if (m_theme.unfocusedTexture().usePixmap()) 128 if (m_theme->unfocusedTexture().usePixmap())
129 m_unfocused_pm.reset(m_win.screen().imageControl().renderImage( 129 m_unfocused_pm.reset(m_win.screen().imageControl().renderImage(
130 width(), height(), m_theme.unfocusedTexture(), 130 width(), height(), m_theme->unfocusedTexture(),
131 orientation())); 131 orientation()));
132 else 132 else
133 m_unfocused_pm.reset(0); 133 m_unfocused_pm.reset(0);
@@ -138,25 +138,25 @@ void IconButton::reconfigTheme() {
138 if (m_focused_pm != 0) 138 if (m_focused_pm != 0)
139 setBackgroundPixmap(m_focused_pm); 139 setBackgroundPixmap(m_focused_pm);
140 else 140 else
141 setBackgroundColor(m_theme.focusedTexture().color()); 141 setBackgroundColor(m_theme->focusedTexture().color());
142 142
143 setGC(m_theme.focusedText().textGC()); 143 setGC(m_theme->focusedText().textGC());
144 setFont(m_theme.focusedText().font()); 144 setFont(m_theme->focusedText().font());
145 setJustify(m_theme.focusedText().justify()); 145 setJustify(m_theme->focusedText().justify());
146 setBorderWidth(m_theme.focusedBorder().width()); 146 setBorderWidth(m_theme->focusedBorder().width());
147 setBorderColor(m_theme.focusedBorder().color()); 147 setBorderColor(m_theme->focusedBorder().color());
148 148
149 } else { 149 } else {
150 if (m_unfocused_pm != 0) 150 if (m_unfocused_pm != 0)
151 setBackgroundPixmap(m_unfocused_pm); 151 setBackgroundPixmap(m_unfocused_pm);
152 else 152 else
153 setBackgroundColor(m_theme.unfocusedTexture().color()); 153 setBackgroundColor(m_theme->unfocusedTexture().color());
154 154
155 setGC(m_theme.unfocusedText().textGC()); 155 setGC(m_theme->unfocusedText().textGC());
156 setFont(m_theme.unfocusedText().font()); 156 setFont(m_theme->unfocusedText().font());
157 setJustify(m_theme.unfocusedText().justify()); 157 setJustify(m_theme->unfocusedText().justify());
158 setBorderWidth(m_theme.unfocusedBorder().width()); 158 setBorderWidth(m_theme->unfocusedBorder().width());
159 setBorderColor(m_theme.unfocusedBorder().color()); 159 setBorderColor(m_theme->unfocusedBorder().color());
160 160
161 } 161 }
162 162