themes: add option to enable frames for message and hint boxes

This commit is contained in:
2019-10-27 16:24:47 +01:00
parent 9234f67d98
commit 52e8737d2d
14 changed files with 29 additions and 2 deletions

View File

@@ -1596,6 +1596,8 @@ menu.hint_ytplay Wiedergabe von ausgewählten YouTube Feeds
menu.hint_ytplay_setup Konfigurieren Sie YouTube-spezifische Optionen wie maximale Ergebnisse bei Suchen oder Cache-Verzeichnis
menu.hint_zap_cycle Wählen Sie, ob nur innerhalb des aktiven Bouquets umgeschaltet werden kann
menu.next Weiter
message.frame_enable Rahmen für Meldungen und Hinweisfenster
message.frame_enable_hint Aktivieren von Rahmen für Meldungen und Hinweisfenster.
messagebox.back Zurück
messagebox.cancel Abbruch
messagebox.discard Wollen Sie die Änderungen verwerfen?

View File

@@ -1596,6 +1596,8 @@ menu.hint_ytplay Play selected YouTube feeds
menu.hint_ytplay_setup Configure YouTube-specific options, e.g. an upper limit for search results
menu.hint_zap_cycle When swithing channels, stay in current bouquet
menu.next Next
message.frame_enable Message and hint box frames
message.frame_enable_hint Enable frames around message and hint boxes.
messagebox.back Back
messagebox.cancel Cancel
messagebox.discard Discard changes?

View File

@@ -8,6 +8,7 @@ colored_events_channellist=1
colored_events_green=50
colored_events_infobar=2
colored_events_red=80
message_frame_enable=1
infobar_Text_alpha=0
infobar_Text_blue=80
infobar_Text_green=80

View File

@@ -51,5 +51,6 @@ menu_Head_green=20
menu_Head_red=15
menu_Hint_gradient=0
menu_Head_gradient=0
message_frame_enable=1
infobar_gradient_top=0
infobar_gradient_bottom=0

View File

@@ -48,5 +48,6 @@ menu_Head_green=0
menu_Head_red=0
menu_Hint_gradient=0
menu_Head_gradient=0
message_frame_enable=1
infobar_gradient_top=0
infobar_gradient_bottom=0

View File

@@ -8,6 +8,7 @@ colored_events_channellist=2
colored_events_green=70
colored_events_infobar=2
colored_events_red=95
message_frame_enable=1
infobar_Text_alpha=0
infobar_Text_blue=100
infobar_Text_green=100

View File

@@ -8,6 +8,7 @@ colored_events_channellist=2
colored_events_green=46
colored_events_infobar=2
colored_events_red=27
message_frame_enable=1
infobar_Text_alpha=0
infobar_Text_blue=18
infobar_Text_green=20

View File

@@ -1012,6 +1012,11 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
oj->setHint("", LOCALE_MENU_HINT_COLOR_GRADIENT_SEPARATOR_ENABLE);
menu_colors->addItem(oj);
// message frame
oj = new CMenuOptionChooser(LOCALE_MESSAGE_FRAME_ENABLE, &g_settings.theme.message_frame_enable, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
oj->setHint("", LOCALE_MESSAGE_FRAME_ENABLE_HINT);
menu_colors->addItem(oj);
// round corners
oj = new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &g_settings.theme.rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this);
oj->OnAfterChangeOption.connect(sigc::mem_fun(menu_colors, &CMenuWidget::hide));

View File

@@ -393,6 +393,9 @@ void CThemes::setTheme(CConfigFile &configfile)
// corners
configfile.setInt32( "rounded_corners", t.rounded_corners);
// message frames
configfile.setInt32( "message_frame_enable", t.message_frame_enable);
}
void CThemes::getTheme(CConfigFile &configfile)
@@ -513,6 +516,9 @@ void CThemes::getTheme(CConfigFile &configfile)
// corners
t.rounded_corners = configfile.getInt32( "rounded_corners", 0);
// message frames
t.message_frame_enable = configfile.getInt32( "message_frame_enable", 0);
if (g_settings.theme_name.empty())
applyDefaultTheme();
}

View File

@@ -37,6 +37,7 @@
#include <gui/components/cc_timer.h>
#include <driver/fontrenderer.h>
#include <system/debug.h>
#include <system/settings.h>
#define MSG_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MESSAGE_TEXT]
@@ -164,7 +165,7 @@ void CHintBox::init( const std::string& Text,
col_frame = color_frame;
col_body = color_body;
col_shadow = color_shadow;
fr_thickness = frame_width;
fr_thickness = g_settings.theme.message_frame_enable ? frame_width : 0;
hb_font = MSG_FONT;

View File

@@ -34,6 +34,7 @@
#include "msgbox.h"
#include <system/debug.h>
#include <system/settings.h>
#define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX )
#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40)
@@ -104,7 +105,7 @@ void CMsgBox::init( const int& Height,
col_frame = color_frame;
col_body = color_body;
col_shadow = color_shadow;
fr_thickness = frame_width;
fr_thickness = g_settings.theme.message_frame_enable ? frame_width : 0;
//enable footer and add its height
showFooter(true);

View File

@@ -1623,6 +1623,8 @@ typedef enum
LOCALE_MENU_HINT_YTPLAY_SETUP,
LOCALE_MENU_HINT_ZAP_CYCLE,
LOCALE_MENU_NEXT,
LOCALE_MESSAGE_FRAME_ENABLE,
LOCALE_MESSAGE_FRAME_ENABLE_HINT,
LOCALE_MESSAGEBOX_BACK,
LOCALE_MESSAGEBOX_CANCEL,
LOCALE_MESSAGEBOX_DISCARD,

View File

@@ -1623,6 +1623,8 @@ const char * locale_real_names[] =
"menu.hint_ytplay_setup",
"menu.hint_zap_cycle",
"menu.next",
"message.frame_enable",
"message.frame_enable_hint",
"messagebox.back",
"messagebox.cancel",
"messagebox.discard",

View File

@@ -175,6 +175,7 @@ struct SNeutrinoTheme
unsigned char progressbar_passive_blue;
int rounded_corners;
int message_frame_enable;
};
struct timer_remotebox_item