mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
terminal/screen: perform bold->light conversion only on foreground
Bold glyphs always use light colors. However, this color conversion is limited to the foreground color, so skip it for backgrounds.
This commit is contained in:
parent
378c4eed02
commit
34dbefceb1
@ -100,8 +100,8 @@ static uint32_t term_color_to_argb32(const term_color *color, const term_attr *a
|
|||||||
case TERM_CCODE_BLACK ... TERM_CCODE_LIGHT_WHITE:
|
case TERM_CCODE_BLACK ... TERM_CCODE_LIGHT_WHITE:
|
||||||
t = color->ccode - TERM_CCODE_BLACK;
|
t = color->ccode - TERM_CCODE_BLACK;
|
||||||
|
|
||||||
/* bold causes light colors */
|
/* bold causes light colors (only for foreground colors) */
|
||||||
if (t < 8 && attr->bold)
|
if (t < 8 && attr->bold && color == &attr->fg)
|
||||||
t += 8;
|
t += 8;
|
||||||
|
|
||||||
r = palette[t * 3 + 0];
|
r = palette[t * 3 + 0];
|
||||||
|
Loading…
Reference in New Issue
Block a user