mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CComponentsFooter: add parameter for frame width for selected buttons
Frame width was hard coded.
This commit is contained in:
@@ -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);
|
||||
|
@@ -152,6 +152,10 @@ class CComponentsFooter : public CComponentsHeader
|
||||
* @li optional: exepts type fb_pixel_t, as default text color
|
||||
* @param[in] sel_text_col
|
||||
* @li optional: exepts type fb_pixel_t, as selected text color
|
||||
* @param[in] frame_width
|
||||
* @li optional: exepts type int, default = 1
|
||||
* @param[in] sel_frame_width
|
||||
* @li optional: exepts type int, default = 2
|
||||
*/
|
||||
void setSelectedButton(size_t item_id,
|
||||
const fb_pixel_t& fr_col = COL_MENUCONTENTSELECTED_PLUS_2,
|
||||
@@ -159,7 +163,9 @@ class CComponentsFooter : public CComponentsHeader
|
||||
const fb_pixel_t& bg_col = COL_MENUFOOT_PLUS_0, /*TODO disabled at the moment, without effect*/
|
||||
const fb_pixel_t& sel_bg_col = COL_MENUCONTENTSELECTED_PLUS_2, /*TODO disabled at the moment, without effect*/
|
||||
const fb_pixel_t& text_col = COL_MENUCONTENTDARK_TEXT_PLUS_2,
|
||||
const fb_pixel_t& sel_text_col = COL_MENUCONTENT_TEXT);
|
||||
const fb_pixel_t& sel_text_col = COL_MENUCONTENT_TEXT,
|
||||
const int& frame_width = 1,
|
||||
const int& sel_frame_width = 2);
|
||||
///returns id of select button, return value as int, -1 = nothing is selected
|
||||
int getSelectedButton();
|
||||
///returns selected button object, return value as pointer to object, NULL means nothing is selected
|
||||
|
Reference in New Issue
Block a user