mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 18:01:06 +02:00
CVolume: correctly initialize font height / width values
Origin commit data
------------------
Commit: 30ab06762a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-10-31 (Wed, 31 Oct 2012)
This commit is contained in:
@@ -96,10 +96,11 @@ void CVolume::Init()
|
|||||||
sh = frameBuffer->getScreenHeight();
|
sh = frameBuffer->getScreenHeight();
|
||||||
|
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &icon_w, &icon_h);
|
frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &icon_w, &icon_h);
|
||||||
vbar_h = std::max((icon_h * faktor_h) / 10, digit_h+digit_offset);
|
|
||||||
progress_h = icon_h - 2*pB;
|
progress_h = icon_h - 2*pB;
|
||||||
progress_w = 200;
|
progress_w = 200;
|
||||||
vbar_w = spacer + icon_w + spacer + progress_w + spacer;
|
vbar_w = spacer + icon_w + spacer + progress_w + spacer;
|
||||||
|
digit_h = 0;
|
||||||
|
digit_offset = 0;
|
||||||
if (paintDigits) {
|
if (paintDigits) {
|
||||||
digit_w = g_Font[VolumeFont]->getRenderWidth("100");
|
digit_w = g_Font[VolumeFont]->getRenderWidth("100");
|
||||||
digit_offset = g_Font[VolumeFont]->getDigitOffset();
|
digit_offset = g_Font[VolumeFont]->getDigitOffset();
|
||||||
@@ -107,6 +108,7 @@ void CVolume::Init()
|
|||||||
progress_h = std::max(icon_h, digit_h) - 2*pB;
|
progress_h = std::max(icon_h, digit_h) - 2*pB;
|
||||||
vbar_w += digit_w;
|
vbar_w += digit_w;
|
||||||
}
|
}
|
||||||
|
vbar_h = std::max((icon_h * faktor_h) / 10, digit_h+digit_offset);
|
||||||
if (volscale)
|
if (volscale)
|
||||||
delete volscale;
|
delete volscale;
|
||||||
volscale = new CProgressBar(true, progress_w, progress_h, 50, 100, 80, true);
|
volscale = new CProgressBar(true, progress_w, progress_h, 50, 100, 80, true);
|
||||||
|
Reference in New Issue
Block a user