From db8ab0c94e90dcb3f387ab5ad3656834f3ad3c6d Mon Sep 17 00:00:00 2001 From: TangoCash Date: Mon, 24 Dec 2018 23:43:45 +0100 Subject: [PATCH] l4l: add some more colors for theme Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0d60c9407cb68fbf09e70ab1e7d9cb01dcff1f6d Author: TangoCash Date: 2018-12-24 (Mon, 24 Dec 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/lcd4l.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++++ src/driver/lcd4l.h | 3 +++ 2 files changed, 50 insertions(+) diff --git a/src/driver/lcd4l.cpp b/src/driver/lcd4l.cpp index 0395feafd..2b9aea838 100644 --- a/src/driver/lcd4l.cpp +++ b/src/driver/lcd4l.cpp @@ -99,6 +99,10 @@ extern CPictureViewer *g_PicViewer; #define FGCOLOR LCD_DATADIR "fgcolor" #define BGCOLOR LCD_DATADIR "bgcolor" +#define FCOLOR1 LCD_DATADIR "fcolor1" +#define FCOLOR2 LCD_DATADIR "fcolor2" +#define PBCOLOR LCD_DATADIR "pbcolor" + #define FLAG_LCD4LINUX "/tmp/.lcd4linux" #define PIDFILE "/var/run/lcd4linux.pid" @@ -290,6 +294,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) } /* ----------------------------------------------------------------- */ + std::string fgcolor = hexStr(t.infobar_Text_red) + hexStr(t.infobar_Text_green) + hexStr(t.infobar_Text_blue) @@ -316,6 +321,48 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) /* ----------------------------------------------------------------- */ + std::string fcolor1 = hexStr(t.infobar_Text_red) + + hexStr(t.infobar_Text_green) + + hexStr(t.infobar_Text_blue) + + hexStr(t.infobar_Text_alpha); + + if (m_fcolor1.compare(fcolor1)) + { + WriteFile(FCOLOR1, fcolor1); + m_fcolor1 = fcolor1; + } + + /* ----------------------------------------------------------------- */ + + std::string fcolor2 = hexStr(t.colored_events_red) + + hexStr(t.colored_events_green) + + hexStr(t.colored_events_blue) + + hexStr(t.colored_events_alpha); + + if (!t.colored_events_infobar) + fcolor2 = fcolor1; + + if (m_fcolor2.compare(fcolor2)) + { + WriteFile(FCOLOR2, fcolor2); + m_fcolor2 = fcolor2; + } + + /* ----------------------------------------------------------------- */ + + std::string pbcolor = hexStr(t.menu_Content_Selected_red) + + hexStr(t.menu_Content_Selected_green) + + hexStr(t.menu_Content_Selected_blue) + + hexStrA2A(t.menu_Content_Selected_alpha); + + if (m_pbcolor.compare(pbcolor)) + { + WriteFile(PBCOLOR, pbcolor); + m_pbcolor = pbcolor; + } + + /* ----------------------------------------------------------------- */ + int Brightness = g_settings.lcd4l_brightness; if (m_Brightness != Brightness) { diff --git a/src/driver/lcd4l.h b/src/driver/lcd4l.h index 696b0f40c..4705039c6 100644 --- a/src/driver/lcd4l.h +++ b/src/driver/lcd4l.h @@ -111,6 +111,9 @@ class CLCD4l std::string m_font; std::string m_fgcolor; std::string m_bgcolor; + std::string m_fcolor1; + std::string m_fcolor2; + std::string m_pbcolor; }; #endif