mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +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:
@@ -420,6 +420,7 @@ extra.update_dir Lokales Update-Verzeichnis
|
||||
extra.use_gotoxx Benutze gotoXX
|
||||
extra.volume_digits Lautstärkeanzeige Ziffern
|
||||
extra.volume_pos Lautstärkeanzeige
|
||||
extra.volume_size Höhe der Anzeige
|
||||
extra.west Westen
|
||||
extra.zap_cycle Zap nur in Bouquet
|
||||
extra.zapit_fe_timeout Tuning Timeout (1=10ms)
|
||||
@@ -1132,6 +1133,7 @@ menu.hint_video_scart_mode Wählen Sie den Modus des Ausgangssignals für den SC
|
||||
menu.hint_volume Wählen Sie die Anzeigeoptionen für die Lautstärke
|
||||
menu.hint_volume_digits Zifferndarstellung der Lautstärkeanzeige ein- oder ausschalten
|
||||
menu.hint_volume_pos Wählen Sie die Position der Lautstärkeanzeige aus
|
||||
menu.hint_volume_size Wählen Sie die Höhe der Lautstärkeanzeige
|
||||
menu.hint_ytplay Wiedergabe von ausgewählten Youtube Feeds
|
||||
menu.hint_zap_cycle Wählen Sie, ob nur innerhalb des aktiven Bouquets umgeschaltet werden kann
|
||||
menu.next Weiter (Menü zum Beenden)
|
||||
|
@@ -420,6 +420,7 @@ extra.update_dir Local update directory
|
||||
extra.use_gotoxx Use gotoXX
|
||||
extra.volume_digits Volumebar digits
|
||||
extra.volume_pos Volumebar
|
||||
extra.volume_size Height of display
|
||||
extra.west West
|
||||
extra.zap_cycle Zap cycle
|
||||
extra.zapit_fe_timeout Tune timeout (1 = 10 msec)
|
||||
@@ -1135,6 +1136,7 @@ menu.hint_video_scart_mode Select analog output mode for SCART connectors
|
||||
menu.hint_volume Configure Volume GUI options
|
||||
menu.hint_volume_digits Numeric display of the volumebar on/off
|
||||
menu.hint_volume_pos Select volume indicator position
|
||||
menu.hint_volume_size Select volume indicator height
|
||||
menu.hint_ytplay Play selected youtube feeds
|
||||
menu.hint_zap_cycle When swithing channels, stay in current bouquet
|
||||
menu.next Next (press Menu to quit)
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -104,7 +104,7 @@ class CVolumeHelper
|
||||
int x, y, sw, sh;
|
||||
int mute_ax, mute_ay, mute_dx, mute_dy, mute_corrY;
|
||||
int clock_ax, clock_ay, clock_dx, clock_dy, digit_h, digit_offset;
|
||||
int icon_width, digit_width;
|
||||
int icon_width, icon_height, digit_width;
|
||||
int h_spacer, v_spacer;
|
||||
int vol_ay, vol_height;
|
||||
CFrameBuffer *frameBuffer;
|
||||
@@ -122,6 +122,7 @@ class CVolumeHelper
|
||||
Font** vb_font;
|
||||
|
||||
void getSpacer(int *h, int *v) { *h = h_spacer; *v = v_spacer; }
|
||||
int getVolIconHeight() {return icon_height;}
|
||||
void getDimensions(int *_x, int *_y, int *_sw, int *_sh, int *_iw, int *_dw) { *_x = x; *_y = y; *_sw = sw; *_sh = sh; *_iw = icon_width; *_dw = digit_width; }
|
||||
void getMuteIconDimensions(int *_x, int *_y, int *w, int *h) { *_x = mute_ax; *_y = mute_ay+mute_corrY; *w = mute_dx; *h = mute_dy; }
|
||||
void getInfoClockDimensions(int *_x, int *_y, int *w, int *h, int *d_h, int *d_o) { *_x = clock_ax; *_y = clock_ay; *w = clock_dx; *h = clock_dy, *d_h = digit_h, *d_o = digit_offset; }
|
||||
|
@@ -396,6 +396,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.scrambled_message = configfile.getBool("scrambled_message", true );
|
||||
g_settings.volume_pos = configfile.getInt32("volume_pos", CVolumeBar::VOLUMEBAR_POS_TOP_RIGHT );
|
||||
g_settings.volume_digits = configfile.getBool("volume_digits", true);
|
||||
g_settings.volume_size = configfile.getInt32("volume_size", 26 );
|
||||
g_settings.menu_pos = configfile.getInt32("menu_pos", CMenuWidget::MENU_POS_CENTER);
|
||||
g_settings.show_menu_hints = configfile.getBool("show_menu_hints", true);
|
||||
g_settings.infobar_show_sysfs_hdd = configfile.getBool("infobar_show_sysfs_hdd" , true );
|
||||
@@ -877,6 +878,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setBool("scrambled_message" , g_settings.scrambled_message );
|
||||
configfile.setInt32("volume_pos" , g_settings.volume_pos );
|
||||
configfile.setBool("volume_digits", g_settings.volume_digits);
|
||||
configfile.setInt32("volume_size" , g_settings.volume_size);
|
||||
configfile.setInt32("menu_pos" , g_settings.menu_pos);
|
||||
configfile.setBool("show_menu_hints" , g_settings.show_menu_hints);
|
||||
configfile.setInt32("infobar_show_sysfs_hdd" , g_settings.infobar_show_sysfs_hdd );
|
||||
|
@@ -447,6 +447,7 @@ typedef enum
|
||||
LOCALE_EXTRA_USE_GOTOXX,
|
||||
LOCALE_EXTRA_VOLUME_DIGITS,
|
||||
LOCALE_EXTRA_VOLUME_POS,
|
||||
LOCALE_EXTRA_VOLUME_SIZE,
|
||||
LOCALE_EXTRA_WEST,
|
||||
LOCALE_EXTRA_ZAP_CYCLE,
|
||||
LOCALE_EXTRA_ZAPIT_FE_TIMEOUT,
|
||||
@@ -1162,6 +1163,7 @@ typedef enum
|
||||
LOCALE_MENU_HINT_VOLUME,
|
||||
LOCALE_MENU_HINT_VOLUME_DIGITS,
|
||||
LOCALE_MENU_HINT_VOLUME_POS,
|
||||
LOCALE_MENU_HINT_VOLUME_SIZE,
|
||||
LOCALE_MENU_HINT_YTPLAY,
|
||||
LOCALE_MENU_HINT_ZAP_CYCLE,
|
||||
LOCALE_MENU_NEXT,
|
||||
|
@@ -447,6 +447,7 @@ const char * locale_real_names[] =
|
||||
"extra.use_gotoxx",
|
||||
"extra.volume_digits",
|
||||
"extra.volume_pos",
|
||||
"extra.volume_size",
|
||||
"extra.west",
|
||||
"extra.zap_cycle",
|
||||
"extra.zapit_fe_timeout",
|
||||
@@ -1162,6 +1163,7 @@ const char * locale_real_names[] =
|
||||
"menu.hint_volume",
|
||||
"menu.hint_volume_digits",
|
||||
"menu.hint_volume_pos",
|
||||
"menu.hint_volume_size",
|
||||
"menu.hint_ytplay",
|
||||
"menu.hint_zap_cycle",
|
||||
"menu.next",
|
||||
|
@@ -84,6 +84,7 @@ struct SNeutrinoSettings
|
||||
int scrambled_message;
|
||||
int volume_pos;
|
||||
int volume_digits;
|
||||
int volume_size;
|
||||
int show_mute_icon;
|
||||
int menu_pos;
|
||||
int show_menu_hints;
|
||||
|
Reference in New Issue
Block a user