mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
CComponentsFooter: optimize select buttons, try to assign better contrast
Now it's possible to set parameters for frames and text. Parameters are prdefined for better contrasts in select or default mode. TODO: background modes have no effects at the moment. Here are other things need to be done.
This commit is contained in:
@@ -345,13 +345,20 @@ void CComponentsFooter::enableButtonBg(bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
void CComponentsFooter::setSelectedButton(size_t item_id)
|
||||
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)
|
||||
{
|
||||
if (chain){
|
||||
fb_pixel_t sel_col = COL_MENUCONTENTSELECTED_PLUS_2;
|
||||
for (size_t i= 0; i< chain->size(); i++){
|
||||
CComponentsButton *btn = static_cast<CComponentsButton*>(chain->getCCItem(i));
|
||||
btn->setButtonTextColor(text_col);
|
||||
}
|
||||
fb_pixel_t sel_col = fr_col;
|
||||
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);
|
||||
sel_col = sel_fr_col; //TODO: make it configurable
|
||||
chain->setSelectedItem(item_id, sel_col, fr_col, sel_bg_col, bg_col, 1, 2);
|
||||
|
||||
if (chain->size() > 1)
|
||||
getSelectedButtonObject()->setButtonTextColor(sel_text_col);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user