GUACAMOLE-280: Ensure bold and half-bright attributes cancel each other out.
This commit is contained in:
parent
2146200dfd
commit
9da27ad578
@ -118,7 +118,7 @@ int __guac_terminal_set_colors(guac_terminal_display* display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Handle bold */
|
/* Handle bold */
|
||||||
if (attributes->bold
|
if (attributes->bold && !attributes->half_bright
|
||||||
&& foreground->palette_index >= GUAC_TERMINAL_FIRST_DARK
|
&& foreground->palette_index >= GUAC_TERMINAL_FIRST_DARK
|
||||||
&& foreground->palette_index <= GUAC_TERMINAL_LAST_DARK) {
|
&& foreground->palette_index <= GUAC_TERMINAL_LAST_DARK) {
|
||||||
foreground = &guac_terminal_palette[foreground->palette_index
|
foreground = &guac_terminal_palette[foreground->palette_index
|
||||||
@ -129,7 +129,7 @@ int __guac_terminal_set_colors(guac_terminal_display* display,
|
|||||||
display->glyph_background = *background;
|
display->glyph_background = *background;
|
||||||
|
|
||||||
/* Modify color if half-bright (low intensity) */
|
/* Modify color if half-bright (low intensity) */
|
||||||
if (attributes->half_bright) {
|
if (attributes->half_bright && !attributes->bold) {
|
||||||
display->glyph_foreground.red /= 2;
|
display->glyph_foreground.red /= 2;
|
||||||
display->glyph_foreground.green /= 2;
|
display->glyph_foreground.green /= 2;
|
||||||
display->glyph_foreground.blue /= 2;
|
display->glyph_foreground.blue /= 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user