mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- scale with fontsize
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@359 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -54,15 +54,25 @@
|
|||||||
|
|
||||||
CVfdControler::CVfdControler(const neutrino_locale_t Name, CChangeObserver* Observer)
|
CVfdControler::CVfdControler(const neutrino_locale_t Name, CChangeObserver* Observer)
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
||||||
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||||
observer = Observer;
|
font_info = SNeutrinoSettings::FONT_TYPE_MENU;
|
||||||
name = Name;
|
observer = Observer;
|
||||||
width = w_max(390, 0);
|
name = Name;
|
||||||
height = h_max(hheight+ mheight* 3+ +mheight/2, 0);
|
|
||||||
x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth()-width) >> 1);
|
// calculate width
|
||||||
y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight()-height)>>1);
|
lwidth = g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_LCDCONTROLER_BRIGHTNESSSTANDBY));
|
||||||
|
int tmpwidth = g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_LCDCONTROLER_BRIGHTNESS));
|
||||||
|
|
||||||
|
if (tmpwidth > lwidth) {
|
||||||
|
lwidth = tmpwidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
width = w_max((210 + lwidth), 0); // fixme: get rid of hardcoded 210 (slider + slidertext)
|
||||||
|
height = h_max(hheight+ mheight* 3+ +mheight/2, 0);
|
||||||
|
x = frameBuffer->getScreenX() + ((frameBuffer->getScreenWidth()-width) >> 1);
|
||||||
|
y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight()-height)>>1);
|
||||||
|
|
||||||
brightness = CVFD::getInstance()->getBrightness();
|
brightness = CVFD::getInstance()->getBrightness();
|
||||||
brightnessstandby = CVFD::getInstance()->getBrightnessStandby();
|
brightnessstandby = CVFD::getInstance()->getBrightnessStandby();
|
||||||
@@ -257,7 +267,7 @@ void CVfdControler::paint()
|
|||||||
|
|
||||||
void CVfdControler::paintSlider(int px, int py, unsigned int spos, float factor, const neutrino_locale_t text, bool selected)
|
void CVfdControler::paintSlider(int px, int py, unsigned int spos, float factor, const neutrino_locale_t text, bool selected)
|
||||||
{
|
{
|
||||||
int startx = 200;
|
int startx = lwidth + 15;
|
||||||
char wert[5];
|
char wert[5];
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(px + startx, py, 120, mheight, COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel(px + startx, py, 120, mheight, COL_MENUCONTENT_PLUS_0);
|
||||||
|
@@ -49,6 +49,8 @@ class CVfdControler : public CMenuTarget
|
|||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
int hheight,mheight; // head/menu font height
|
int hheight,mheight; // head/menu font height
|
||||||
|
int font_info;
|
||||||
|
int lwidth;
|
||||||
|
|
||||||
unsigned char brightness;
|
unsigned char brightness;
|
||||||
unsigned char brightnessstandby;
|
unsigned char brightnessstandby;
|
||||||
|
Reference in New Issue
Block a user