mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
fix l4l alpha levels
Origin commit data
------------------
Branch: ni/coolstream
Commit: de61085203
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:
@@ -293,7 +293,7 @@ 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);
|
+ hexStrA2A(t.infobar_Text_alpha);
|
||||||
|
|
||||||
if (m_fgcolor.compare(fgcolor))
|
if (m_fgcolor.compare(fgcolor))
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ 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);
|
+ hexStrA2A(t.infobar_alpha);
|
||||||
|
|
||||||
if (m_bgcolor.compare(bgcolor))
|
if (m_bgcolor.compare(bgcolor))
|
||||||
{
|
{
|
||||||
@@ -1030,3 +1030,18 @@ std::string CLCD4l::hexStr(unsigned char data)
|
|||||||
snprintf(hexstr, sizeof hexstr, "%02x", (int)data * 255 / 100);
|
snprintf(hexstr, sizeof hexstr, "%02x", (int)data * 255 / 100);
|
||||||
return std::string(hexstr);
|
return std::string(hexstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CLCD4l::hexStrA2A(unsigned char data)
|
||||||
|
{
|
||||||
|
char hexstr[3];
|
||||||
|
int a = 100 - data;
|
||||||
|
int ret = a * 0xFF / 100;
|
||||||
|
|
||||||
|
if(data == 0)
|
||||||
|
ret = 0xFF;
|
||||||
|
else if(data >= 100)
|
||||||
|
ret = 0x00;
|
||||||
|
|
||||||
|
snprintf(hexstr, sizeof hexstr, "%02x", ret);
|
||||||
|
return std::string(hexstr);
|
||||||
|
}
|
||||||
|
@@ -68,6 +68,7 @@ class CLCD4l
|
|||||||
bool CompareParseID(uint64_t &i_ParseID);
|
bool CompareParseID(uint64_t &i_ParseID);
|
||||||
|
|
||||||
std::string hexStr(unsigned char data);
|
std::string hexStr(unsigned char data);
|
||||||
|
std::string hexStrA2A(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