mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 01:41:23 +02:00
themes: add option to enable frames for message and hint boxes
This commit is contained in:
@@ -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));
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user