CComponentsFooter: add parameter for frame width for selected buttons

Frame width was hard coded.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 696989dcf1
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-20 (Sun, 20 Nov 2016)



------------------
This commit was generated by Migit
This commit is contained in:
2016-11-20 01:33:34 +01:00
parent c3ffba3c24
commit 9c47a80d3d
2 changed files with 14 additions and 3 deletions

View File

@@ -345,7 +345,12 @@ void CComponentsFooter::enableButtonBg(bool enable)
}
}
void CComponentsFooter::setSelectedButton(size_t item_id, const fb_pixel_t& fr_col, const fb_pixel_t& sel_fr_col, const fb_pixel_t& bg_col, const fb_pixel_t& sel_bg_col, const fb_pixel_t& text_col, const fb_pixel_t& sel_text_col)
void CComponentsFooter::setSelectedButton(size_t item_id,
const fb_pixel_t& fr_col, const fb_pixel_t& sel_fr_col,
const fb_pixel_t& bg_col, const fb_pixel_t& sel_bg_col,
const fb_pixel_t& text_col, const fb_pixel_t& sel_text_col,
const int& frame_width,
const int& sel_frame_width)
{
if (chain){
for (size_t i= 0; i< chain->size(); i++){
@@ -355,7 +360,7 @@ void CComponentsFooter::setSelectedButton(size_t item_id, const fb_pixel_t& fr_c
fb_pixel_t sel_col = fr_col;
if (chain->size() > 1)
sel_col = sel_fr_col; //TODO: make it configurable
chain->setSelectedItem(item_id, sel_col, fr_col, sel_bg_col, bg_col, 1, 2);
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);