diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index d381b9b0c..9cc7c79a7 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -528,7 +528,9 @@ fontmenu.infobar Infobar fontmenu.menu Menü fontmenu.scaling Schriftgrössenfaktor fontmenu.scaling_x Horizontal (in %) +fontmenu.scaling_x_hint2 Horizontal (in %) min 50 / max 200 fontmenu.scaling_y Vertikal (in %) +fontmenu.scaling_y_hint2 Vertikal (in %) min 50 / max 200 fontmenu.sizes Schriftgrössen fontsize.channel_num_zap Direktauswahl fontsize.channellist Kanalliste @@ -765,7 +767,7 @@ miscsettings.shutdown_count_hint1 Bitte warten... miscsettings.shutdown_count_hint2 Sie können die Box jetzt ausschalten! miscsettings.shutdown_real Standbymodus miscsettings.shutdown_real_rcdelay Verzögertes Ausschalten -miscsettings.sleeptimer Ausschalten bei Inaktivität (min) +miscsettings.sleeptimer Ausschalten nach Inaktivität miscsettings.sptsmode SPTS-Mode Treiber laden miscsettings.virtual_zap_mode Virtual Zap motorcontrol.calc_positions Positionen (Neu)-Berechne(n)) diff --git a/data/locale/english.locale b/data/locale/english.locale index 981c6e5ef..9218a9ac7 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -528,7 +528,9 @@ fontmenu.infobar Infobar fontmenu.menu Menu fontmenu.scaling Global Font Zoom Factor fontmenu.scaling_x Horizontal (in %) +fontmenu.scaling_x_hint2 Horizontal (in %) min 50 / max 200 fontmenu.scaling_y Vertical (in %) +fontmenu.scaling_y_hint2 Vertical (in %) min 50 / max 200 fontmenu.sizes Font sizes fontsize.channel_num_zap direct selection fontsize.channellist Channellist diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 6ea4aebea..8b24cc8a5 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -118,13 +118,35 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) else if (actionKey == "font_scaling") { int xre = g_settings.screen_xres; int yre = g_settings.screen_yres; - + char val_x[4] = {0}; + char val_y[4] = {0}; + snprintf(val_x,sizeof(val_x), "%03d",g_settings.screen_xres); + snprintf(val_y,sizeof(val_y), "%03d",g_settings.screen_yres); + CMenuWidget fontscale(LOCALE_FONTMENU_HEAD, NEUTRINO_ICON_COLORS); fontscale.addIntroItems(LOCALE_FONTMENU_SCALING); - fontscale.addItem(new CMenuOptionNumberChooser(LOCALE_FONTMENU_SCALING_X, &xre, true, 50, 200)); - fontscale.addItem(new CMenuOptionNumberChooser(LOCALE_FONTMENU_SCALING_Y, &yre, true, 50, 200)); - fontscale.exec(NULL, ""); + CStringInput * xres_count = new CStringInput(LOCALE_FONTMENU_SCALING_X, val_x,50,200, 3, LOCALE_FONTMENU_SCALING, LOCALE_FONTMENU_SCALING_X_HINT2, "0123456789 "); + CMenuForwarder *m_x = new CMenuForwarder(LOCALE_FONTMENU_SCALING_X, true, val_x, xres_count); + + CStringInput * yres_count = new CStringInput(LOCALE_FONTMENU_SCALING_Y, val_y,50,200, 3, LOCALE_FONTMENU_SCALING, LOCALE_FONTMENU_SCALING_Y_HINT2, "0123456789 "); + CMenuForwarder *m_y = new CMenuForwarder(LOCALE_FONTMENU_SCALING_Y, true, val_y, yres_count); + + fontscale.addItem(m_x); + fontscale.addItem(m_y); + fontscale.exec(NULL, ""); + xre = atoi(val_x); + yre = atoi(val_y); + //fallback for min/max bugs ;) + if( xre < 50 || xre > 200 ){ + xre = g_settings.screen_xres; + snprintf(val_x,sizeof(val_x), "%03d",g_settings.screen_xres); + } + if( yre < 50 || yre > 200 ){ + yre = g_settings.screen_yres; + snprintf(val_y,sizeof(val_y), "%03d",g_settings.screen_yres); + } + if (xre != g_settings.screen_xres || yre != g_settings.screen_yres) { printf("[neutrino] new font scale settings x: %d%% y: %d%%\n", xre, yre); g_settings.screen_xres = xre; diff --git a/src/system/locals.h b/src/system/locals.h index d1a0f53b3..bdfa664db 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -555,7 +555,9 @@ typedef enum LOCALE_FONTMENU_MENU, LOCALE_FONTMENU_SCALING, LOCALE_FONTMENU_SCALING_X, + LOCALE_FONTMENU_SCALING_X_HINT2, LOCALE_FONTMENU_SCALING_Y, + LOCALE_FONTMENU_SCALING_Y_HINT2, LOCALE_FONTMENU_SIZES, LOCALE_FONTSIZE_CHANNEL_NUM_ZAP, LOCALE_FONTSIZE_CHANNELLIST, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 49f704918..fd7aa13bd 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -555,7 +555,9 @@ const char * locale_real_names[] = "fontmenu.menu", "fontmenu.scaling", "fontmenu.scaling_x", + "fontmenu.scaling_x_hint2", "fontmenu.scaling_y", + "fontmenu.scaling_y_hint2", "fontmenu.sizes", "fontsize.channel_num_zap", "fontsize.channellist",