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:
Michael Liebmann
2013-06-29 11:44:53 +02:00
committed by Thilo Graf
parent 0efd71bc5a
commit a552ac1c82
9 changed files with 38 additions and 13 deletions

View File

@@ -521,8 +521,13 @@ int COsdSetup::showOsdSetup()
mc->setHint("", LOCALE_MENU_HINT_SUBCHANNEL_POS);
osd_menu->addItem(mc);
int oldVolumeSize = g_settings.volume_size;
int res = osd_menu->exec(NULL, "");
if (oldVolumeSize != g_settings.volume_size)
CVolumeHelper::getInstance()->refresh();
delete osd_menu;
return res;
}
@@ -891,6 +896,13 @@ void COsdSetup::showOsdVolumeSetup(CMenuWidget *menu_volume)
mc->setHint("", LOCALE_MENU_HINT_VOLUME_POS);
menu_volume->addItem(mc);
// volume size
int vMin = CVolumeHelper::getInstance()->getVolIconHeight();
g_settings.volume_size = max(g_settings.volume_size, vMin);
CMenuOptionNumberChooser * nc = new CMenuOptionNumberChooser(LOCALE_EXTRA_VOLUME_SIZE, &g_settings.volume_size, true, vMin, 50);
nc->setHint("", LOCALE_MENU_HINT_VOLUME_SIZE);
menu_volume->addItem(nc);
// volume digits
mc = new CMenuOptionChooser(LOCALE_EXTRA_VOLUME_DIGITS, &g_settings.volume_digits, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
mc->setHint("", LOCALE_MENU_HINT_VOLUME_DIGITS);