mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
l4l: fix colors
Origin commit data
------------------
Branch: ni/coolstream
Commit: 79ea922445
Author: TangoCash <eric@loxat.de>
Date: 2018-12-24 (Mon, 24 Dec 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -290,11 +290,10 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------- */
|
/* ----------------------------------------------------------------- */
|
||||||
|
std::string fgcolor = hexStr(t.infobar_Text_red)
|
||||||
std::string fgcolor = hexStr(&t.infobar_Text_red)
|
+ hexStr(t.infobar_Text_green)
|
||||||
+ hexStr(&t.infobar_Text_green)
|
+ hexStr(t.infobar_Text_blue)
|
||||||
+ hexStr(&t.infobar_Text_blue)
|
+ hexStr(t.infobar_Text_alpha);
|
||||||
+ hexStr(&t.infobar_Text_alpha);
|
|
||||||
|
|
||||||
if (m_fgcolor.compare(fgcolor))
|
if (m_fgcolor.compare(fgcolor))
|
||||||
{
|
{
|
||||||
@@ -304,10 +303,10 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
|||||||
|
|
||||||
/* ----------------------------------------------------------------- */
|
/* ----------------------------------------------------------------- */
|
||||||
|
|
||||||
std::string bgcolor = hexStr(&t.infobar_red)
|
std::string bgcolor = hexStr(t.infobar_red)
|
||||||
+ hexStr(&t.infobar_green)
|
+ hexStr(t.infobar_green)
|
||||||
+ hexStr(&t.infobar_blue)
|
+ hexStr(t.infobar_blue)
|
||||||
+ hexStr(&t.infobar_alpha);
|
+ hexStr(t.infobar_alpha);
|
||||||
|
|
||||||
if (m_bgcolor.compare(bgcolor))
|
if (m_bgcolor.compare(bgcolor))
|
||||||
{
|
{
|
||||||
@@ -1025,11 +1024,9 @@ void CLCD4l::strReplace(std::string &orig, const std::string &fstr, const std::s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CLCD4l::hexStr(unsigned char* data)
|
std::string CLCD4l::hexStr(unsigned char data)
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
char hexstr[3];
|
||||||
ss << std::hex;
|
snprintf(hexstr, sizeof hexstr, "%02x", (int)data * 255 / 100);
|
||||||
for(int i=0; i<1; ++i)
|
return std::string(hexstr);
|
||||||
ss << std::setw(2) << std::setfill('0') << (int)data[i];
|
|
||||||
return ss.str();
|
|
||||||
}
|
}
|
||||||
|
@@ -67,7 +67,7 @@ class CLCD4l
|
|||||||
uint64_t GetParseID();
|
uint64_t GetParseID();
|
||||||
bool CompareParseID(uint64_t &i_ParseID);
|
bool CompareParseID(uint64_t &i_ParseID);
|
||||||
|
|
||||||
std::string hexStr(unsigned char* data);
|
std::string hexStr(unsigned char data);
|
||||||
void strReplace(std::string &orig, const std::string &fstr, const std::string &rstr);
|
void strReplace(std::string &orig, const std::string &fstr, const std::string &rstr);
|
||||||
bool WriteFile(const char *file, std::string content = "", bool convert = false);
|
bool WriteFile(const char *file, std::string content = "", bool convert = false);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user