mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
- motorcontrol: using CComponentsHeader to paint header
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
#include <gui/motorcontrol.h>
|
#include <gui/motorcontrol.h>
|
||||||
#include <gui/scan_setup.h>
|
#include <gui/scan_setup.h>
|
||||||
#include <gui/color.h>
|
#include <gui/color.h>
|
||||||
|
#include <gui/components/cc_frm.h>
|
||||||
#include <gui/widget/menue.h>
|
#include <gui/widget/menue.h>
|
||||||
#include <gui/widget/messagebox.h>
|
#include <gui/widget/messagebox.h>
|
||||||
#include <system/settings.h>
|
#include <system/settings.h>
|
||||||
@@ -171,7 +172,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
|||||||
|
|
||||||
g_Zapit->tune_TP(TP);
|
g_Zapit->tune_TP(TP);
|
||||||
|
|
||||||
paint();
|
paintHead();
|
||||||
paintMenu();
|
paintMenu();
|
||||||
paintStatus();
|
paintStatus();
|
||||||
|
|
||||||
@@ -595,20 +596,17 @@ void CMotorControl::paintStatus()
|
|||||||
paintSeparator(xpos1, &ypos, width, g_Locale->getText(LOCALE_MOTORCONTROL_SETTINGS));
|
paintSeparator(xpos1, &ypos, width, g_Locale->getText(LOCALE_MOTORCONTROL_SETTINGS));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMotorControl::paint()
|
void CMotorControl::paintHead()
|
||||||
{
|
{
|
||||||
ypos = y;
|
CComponentsHeader header(x, y, width, hheight, LOCALE_MOTORCONTROL_HEAD, NULL /*no header icon*/);
|
||||||
frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
|
header.paint(CC_SAVE_SCREEN_NO);
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + 10, ypos + hheight, width, g_Locale->getText(LOCALE_MOTORCONTROL_HEAD), COL_MENUHEAD, 0, true); // UTF-8
|
|
||||||
frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
|
||||||
|
|
||||||
ypos += hheight + (mheight >> 1) - 10;
|
|
||||||
ypos_menue = ypos;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMotorControl::paintMenu()
|
void CMotorControl::paintMenu()
|
||||||
{
|
{
|
||||||
ypos = ypos_menue;
|
frameBuffer->paintBoxRel(x, y + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);
|
||||||
|
|
||||||
|
ypos = y + hheight + (mheight >> 1) - 10;
|
||||||
|
|
||||||
int xpos1 = x + 10;
|
int xpos1 = x + 10;
|
||||||
int xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("(7/yellow)");
|
int xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth("(7/yellow)");
|
||||||
|
@@ -68,7 +68,7 @@ class CMotorControl : public CMenuTarget
|
|||||||
int satfindpid;
|
int satfindpid;
|
||||||
int lastsnr, lastsig;
|
int lastsnr, lastsig;
|
||||||
CProgressBar *snrscale, *sigscale;
|
CProgressBar *snrscale, *sigscale;
|
||||||
void paint();
|
void paintHead(void);
|
||||||
void paintMenu(void);
|
void paintMenu(void);
|
||||||
void paintStatus(void);
|
void paintStatus(void);
|
||||||
void paintLine(int x, int *y, int width, const char *txt);
|
void paintLine(int x, int *y, int width, const char *txt);
|
||||||
|
Reference in New Issue
Block a user