mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user