mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 02:11:04 +02:00
Add option to resize the VolumeBar
- Minimum height: Height of NEUTRINO_ICON_VOLUME + 2 pixels
- Maximum height: 50 pixels
- Setting can be changed with:
Menu -> Settings -> OSD -> Volume -> Height of display
Origin commit data
------------------
Branch: ni/coolstream
Commit: 0a0035c2ae
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-06-29 (Sat, 29 Jun 2013)
Origin message was:
------------------
Add option to resize the VolumeBar
- Minimum height: Height of NEUTRINO_ICON_VOLUME + 2 pixels
- Maximum height: 50 pixels
- Setting can be changed with:
Menu -> Settings -> OSD -> Volume -> Height of display
------------------
This commit was generated by Migit
This commit is contained in:
@@ -320,23 +320,24 @@ void CVolumeHelper::initMuteIcon()
|
||||
|
||||
void CVolumeHelper::initVolBarSize()
|
||||
{
|
||||
vol_height = 26;
|
||||
icon_width = 0;
|
||||
digit_width = 0;
|
||||
int tmp_h = 0;
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &icon_width, &tmp_h);
|
||||
tmp_h += 2;
|
||||
icon_width += 8;
|
||||
vol_height = max(vol_height, tmp_h);
|
||||
icon_width = 0;
|
||||
icon_height = 0;
|
||||
digit_width = 0;
|
||||
frameBuffer->getIconSize(NEUTRINO_ICON_VOLUME, &icon_width, &icon_height);
|
||||
icon_height = max(icon_height, 16); // if no icon available
|
||||
icon_height += 2;
|
||||
icon_width += 8;
|
||||
g_settings.volume_size = max(g_settings.volume_size, icon_height);
|
||||
vol_height = g_settings.volume_size;
|
||||
|
||||
if (g_settings.volume_digits) {
|
||||
CNeutrinoFonts *cnf = CNeutrinoFonts::getInstance();
|
||||
cnf->setFontUseDigitHeight(true);
|
||||
tmp_h = vol_height;
|
||||
digit_width = 200;
|
||||
vb_font = cnf->getDynFont(digit_width, tmp_h, "100", CNeutrinoFonts::FONT_STYLE_REGULAR);
|
||||
int tmp_h = vol_height;
|
||||
digit_width = 0;
|
||||
vb_font = cnf->getDynFont(digit_width, tmp_h, "100", CNeutrinoFonts::FONT_STYLE_REGULAR, CNeutrinoFonts::FONT_ID_VOLBAR);
|
||||
digit_width += 6;
|
||||
vol_height = max(vol_height, tmp_h);
|
||||
vol_height = max(vol_height, tmp_h);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user