From 6f30f1b2740165eaed864c019fba7d705d88439e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 7 Oct 2016 13:49:55 +0200 Subject: [PATCH] CComponentsFooter: use different select color for button, if count = 1 TODO: should be configurable. Not all theme color combinations have matched contrasts. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b3e7e49592a4e530e8c3efeabb09963258281f92 Author: Thilo Graf Date: 2016-10-07 (Fri, 07 Oct 2016) --- src/gui/components/cc_frm_footer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 39fc6411a..bf7e1bf09 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -347,8 +347,12 @@ void CComponentsFooter::enableButtonBg(bool enable) void CComponentsFooter::setSelectedButton(size_t item_id) { - if (chain) - chain->setSelectedItem(item_id, COL_GREEN, COL_SHADOW_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENT_PLUS_0, 2, 2); + if (chain){ + fb_pixel_t sel_col = COL_MENUCONTENTSELECTED_PLUS_2; + if (chain->size() > 1) + sel_col = COL_MENUCONTENTSELECTED_PLUS_0; //TODO: make it configurable + chain->setSelectedItem(item_id, sel_col, COL_MENUCONTENTSELECTED_PLUS_2, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENT_PLUS_0, 1, 2); + } } int CComponentsFooter::getSelectedButton()