From a7b62abdbe1c4839e2ba5eb25472290a195de1df Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 2 May 2014 16:55:15 +0200 Subject: [PATCH] CComponentsFooter: set color of button frames to button type, default=gray Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/995eff8ffee76cad51d9907ea7cd716859161666 Author: Thilo Graf Date: 2014-05-02 (Fri, 02 May 2014) --- src/gui/components/cc_frm_footer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 8dc11c77b..d5e8abbfa 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -133,6 +133,17 @@ void CComponentsFooter::setButtonLabels(const struct button_label_s * const cont CComponentsButton *btn = new CComponentsButton(0, CC_CENTERED, w_btn_min, height-height/4, content[i].text, content[i].button); btn->setButtonFont(ccf_btn_font); btn->doPaintBg(btn_contour); + + string btn_name = string(content[i].button); + if (btn_name == NEUTRINO_ICON_BUTTON_RED) + btn->setColorFrame(COL_DARK_RED); + if (btn_name == NEUTRINO_ICON_BUTTON_GREEN) + btn->setColorFrame(COL_DARK_GREEN); + if (btn_name == NEUTRINO_ICON_BUTTON_YELLOW) + btn->setColorFrame(COL_OLIVE); + if (btn_name == NEUTRINO_ICON_BUTTON_BLUE) + btn->setColorFrame(COL_DARK_BLUE); + chain->addCCItem(btn); //set x position of next button object