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:
@@ -57,9 +57,19 @@ CVfdControler::CVfdControler(const neutrino_locale_t Name, CChangeObserver* Obse
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
||||
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||
font_info = SNeutrinoSettings::FONT_TYPE_MENU;
|
||||
observer = Observer;
|
||||
name = Name;
|
||||
width = w_max(390, 0);
|
||||
|
||||
// calculate width
|
||||
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);
|
||||
@@ -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)
|
||||
{
|
||||
int startx = 200;
|
||||
int startx = lwidth + 15;
|
||||
char wert[5];
|
||||
|
||||
frameBuffer->paintBoxRel(px + startx, py, 120, mheight, COL_MENUCONTENT_PLUS_0);
|
||||
|
@@ -49,6 +49,8 @@ class CVfdControler : public CMenuTarget
|
||||
int width;
|
||||
int height;
|
||||
int hheight,mheight; // head/menu font height
|
||||
int font_info;
|
||||
int lwidth;
|
||||
|
||||
unsigned char brightness;
|
||||
unsigned char brightnessstandby;
|
||||
|
Reference in New Issue
Block a user