From dd48e6d5cc3e3a81e9c1c202016ce3766acf690c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 15 Sep 2013 18:15:10 +0200 Subject: [PATCH] CMenuItem: use CComponentsShapeSquare to paint color sector This is only a partial solution. CMenuItem class can principle completely be implemented with cc-items or cc-Forms. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a9a1c5dd68302ce05d21335b5eacc0eaa39cd368 Author: Thilo Graf Date: 2013-09-15 (Sun, 15 Sep 2013) ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 6ed07b16b..3332192c4 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -35,7 +35,7 @@ #include #include - +#include #include #include #include @@ -161,8 +161,10 @@ void CMenuItem::paintItemCaption(const bool select_mode, const int &item_height, if (right_bgcol) { if (!right_text) stringstartposOption -= 60; - CFrameBuffer::getInstance()->paintBoxRel(stringstartposOption, y + 1, dx - stringstartposOption + x - 1, item_height - 2, right_bgcol, RADIUS_LARGE); - CFrameBuffer::getInstance()->paintBoxFrame(stringstartposOption, y + 1, dx - stringstartposOption + x - 1, item_height - 2, 1, COL_MENUCONTENT_PLUS_6, RADIUS_LARGE); + CComponentsShapeSquare col(stringstartposOption, y + 2, dx - stringstartposOption + x - 2, item_height - 4, false, COL_MENUCONTENT_PLUS_6, right_bgcol); + col.setFrameThickness(3); + col.setCorner(RADIUS_LARGE); + col.paint(false); } if (right_text) g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposOption, y+item_height,dx- (stringstartposOption- x), right_text, item_color, 0, true);