From 2dfeba10f0b5308a0c15cf42c206ad10c28a4dca Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 29 Nov 2016 16:13:47 +0100 Subject: [PATCH] CComponentsFooter: fix wrong text color with single button in footers * remove size compare If only one button exists, possible new text color would be ignored and wrong Text color was visible with one item. This behavior was observed in message boxes with single buttons (eg OK, or Cancel). Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8bf6b7fb3a5203d734ebabbb79dd19b59736322f Author: Thilo Graf Date: 2016-11-29 (Tue, 29 Nov 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_footer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index df899c306..9874a122b 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -362,8 +362,7 @@ void CComponentsFooter::setSelectedButton(size_t item_id, sel_col = sel_fr_col; //TODO: make it configurable chain->setSelectedItem(item_id, sel_col, fr_col, sel_bg_col, bg_col, frame_width, sel_frame_width); - if (chain->size() > 1) - getSelectedButtonObject()->setButtonTextColor(sel_text_col); + getSelectedButtonObject()->setButtonTextColor(sel_text_col); } }