Merge branch 'cst-next' of git://coolstreamtech.de/cst-public-gui-neutrino into ni/cst-next

Conflicts:
	src/gui/themes.cpp


Origin commit data
------------------
Commit: 797dd62e5f
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-17 (Wed, 17 Aug 2016)
This commit is contained in:
vanhofen
2016-08-17 11:45:13 +02:00
2 changed files with 20 additions and 18 deletions

View File

@@ -360,14 +360,6 @@ void CThemes::getTheme(CConfigFile &configfile)
t.menu_Content_inactive_Text_red = configfile.getInt32( "menu_Content_inactive_Text_red", 50 ); t.menu_Content_inactive_Text_red = configfile.getInt32( "menu_Content_inactive_Text_red", 50 );
t.menu_Content_inactive_Text_green = configfile.getInt32( "menu_Content_inactive_Text_green", 50 ); t.menu_Content_inactive_Text_green = configfile.getInt32( "menu_Content_inactive_Text_green", 50 );
t.menu_Content_inactive_Text_blue = configfile.getInt32( "menu_Content_inactive_Text_blue", 50 ); t.menu_Content_inactive_Text_blue = configfile.getInt32( "menu_Content_inactive_Text_blue", 50 );
t.menu_Foot_alpha = configfile.getInt32( "menu_Foot_alpha", 0x08 );
t.menu_Foot_red = configfile.getInt32( "menu_Foot_red", 0x10 );
t.menu_Foot_green = configfile.getInt32( "menu_Foot_green", 0x10 );
t.menu_Foot_blue = configfile.getInt32( "menu_Foot_blue", 0x10 );
t.menu_Foot_Text_alpha = configfile.getInt32( "menu_Foot_Text_alpha", 0x00 );
t.menu_Foot_Text_red = configfile.getInt32( "menu_Foot_Text_red", 0x40 );
t.menu_Foot_Text_green = configfile.getInt32( "menu_Foot_Text_green", 0x40 );
t.menu_Foot_Text_blue = configfile.getInt32( "menu_Foot_Text_blue", 0x40 );
t.menu_Hint_gradient = configfile.getInt32( "menu_Hint_gradient", CC_COLGRAD_COL_B_2_COL_A); t.menu_Hint_gradient = configfile.getInt32( "menu_Hint_gradient", CC_COLGRAD_COL_B_2_COL_A);
t.menu_Hint_gradient_direction = configfile.getInt32( "menu_Hint_gradient_direction", CFrameBuffer::gradientVertical); t.menu_Hint_gradient_direction = configfile.getInt32( "menu_Hint_gradient_direction", CFrameBuffer::gradientVertical);
@@ -379,6 +371,12 @@ void CThemes::getTheme(CConfigFile &configfile)
t.infobar_green = configfile.getInt32( "infobar_green", 0x0c ); t.infobar_green = configfile.getInt32( "infobar_green", 0x0c );
t.infobar_blue = configfile.getInt32( "infobar_blue", 0x0c ); t.infobar_blue = configfile.getInt32( "infobar_blue", 0x0c );
//t.menu_Foot default historically depends on t.infobar
t.menu_Foot_alpha = configfile.getInt32( "menu_Foot_alpha", t.infobar_alpha );
t.menu_Foot_red = configfile.getInt32( "menu_Foot_red", int(t.infobar_red*0.4)+14 );
t.menu_Foot_green = configfile.getInt32( "menu_Foot_green", int(t.infobar_green*0.4)+14 );
t.menu_Foot_blue = configfile.getInt32( "menu_Foot_blue", int(t.infobar_blue*0.4)+14 );
t.infobar_gradient_top = configfile.getInt32( "infobar_gradient_top", CC_COLGRAD_COL_B_2_COL_A ); t.infobar_gradient_top = configfile.getInt32( "infobar_gradient_top", CC_COLGRAD_COL_B_2_COL_A );
t.infobar_gradient_top_direction = configfile.getInt32( "infobar_gradient_top_direction", CFrameBuffer::gradientVertical ); t.infobar_gradient_top_direction = configfile.getInt32( "infobar_gradient_top_direction", CFrameBuffer::gradientVertical );
t.infobar_gradient_body = configfile.getInt32( "infobar_gradient_body", CC_COLGRAD_OFF); t.infobar_gradient_body = configfile.getInt32( "infobar_gradient_body", CC_COLGRAD_OFF);
@@ -395,6 +393,12 @@ void CThemes::getTheme(CConfigFile &configfile)
t.infobar_Text_green = configfile.getInt32( "infobar_Text_green", 0x64 ); t.infobar_Text_green = configfile.getInt32( "infobar_Text_green", 0x64 );
t.infobar_Text_blue = configfile.getInt32( "infobar_Text_blue", 0x64 ); t.infobar_Text_blue = configfile.getInt32( "infobar_Text_blue", 0x64 );
//t.menu_Foot_Text default historically depends on t.infobar_Text
t.menu_Foot_Text_alpha = configfile.getInt32( "menu_Foot_Text_alpha", 0x00 );
t.menu_Foot_Text_red = configfile.getInt32( "menu_Foot_Text_red", int(t.infobar_Text_red*0.6) );
t.menu_Foot_Text_green = configfile.getInt32( "menu_Foot_Text_green", int(t.infobar_Text_green*0.6) );
t.menu_Foot_Text_blue = configfile.getInt32( "menu_Foot_Text_blue", int(t.infobar_Text_blue*0.6) );
t.colored_events_alpha = configfile.getInt32( "colored_events_alpha", 0x00 ); t.colored_events_alpha = configfile.getInt32( "colored_events_alpha", 0x00 );
t.colored_events_red = configfile.getInt32( "colored_events_red", 95 ); t.colored_events_red = configfile.getInt32( "colored_events_red", 95 );
t.colored_events_green = configfile.getInt32( "colored_events_green", 70 ); t.colored_events_green = configfile.getInt32( "colored_events_green", 70 );

View File

@@ -93,24 +93,24 @@ void CUpnpBrowserGui::Init()
topbox.enableFrame(true, 2); topbox.enableFrame(true, 2);
topbox.setCorner(RADIUS_LARGE); topbox.setCorner(RADIUS_LARGE);
topbox.setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUHEAD_PLUS_0, COL_MENUCONTENTDARK_PLUS_0, COL_MENUHEAD_TEXT); topbox.setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0, COL_MENUHEAD_TEXT);
topbox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]); topbox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]);
topbox.enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Head_gradient_direction); topbox.enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Head_gradient_direction);
//topbox.enableShadow(); topbox.enableShadow(CC_SHADOW_ON, -1, true);
infobox.enableFrame(true, 2); infobox.enableFrame(true, 2);
infobox.setCorner(RADIUS_LARGE); infobox.setCorner(RADIUS_LARGE);
infobox.setColorAll(topbox.getColorFrame(), COL_MENUCONTENTDARK_PLUS_0); infobox.setColorAll(topbox.getColorFrame(), COL_MENUCONTENTDARK_PLUS_0);
infobox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU]); infobox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU]);
infobox.enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Hint_gradient_direction); infobox.enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Hint_gradient_direction);
//infobox.enableShadow(); infobox.enableShadow(CC_SHADOW_ON, -1, true);
timebox.enableFrame(true, 2); timebox.enableFrame(true, 2);
timebox.setCorner(RADIUS_LARGE); timebox.setCorner(RADIUS_LARGE);
timebox.setColorAll(infobox.getColorFrame(), infobox.getColorBody()); timebox.setColorAll(infobox.getColorFrame(), infobox.getColorBody());
timebox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU]); timebox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU]);
timebox.enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Hint_gradient_direction); timebox.enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Hint_gradient_direction);
//timebox.enableShadow(); timebox.enableShadow(CC_SHADOW_ON, -1, true);
m_width = m_frameBuffer->getScreenWidthRel(); m_width = m_frameBuffer->getScreenWidthRel();
m_height = m_frameBuffer->getScreenHeightRel(); m_height = m_frameBuffer->getScreenHeightRel();
@@ -136,9 +136,6 @@ void CUpnpBrowserGui::Init()
* - footer * - footer
* INNER_OFFSET * INNER_OFFSET
* infobox/timebox (with shadow) * infobox/timebox (with shadow)
*
* Note: box shadows are disabled atm, so it looks like double offset between boxes
* box shadows seems buggy in ccomponents classes
*/ */
m_listmaxshow = (m_height - m_topbox_height - SHADOW_OFFSET - INNER_OFFSET - m_header_height - m_footer_height - SHADOW_OFFSET - INNER_OFFSET - m_infobox_height - SHADOW_OFFSET) / (m_item_height); m_listmaxshow = (m_height - m_topbox_height - SHADOW_OFFSET - INNER_OFFSET - m_header_height - m_footer_height - SHADOW_OFFSET - INNER_OFFSET - m_infobox_height - SHADOW_OFFSET) / (m_item_height);
@@ -147,6 +144,7 @@ void CUpnpBrowserGui::Init()
m_height = m_topbox_height + SHADOW_OFFSET + INNER_OFFSET + m_header_height + (m_listmaxshow * m_item_height) + m_footer_height + SHADOW_OFFSET + INNER_OFFSET + m_infobox_height + SHADOW_OFFSET; m_height = m_topbox_height + SHADOW_OFFSET + INNER_OFFSET + m_header_height + (m_listmaxshow * m_item_height) + m_footer_height + SHADOW_OFFSET + INNER_OFFSET + m_infobox_height + SHADOW_OFFSET;
footer.setHeight(m_footer_height); footer.setHeight(m_footer_height);
footer.enableShadow(CC_SHADOW_ON, -1, true);
m_x=getScreenStartX(m_width); m_x=getScreenStartX(m_width);
if (m_x < ConnectLineBox_Width) // shouldn't happen if (m_x < ConnectLineBox_Width) // shouldn't happen
@@ -989,6 +987,7 @@ void CUpnpBrowserGui::paintDevices()
// Head // Head
CComponentsHeaderLocalized header(m_x, m_header_y, m_width, m_header_height, LOCALE_UPNPBROWSER_HEAD, NEUTRINO_ICON_UPNP); CComponentsHeaderLocalized header(m_x, m_header_y, m_width, m_header_height, LOCALE_UPNPBROWSER_HEAD, NEUTRINO_ICON_UPNP);
header.enableShadow(CC_SHADOW_RIGHT, -1, true);
if (CNeutrinoApp::getInstance()->isMuted()) //TODO: consider mute mode on runtime if (CNeutrinoApp::getInstance()->isMuted()) //TODO: consider mute mode on runtime
header.addContextButton(NEUTRINO_ICON_BUTTON_MUTE_SMALL); header.addContextButton(NEUTRINO_ICON_BUTTON_MUTE_SMALL);
else else
@@ -1011,10 +1010,9 @@ void CUpnpBrowserGui::paintDevices()
m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); m_frameBuffer->paintBoxRel(m_x + m_width - 13, m_item_y + 2 + sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3);
//shadow //shadow
//m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + SHADOW_OFFSET, SHADOW_OFFSET, sb, COL_SHADOW_PLUS_0); m_frameBuffer->paintBoxRel(m_x + m_width, m_item_y + SHADOW_OFFSET, SHADOW_OFFSET, sb, COL_SHADOW_PLUS_0);
// Foot // Foot
//footer.enableShadow();
footer.paintButtons(m_x, m_footer_y, m_width, m_footer_height, 1, &RescanButton, m_width/2); footer.paintButtons(m_x, m_footer_y, m_width, m_footer_height, 1, &RescanButton, m_width/2);
paintItem2DetailsLine (-1); // clear it paintItem2DetailsLine (-1); // clear it
@@ -1194,7 +1192,7 @@ void CUpnpBrowserGui::paintItems(std::vector<UPnPEntry> *entry, unsigned int sel
// Foot buttons // Foot buttons
size_t numbuttons = sizeof(BrowseButtons)/sizeof(BrowseButtons[0]); size_t numbuttons = sizeof(BrowseButtons)/sizeof(BrowseButtons[0]);
//footer.enableShadow();
footer.paintButtons(m_x, m_footer_y, m_width, m_footer_height, numbuttons, BrowseButtons, m_width/numbuttons); footer.paintButtons(m_x, m_footer_y, m_width, m_footer_height, numbuttons, BrowseButtons, m_width/numbuttons);
} }