- color: allow to toggle normal <-> enlighten background colors

This commit is contained in:
vanhofen
2017-04-10 21:43:01 +02:00
committed by svenhoefer
parent 25e56bf5df
commit 1c75e7f447
2 changed files with 4 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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