mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
*neutrino: remove dub code
using class 'CComponentsDetailLine' instead multiple code details line rendering
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
#include <gui/widget/stringinput.h>
|
||||
|
||||
#include <gui/widget/components.h>
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <neutrino_menue.h>
|
||||
@@ -1069,7 +1069,6 @@ void CMenuWidget::paintHint(int pos)
|
||||
return;
|
||||
|
||||
fb_pixel_t col1 = COL_MENUCONTENT_PLUS_6;
|
||||
fb_pixel_t col2 = COL_MENUCONTENT_PLUS_1;
|
||||
int rad = RADIUS_LARGE;
|
||||
|
||||
int xpos = x - ConnectLineBox_Width;
|
||||
@@ -1097,33 +1096,14 @@ printf("paintHint: icon %s text %s\n", item->hintIcon.c_str(), g_Locale->getText
|
||||
|
||||
int iheight = item->getHeight();
|
||||
|
||||
//details line
|
||||
int ypos1 = item->getYPosition();
|
||||
int ypos1a = ypos1 + (iheight/2)-2;
|
||||
int ypos2a = ypos2 + (hint_height/2)-2;
|
||||
|
||||
int markh = hint_height > rad*2 ? hint_height - rad*2 : hint_height;
|
||||
int imarkh = iheight/2+1;
|
||||
int imarkoff = iheight/4;
|
||||
|
||||
/* horizontal item mark - */
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+imarkoff, 4, imarkh, col1);
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos1+imarkoff, 1, imarkh, col2);
|
||||
|
||||
/* horizontal info mark - */
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+rad, 4, markh, col1);
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-4, ypos2+rad, 1 , markh, col2);
|
||||
|
||||
/* vertical connect line [ */
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 3, ypos2a-ypos1a+3, col1);
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16+3, ypos1a+3, 1, ypos2a-ypos1a-3, col2);
|
||||
|
||||
/* vertical item line | */
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos1a, 12, 3, col1);
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16+3, ypos1a+3, 12-3, 1, col2);
|
||||
|
||||
/* vertical info line | */
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a, 12, 3, col1);
|
||||
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-16, ypos2a+3, 12, 1, col2);
|
||||
CComponentsDetailLine details_line(xpos, ypos1a, ypos2a, imarkh, markh);
|
||||
details_line.paint();
|
||||
|
||||
/* box shadow */
|
||||
frameBuffer->paintBoxRel(x+SHADOW_OFFSET, ypos2+SHADOW_OFFSET, width + sb_width, hint_height, COL_MENUCONTENTDARK_PLUS_0, rad);
|
||||
|
Reference in New Issue
Block a user