From c9f0b15a1ddeafef0ab2312f4fc31b540f97fc6c Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 22 Aug 2016 04:25:33 +0200 Subject: [PATCH 1/7] Complete missing lua api versions: - colors: some internal renamings (78230ea) v1.40 - colors: make footer background color configurable (70abfb3) v1.41 - luainstance: add missing entry for shadow color (832649c) v1.42 - cc_text: if dx and dy is not set and text have parent use Height (5ac8d00) v1.43 - cc_window: dont paint over screen size (46b77c7) v1.44 - cpicture: Add getHeight/getWidth option (7e874dd) v1.45 - cpicture: Add setDimensionsAll option (fcfb4c4) v1.46 - Set Lua api version to 1.46 See also neutrino-hd wiki: https://wiki.neutrino-hd.de/wiki/Neutrino_HD_Lua_API#Changelog Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c990411575812689b988e3bb6418d64550b5f763 Author: Michael Liebmann Date: 2016-08-22 (Mon, 22 Aug 2016) Origin message was: ------------------ Complete missing lua api versions: - colors: some internal renamings (78230ea) v1.40 - colors: make footer background color configurable (70abfb3) v1.41 - luainstance: add missing entry for shadow color (832649c) v1.42 - cc_text: if dx and dy is not set and text have parent use Height (5ac8d00) v1.43 - cc_window: dont paint over screen size (46b77c7) v1.44 - cpicture: Add getHeight/getWidth option (7e874dd) v1.45 - cpicture: Add setDimensionsAll option (fcfb4c4) v1.46 - Set Lua api version to 1.46 See also neutrino-hd wiki: https://wiki.neutrino-hd.de/wiki/Neutrino_HD_Lua_API#Changelog --- src/gui/lua/lua_api_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index f95bdbc54..51f649f64 100644 --- a/src/gui/lua/lua_api_version.h +++ b/src/gui/lua/lua_api_version.h @@ -4,4 +4,4 @@ * to luainstance.h changes */ #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 39 +#define LUA_API_VERSION_MINOR 46 From a8292eae0b922430aeebe9647e505764d3e48e49 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 22 Aug 2016 20:59:06 +0200 Subject: [PATCH 2/7] src/gui/lua/lua_cc_window.cpp use setButtonLabels real window width Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/52d16769f13ca14abd9d5cc72c368a6bb73b06fd Author: Jacek Jendrzej Date: 2016-08-22 (Mon, 22 Aug 2016) --- src/gui/lua/lua_cc_window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index 754a1c16d..03313ca22 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -161,7 +161,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L) buttons.push_back(btnSblue); } if (!buttons.empty()) - footer->setButtonLabels(buttons, dx-20, (dx-20) / (buttons.size()+1)); + footer->setButtonLabels(buttons, (*udata)->w->getWidth()-20, ((*udata)->w->getWidth()-20) / (buttons.size()+1)); } } From cdd40d98b0407e2978affd6c89d7231d7e2ac099 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 20 Aug 2016 23:54:40 +0200 Subject: [PATCH 3/7] CComponentsFooter: use background color of footer inside chain object Ensure pass of bg color from parent into chain object and button objects. Required by embedded button objects. This prevents "holes" on screen. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a92757697f6f911fd36016e0a39c62ca4f2bf10d Author: Thilo Graf Date: 2016-08-20 (Sat, 20 Aug 2016) --- src/gui/components/cc_frm_footer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index de72490fd..7945d8a3c 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -117,7 +117,7 @@ void CComponentsFooter::setButtonLabels(const struct button_label_s * const cont //footer as primary container (in this context '=this') and the parent for the button label container (chain object), //button label container (chain object) itself is concurrent the parent object for button objects. if (chain == NULL){ - chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this); + chain = new CComponentsFrmChain(x_chain, CC_CENTERED, w_chain, height, 0, CC_DIR_X, this, CC_SHADOW_OFF, COL_MENUCONTENT_PLUS_6, col_body); chain->setCorner(this->corner_rad, this->corner_type); chain->doPaintBg(false); } From 27f527bb45de9ab3c6eaf4d6f60b28a08ce40b74 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 21 Aug 2016 14:22:08 +0200 Subject: [PATCH 4/7] CComponentsWindow: simplify statements Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ca5702acf4b3ccb52bf5944206e89c06abe64a72 Author: Thilo Graf Date: 2016-08-21 (Sun, 21 Aug 2016) --- src/gui/components/cc_frm_window.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index e808e28b1..a3a5ba43e 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -168,14 +168,10 @@ void CComponentsWindow::initWindowSize() if (cc_parent) return; - if (width == 0) - width = frameBuffer->getScreenWidth(); - else if ((unsigned)width > frameBuffer->getScreenWidth()) + if (width == 0 || (unsigned)width > frameBuffer->getScreenWidth()) width = frameBuffer->getScreenWidth(); - if (height == 0) - height = frameBuffer->getScreenHeight(); - else if((unsigned)height > frameBuffer->getScreenHeight()) + if (height == 0 || (unsigned)height > frameBuffer->getScreenHeight()) height = frameBuffer->getScreenHeight(); } From 5e16a9f6b4f05bd9c829bdbe9a62cb1de18c52a6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 21 Aug 2016 15:12:01 +0200 Subject: [PATCH 5/7] CComponentsButton: reduce shadow width buttons are mostly small elements, so these elements should have a reasonable shadow width Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/2cf409bc27a227adbdb2da76bc88dd677774d583 Author: Thilo Graf Date: 2016-08-21 (Sun, 21 Aug 2016) --- src/gui/components/cc_frm_button.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index a92617ebf..24b2d8917 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -100,7 +100,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const width = w; height = h; shadow = shadow_mode; - shadow_w = SHADOW_OFFSET; + shadow_w = SHADOW_OFFSET/2; //buttons are mostly small elements, so these elements should have a reasonable shadow width cc_body_gradient_enable = CC_COLGRAD_OFF/*g_settings.gradiant*/; //TODO: gradient is prepared for use but disabled at the moment till some other parts of gui parts are provide gradient setColBodyGradient(cc_body_gradient_enable/*CColorGradient::gradientLight2Dark*/, CFrameBuffer::gradientVertical, CColorGradient::light); @@ -113,7 +113,7 @@ void CComponentsButton::initVarButton( const int& x_pos, const int& y_pos, const fr_thickness = 0; //TODO: parts of the GUI still don't use framed buttons append_x_offset = 6; append_y_offset = 0; - corner_rad = 0; + corner_rad = RADIUS_SMALL; cc_btn_capt_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_ENABLED : COL_MENUFOOT_TEXT; cc_btn_capt_disable_col = cc_body_gradient_enable ? COL_BUTTON_TEXT_DISABLED : COL_MENUCONTENTINACTIVE_TEXT; From d2c96fd9e7387721296a99632e6b9e8f0d95a251 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 21 Aug 2016 20:45:12 +0200 Subject: [PATCH 6/7] CMenuWidget: assign all layer colors out of header init This fixes missing applying of possible changes of colour settings in color setup for frame. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/41ed6513bd28911ef0e7e1f62631939ef0aa6c9f Author: Thilo Graf Date: 2016-08-21 (Sun, 21 Aug 2016) --- src/gui/widget/menue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 5d6c73335..21af5cd46 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1243,7 +1243,7 @@ void CMenuWidget::paint() header->enableShadow(CC_SHADOW_RIGHT); header->setOffset(10); } - header->setColorBody(COL_MENUHEAD_PLUS_0); + header->setColorAll(COL_MENUCONTENT_PLUS_6, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); header->setCaptionColor(COL_MENUHEAD_TEXT); header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0); header->enableGradientBgCleanUp(savescreen); From e371ec33837897a9f1305fd68de66b073dc25615 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 22 Aug 2016 21:11:38 +0200 Subject: [PATCH 7/7] CComponentsWindow: fix possible holes between frame and footer One line was to much Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/90866b232a4780a9c8616f80ed75cb7320848169 Author: Thilo Graf Date: 2016-08-22 (Mon, 22 Aug 2016) --- src/gui/components/cc_frm_window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index a3a5ba43e..682236278 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -219,7 +219,7 @@ void CComponentsWindow::initFooter() ccw_footer->setPos(0, cc_yr + height - ccw_footer->getHeight()- fr_thickness); ccw_footer->setWidth(width-2*fr_thickness); ccw_footer->enableShadow(false/*shadow*/); - ccw_footer->setCorner(corner_rad-fr_thickness/2, CORNER_BOTTOM); + ccw_footer->setCorner(corner_rad-fr_thickness, CORNER_BOTTOM); ccw_footer->setButtonFont(ccw_button_font); ccw_footer->setColorBody(ccw_col_footer); ccw_footer->doPaintBg(true);