From ec01f884fdaf7893a3664525adbece7ba947c43d Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Wed, 25 Dec 2013 17:30:18 +0100 Subject: [PATCH] CMenuItem: Set right_bgcol as inactiv, when menu item not active --- src/gui/widget/menue.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 81946fcb0..8c0300681 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -160,7 +160,16 @@ void CMenuItem::paintItemCaption(const bool select_mode, const int &item_height, if (right_bgcol) { if (!right_text) stringstartposOption -= 60; - CComponentsShapeSquare col(stringstartposOption, y + 2, dx - stringstartposOption + x - 2, item_height - 4, false, COL_MENUCONTENT_PLUS_6, right_bgcol); + fb_pixel_t right_frame_col, right_bg_col; + if (active) { + right_bg_col = right_bgcol; + right_frame_col = COL_MENUCONTENT_PLUS_6; + } + else { + right_bg_col = COL_MENUCONTENTINACTIVE_TEXT; + right_frame_col = COL_MENUCONTENTINACTIVE_TEXT; + } + CComponentsShapeSquare col(stringstartposOption, y + 2, dx - stringstartposOption + x - 2, item_height - 4, false, right_frame_col, right_bg_col); col.setFrameThickness(3); col.setCorner(RADIUS_LARGE); col.paint(false);