mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
- color: allow to toggle normal <-> enlighten background colors
This commit is contained in:
@@ -231,7 +231,7 @@ void Rgb2Hsv(RgbColor *rgb, HsvColor *hsv)
|
||||
hsv->v = f_V;
|
||||
}
|
||||
|
||||
void getItemColors(fb_pixel_t &t, fb_pixel_t &b, bool selected, bool marked, bool switch_background)
|
||||
void getItemColors(fb_pixel_t &t, fb_pixel_t &b, bool selected, bool marked, bool toggle_background, bool toggle_enlighten)
|
||||
{
|
||||
if (selected && marked)
|
||||
{
|
||||
@@ -255,6 +255,6 @@ void getItemColors(fb_pixel_t &t, fb_pixel_t &b, bool selected, bool marked, boo
|
||||
}
|
||||
|
||||
// default
|
||||
t = switch_background ? COL_MENUCONTENTDARK_TEXT : COL_MENUCONTENT_TEXT;
|
||||
b = switch_background ? COL_MENUCONTENTDARK_PLUS_0 : COL_MENUCONTENT_PLUS_0;
|
||||
t = toggle_background ? (toggle_enlighten ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTDARK_TEXT) : COL_MENUCONTENT_TEXT;
|
||||
b = toggle_background ? (toggle_enlighten ? COL_MENUCONTENT_PLUS_1 : COL_MENUCONTENTDARK_PLUS_0) : COL_MENUCONTENT_PLUS_0;
|
||||
}
|
||||
|
@@ -161,6 +161,6 @@ uint8_t SysColor2Hsv(fb_pixel_t color, HsvColor *hsv);
|
||||
void Hsv2Rgb(HsvColor *hsv, RgbColor *rgb);
|
||||
void Rgb2Hsv(RgbColor *rgb, HsvColor *hsv);
|
||||
|
||||
void getItemColors(fb_pixel_t &t, fb_pixel_t &b, bool selected = false, bool marked = false, bool switch_background = false);
|
||||
void getItemColors(fb_pixel_t &t, fb_pixel_t &b, bool selected = false, bool marked = false, bool toggle_background = false, bool toggle_enlighten = false);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user