1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-12-24 20:14:35 +02:00

Add constructors for RGBAColor

This commit is contained in:
Maarten ter Huurne 2014-07-17 20:11:06 +02:00
parent 5f454a8569
commit dd27cb2e07
2 changed files with 9 additions and 6 deletions

View File

@ -802,12 +802,12 @@ void GMenu2X::setSkin(const string &skin, bool setWallpaper) {
sc.setSkin(skin);
//reset colors to the default values
skinConfColors[COLOR_TOP_BAR_BG] = (RGBAColor){255,255,255,130};
skinConfColors[COLOR_BOTTOM_BAR_BG] = (RGBAColor){255,255,255,130};
skinConfColors[COLOR_SELECTION_BG] = (RGBAColor){255,255,255,130};
skinConfColors[COLOR_MESSAGE_BOX_BG] = (RGBAColor){255,255,255,255};
skinConfColors[COLOR_MESSAGE_BOX_BORDER] = (RGBAColor){80,80,80,255};
skinConfColors[COLOR_MESSAGE_BOX_SELECTION] = (RGBAColor){160,160,160,255};
skinConfColors[COLOR_TOP_BAR_BG] = RGBAColor(255, 255, 255, 130);
skinConfColors[COLOR_BOTTOM_BAR_BG] = RGBAColor(255, 255, 255, 130);
skinConfColors[COLOR_SELECTION_BG] = RGBAColor(255, 255, 255, 130);
skinConfColors[COLOR_MESSAGE_BOX_BG] = RGBAColor(255, 255, 255);
skinConfColors[COLOR_MESSAGE_BOX_BORDER] = RGBAColor(80, 80, 80);
skinConfColors[COLOR_MESSAGE_BOX_SELECTION] = RGBAColor(160, 160, 160);
/* Load skin settings from user directory if present,
* or from the system directory. */

View File

@ -30,6 +30,9 @@
struct RGBAColor {
uint8_t r, g, b, a;
static RGBAColor fromString(std::string const& strColor);
RGBAColor() : r(0), g(0), b(0), a(0) {}
RGBAColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255)
: r(r), g(g), b(b), a(a) {}
};
/**