mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
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: a9a1c5dd68
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-09-15 (Sun, 15 Sep 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <gui/components/cc_frm.h>
|
||||
#include <gui/widget/stringinput.h>
|
||||
|
||||
#include <gui/components/cc_item_shapes.h>
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <neutrino_menue.h>
|
||||
@@ -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);
|
||||
|
Reference in New Issue
Block a user