- helpbox: bind gradient of separatorline to user's setting

This commit is contained in:
svenhoefer
2016-12-04 00:48:32 +01:00
parent a3b85dd03c
commit 903f2ca74d
2 changed files with 7 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ void Helpbox::addLine(const std::string& icon, const std::string& text, const in
void Helpbox::addSeparatorLine(const int& line_space, const int& line_indent, bool enable_gradient) void Helpbox::addSeparatorLine(const int& line_space, const int& line_indent)
{ {
CComponentsItem *pre_item = !ccw_body->empty() ? ccw_body->back() : NULL; //get the last current item CComponentsItem *pre_item = !ccw_body->empty() ? ccw_body->back() : NULL; //get the last current item
@@ -140,8 +140,11 @@ void Helpbox::addSeparatorLine(const int& line_space, const int& line_indent, bo
CComponentsShapeSquare *sepline = new CComponentsShapeSquare (0, 0, line->getWidth(), 2); CComponentsShapeSquare *sepline = new CComponentsShapeSquare (0, 0, line->getWidth(), 2);
sepline->setYPos(line->getHeight()/2 - sepline->getHeight()/2); sepline->setYPos(line->getHeight()/2 - sepline->getHeight()/2);
sepline->setColorBody(COL_MENUCONTENTINACTIVE_TEXT); sepline->setColorBody(COL_MENUCONTENTINACTIVE_TEXT);
sepline->enableColBodyGradient(enable_gradient); if (g_settings.theme.menu_Separator_gradient_enable)
sepline->setColBodyGradient(CColorGradient::gradientLight2Dark, CFrameBuffer::gradientHorizontal, CColorGradient::light); {
sepline->enableColBodyGradient(true);
sepline->setColBodyGradient(CColorGradient::gradientLight2Dark, CFrameBuffer::gradientHorizontal, CColorGradient::light);
}
line->addCCItem(sepline); line->addCCItem(sepline);

View File

@@ -82,8 +82,7 @@ public:
///arg 'line_indent' defines begin of line from left border within body object. ///arg 'line_indent' defines begin of line from left border within body object.
///arg 'enable_gradient' enable/disable gradient, Note: default = true, but gradient is only effected, if global/theme gradient settings are enabled! ///arg 'enable_gradient' enable/disable gradient, Note: default = true, but gradient is only effected, if global/theme gradient settings are enabled!
void addSeparatorLine( const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT, void addSeparatorLine( const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT,
const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT, const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT);
bool enable_gradient = true);
///adds a simple empty separator as horizontal space, arg 'line_space' defines the space of full separator height ///adds a simple empty separator as horizontal space, arg 'line_space' defines the space of full separator height
void addSeparator( const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT); void addSeparator( const int& line_space = HELPBOX_DEFAULT_LINE_HEIGHT);