diff options
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r-- | src/Toolbar.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 0292b87..f23e124 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -51,6 +51,7 @@ | |||
51 | #include "FbTk/IntMenuItem.hh" | 51 | #include "FbTk/IntMenuItem.hh" |
52 | #include "FbTk/Shape.hh" | 52 | #include "FbTk/Shape.hh" |
53 | #include "FbTk/SimpleObserver.hh" | 53 | #include "FbTk/SimpleObserver.hh" |
54 | #include "FbTk/MemFun.hh" | ||
54 | 55 | ||
55 | // use GNU extensions | 56 | // use GNU extensions |
56 | #ifndef _GNU_SOURCE | 57 | #ifndef _GNU_SOURCE |
@@ -253,8 +254,10 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width): | |||
253 | m_observers.push_back(makeObserver(*this, &Toolbar::reconfigure)); | 254 | m_observers.push_back(makeObserver(*this, &Toolbar::reconfigure)); |
254 | m_theme.reconfigSig().attach(m_observers.back()); | 255 | m_theme.reconfigSig().attach(m_observers.back()); |
255 | screen().reconfigureSig().attach(m_observers.back()); // get this on antialias change | 256 | screen().reconfigureSig().attach(m_observers.back()); // get this on antialias change |
257 | |||
256 | // listen to screen size changes | 258 | // listen to screen size changes |
257 | screen().resizeSig().attach(m_observers.back()); | 259 | m_signal_tracker.join(screen().resizeSig(), |
260 | FbTk::MemFun(*this, &Toolbar::screenChanged)); | ||
258 | 261 | ||
259 | 262 | ||
260 | moveToLayer((*m_rc_layernum).getNum()); | 263 | moveToLayer((*m_rc_layernum).getNum()); |
@@ -380,6 +383,10 @@ void Toolbar::lower() { | |||
380 | m_layeritem.lower(); | 383 | m_layeritem.lower(); |
381 | } | 384 | } |
382 | 385 | ||
386 | void Toolbar::screenChanged(BScreen &screen) { | ||
387 | reconfigure(); | ||
388 | } | ||
389 | |||
383 | void Toolbar::reconfigure() { | 390 | void Toolbar::reconfigure() { |
384 | 391 | ||
385 | updateVisibleState(); | 392 | updateVisibleState(); |