mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CComponentsScrollBar: add color gradient to scrollbar
This commit is contained in:
@@ -79,10 +79,10 @@ void CComponentsScrollBar::initVarSbForm(const int& count)
|
|||||||
|
|
||||||
sb_up_obj = sb_down_obj = NULL;
|
sb_up_obj = sb_down_obj = NULL;
|
||||||
sb_segments_obj = NULL;
|
sb_segments_obj = NULL;
|
||||||
sb_up_icon = frameBuffer->getIconBasePath() + NEUTRINO_ICON_BUTTON_TOP;
|
|
||||||
sb_up_icon += ".png";
|
string ftype = ".png";
|
||||||
sb_down_icon = frameBuffer->getIconBasePath() + NEUTRINO_ICON_BUTTON_DOWN;
|
sb_up_icon = frameBuffer->getIconBasePath() + NEUTRINO_ICON_BUTTON_TOP + ftype;
|
||||||
sb_down_icon += ".png";
|
sb_down_icon = frameBuffer->getIconBasePath() + NEUTRINO_ICON_BUTTON_DOWN + ftype;
|
||||||
|
|
||||||
sb_segments_count = count;
|
sb_segments_count = count;
|
||||||
sb_mark_id = 0;
|
sb_mark_id = 0;
|
||||||
@@ -163,10 +163,15 @@ void CComponentsScrollBar::initSegments()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//set color for marked id
|
//set color for marked id
|
||||||
if (sb_mark_id == id)
|
if (sb_mark_id == id){
|
||||||
item->setColorBody(COL_MENUCONTENTSELECTED_PLUS_0);
|
item->setColorBody(COL_MENUCONTENTSELECTED_PLUS_0);
|
||||||
else
|
item->enableColBodyGradient(true);
|
||||||
|
item->setColBodyGradient(CColorGradient::gradientDark2Light2Dark, CFrameBuffer::gradientHorizontal);
|
||||||
|
}
|
||||||
|
else{
|
||||||
item->setColorBody(COL_MENUCONTENT_PLUS_1);
|
item->setColorBody(COL_MENUCONTENT_PLUS_1);
|
||||||
|
item->enableColBodyGradient(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//set corner types
|
//set corner types
|
||||||
|
Reference in New Issue
Block a user