aboutsummaryrefslogtreecommitdiff
path: root/src/IconButton.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r--src/IconButton.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc
index 5e42e9f..ce89651 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -60,7 +60,8 @@ IconButton::IconButton(const FbTk::FbWindow &parent,
60 m_pm(win.screen().imageControl()) { 60 m_pm(win.screen().imageControl()) {
61 61
62 m_win.titleSig().attach(this); 62 m_win.titleSig().attach(this);
63 m_win.focusSig().attach(this); 63 m_signals.join(m_win.focusSig(),
64 MemFunIgnoreArgs(*this, &IconButton::reconfigAndClear));
64 m_win.attentionSig().attach(this); 65 m_win.attentionSig().attach(this);
65 66
66 FbTk::EventManager::instance()->add(*this, m_icon_window); 67 FbTk::EventManager::instance()->add(*this, m_icon_window);
@@ -169,11 +170,15 @@ void IconButton::reconfigTheme() {
169 170
170} 171}
171 172
173void IconButton::reconfigAndClear() {
174 reconfigTheme();
175 clear();
176}
177
172void IconButton::update(FbTk::Subject *subj) { 178void IconButton::update(FbTk::Subject *subj) {
173 // if the window's focus state changed, we need to update the background 179 // if the window's focus state changed, we need to update the background
174 if (subj == &m_win.focusSig() || subj == &m_win.attentionSig()) { 180 if (subj == &m_win.attentionSig()) {
175 reconfigTheme(); 181 reconfigAndClear();
176 clear();
177 return; 182 return;
178 } 183 }
179 184