aboutsummaryrefslogtreecommitdiff
path: root/src/IconButton.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-04-06 18:50:19 (GMT)
committermarkt <markt>2007-04-06 18:50:19 (GMT)
commit416578138e899f817b875ad55a5252a19aa6cb07 (patch)
treedb2e73774dd6cab38a87e0c636e7cbf3d9a32dac /src/IconButton.cc
parentd4f33533543690f12ad9eea62ea9b634a89340fb (diff)
downloadfluxbox-416578138e899f817b875ad55a5252a19aa6cb07.zip
fluxbox-416578138e899f817b875ad55a5252a19aa6cb07.tar.bz2
more of the same
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r--src/IconButton.cc46
1 files changed, 30 insertions, 16 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc
index 8830b93..5cb47d1 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -115,22 +115,7 @@ void IconButton::setPixmap(bool use) {
115 } 115 }
116} 116}
117 117
118void IconButton::updateBackground() { 118void IconButton::reconfigTheme() {
119 // TODO: this ignores attention state, which isn't in Focusable.hh yet
120 if (m_win.isFocused()) {
121 if (m_focused_pm != 0)
122 setBackgroundPixmap(m_focused_pm);
123 else
124 setBackgroundColor(m_theme.focusedTexture().color());
125 } else {
126 if (m_unfocused_pm != 0)
127 setBackgroundPixmap(m_unfocused_pm);
128 else
129 setBackgroundColor(m_theme.unfocusedTexture().color());
130 }
131}
132
133void IconButton::renderTextures() {
134 119
135 if (m_theme.focusedTexture().usePixmap()) 120 if (m_theme.focusedTexture().usePixmap())
136 m_focused_pm.reset(m_win.screen().imageControl().renderImage( 121 m_focused_pm.reset(m_win.screen().imageControl().renderImage(
@@ -146,6 +131,35 @@ void IconButton::renderTextures() {
146 else 131 else
147 m_unfocused_pm.reset( 0 ); 132 m_unfocused_pm.reset( 0 );
148 133
134 setAlpha(parent()->alpha());
135
136 // TODO: this ignores attention state, which isn't in Focusable.hh yet
137 if (m_win.isFocused()) {
138 if (m_focused_pm != 0)
139 setBackgroundPixmap(m_focused_pm);
140 else
141 setBackgroundColor(m_theme.focusedTexture().color());
142
143 setGC(m_theme.focusedText().textGC());
144 setFont(m_theme.focusedText().font());
145 setJustify(m_theme.focusedText().justify());
146 setBorderWidth(m_theme.focusedBorder().width());
147 setBorderColor(m_theme.focusedBorder().color());
148
149 } else {
150 if (m_unfocused_pm != 0)
151 setBackgroundPixmap(m_unfocused_pm);
152 else
153 setBackgroundColor(m_theme.unfocusedTexture().color());
154
155 setGC(m_theme.unfocusedText().textGC());
156 setFont(m_theme.unfocusedText().font());
157 setJustify(m_theme.unfocusedText().justify());
158 setBorderWidth(m_theme.unfocusedBorder().width());
159 setBorderColor(m_theme.unfocusedBorder().color());
160
161 }
162
149} 163}
150 164
151void IconButton::update(FbTk::Subject *subj) { 165void IconButton::update(FbTk::Subject *subj) {