From 12e0a4b02ecca689464bdcd676adc42617f3eeb6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 2 May 2014 00:32:32 +0200 Subject: [PATCH] CComponentsFooter: apply showButtonContour() after init of labels Function was without effect after adding of button objects, showButtonContour() now changes property explicit for all items, also after their addition to chain. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f7860fed35bff07c83a5545399b2988b2e3da15e Author: Thilo Graf Date: 2014-05-02 (Fri, 02 May 2014) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_footer.cpp | 10 ++++++++++ src/gui/components/cc_frm_footer.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index dacb4574e..8dc11c77b 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -187,3 +187,13 @@ void CComponentsFooter::setButtonLabel(const char *button_icon, const neutrino_l setButtonLabel(button_icon, txt, chain_width, label_width); } + +void CComponentsFooter::showButtonContour(bool show) +{ + btn_contour = show; + if (chain) { + for (size_t i= 0; i< chain->size(); i++) + chain->getCCItem(i)->doPaintBg(btn_contour); + } +} + diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index fcb547616..81eefd1bb 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -91,7 +91,7 @@ class CComponentsFooter : public CComponentsHeader void setButtonLabel(const char *button_icon, const neutrino_locale_t& locale, const int& chain_width = 0, const int& label_width = 0); ///causes show/hide countour of button frame and background, parameter bool show, default= true - void showButtonContour(bool show = true){btn_contour = show;}; + void showButtonContour(bool show = true); ///property: set font for label caption, parameter as font object, value NULL causes usage of dynamic font void setButtonFont(Font* font){ccf_btn_font = font;};