diff options
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r-- | src/IconbarTool.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index f352237..6678d1d 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc | |||
@@ -243,13 +243,14 @@ private: | |||
243 | 243 | ||
244 | }; // end anonymous namespace | 244 | }; // end anonymous namespace |
245 | 245 | ||
246 | IconbarTool::IconbarTool(const FbTk::FbWindow &parent, | 246 | IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, |
247 | FbTk::ThemeProxy<IconbarTheme> &focused_theme, | 247 | FbTk::ThemeProxy<IconbarTheme> &focused_theme, |
248 | FbTk::ThemeProxy<IconbarTheme> &unfocused_theme, | 248 | FbTk::ThemeProxy<IconbarTheme> &unfocused_theme, |
249 | BScreen &screen, FbTk::Menu &menu): | 249 | BScreen &screen, FbTk::Menu &menu): |
250 | ToolbarItem(ToolbarItem::RELATIVE), | 250 | ToolbarItem(ToolbarItem::RELATIVE), |
251 | m_screen(screen), | 251 | m_screen(screen), |
252 | m_icon_container(parent), | 252 | m_icon_container(parent), |
253 | m_theme(theme), | ||
253 | m_focused_theme(focused_theme), | 254 | m_focused_theme(focused_theme), |
254 | m_unfocused_theme(unfocused_theme), | 255 | m_unfocused_theme(unfocused_theme), |
255 | m_empty_pm( screen.imageControl() ), | 256 | m_empty_pm( screen.imageControl() ), |
@@ -290,6 +291,7 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, | |||
290 | menu.insert(m_menu.label(), &m_menu); | 291 | menu.insert(m_menu.label(), &m_menu); |
291 | 292 | ||
292 | // setup signals | 293 | // setup signals |
294 | theme.reconfigSig().attach(this); | ||
293 | focused_theme.reconfigSig().attach(this); | 295 | focused_theme.reconfigSig().attach(this); |
294 | unfocused_theme.reconfigSig().attach(this); | 296 | unfocused_theme.reconfigSig().attach(this); |
295 | setMode(*m_rc_mode); | 297 | setMode(*m_rc_mode); |
@@ -397,7 +399,8 @@ void IconbarTool::update(FbTk::Subject *subj) { | |||
397 | m_icon_container.setMaxSizePerClient(*m_rc_client_width); | 399 | m_icon_container.setMaxSizePerClient(*m_rc_client_width); |
398 | 400 | ||
399 | if (subj == &m_focused_theme.reconfigSig() || | 401 | if (subj == &m_focused_theme.reconfigSig() || |
400 | subj == &m_unfocused_theme.reconfigSig()) { | 402 | subj == &m_unfocused_theme.reconfigSig() || |
403 | subj == &m_theme.reconfigSig()) { | ||
401 | setMode(*m_rc_mode); | 404 | setMode(*m_rc_mode); |
402 | return; | 405 | return; |
403 | } | 406 | } |
@@ -463,7 +466,8 @@ void IconbarTool::reset() { | |||
463 | } | 466 | } |
464 | 467 | ||
465 | void IconbarTool::updateSizing() { | 468 | void IconbarTool::updateSizing() { |
466 | m_icon_container.setBorderWidth(m_focused_theme->border().width()); | 469 | m_icon_container.setBorderWidth(m_theme.border().width()); |
470 | m_icon_container.setBorderColor(m_theme.border().color()); | ||
467 | 471 | ||
468 | IconMap::iterator icon_it = m_icons.begin(); | 472 | IconMap::iterator icon_it = m_icons.begin(); |
469 | const IconMap::iterator icon_it_end = m_icons.end(); | 473 | const IconMap::iterator icon_it_end = m_icons.end(); |
@@ -484,14 +488,14 @@ void IconbarTool::renderTheme() { | |||
484 | updateSizing(); | 488 | updateSizing(); |
485 | 489 | ||
486 | // if we dont have any icons then we should render empty texture | 490 | // if we dont have any icons then we should render empty texture |
487 | if (!m_focused_theme->emptyTexture().usePixmap()) { | 491 | if (!m_theme.emptyTexture().usePixmap()) { |
488 | m_empty_pm.reset( 0 ); | 492 | m_empty_pm.reset( 0 ); |
489 | m_icon_container.setBackgroundColor(m_focused_theme->emptyTexture().color()); | 493 | m_icon_container.setBackgroundColor(m_theme.emptyTexture().color()); |
490 | } else { | 494 | } else { |
491 | m_empty_pm.reset(m_screen.imageControl(). | 495 | m_empty_pm.reset(m_screen.imageControl(). |
492 | renderImage(m_icon_container.width(), | 496 | renderImage(m_icon_container.width(), |
493 | m_icon_container.height(), | 497 | m_icon_container.height(), |
494 | m_focused_theme->emptyTexture(), orientation())); | 498 | m_theme.emptyTexture(), orientation())); |
495 | m_icon_container.setBackgroundPixmap(m_empty_pm); | 499 | m_icon_container.setBackgroundPixmap(m_empty_pm); |
496 | } | 500 | } |
497 | 501 | ||