CComponentsScrollBar: add color gradient to scrollbar

This commit is contained in:
2014-09-20 21:35:08 +02:00
committed by [CST] Focus
parent f9147d185a
commit d6bf51a593

View File

@@ -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