mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Support SGR 2 to dim the foreground colour.
I've done this on a 'where possible' basis: in Windows paletted mode (in case anyone is still using an old enough graphics card to need that!) I simply haven't bothered, and will completely ignore the dim flag.
This commit is contained in:
@ -3440,7 +3440,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
|
||||
|
||||
if ((attr & TATTR_ACTCURS) && (cursor_type == 0 || term->big_cursor)) {
|
||||
truecolour.fg = truecolour.bg = optionalrgb_none;
|
||||
attr &= ~(ATTR_REVERSE|ATTR_BLINK|ATTR_COLOURS);
|
||||
attr &= ~(ATTR_REVERSE|ATTR_BLINK|ATTR_COLOURS|ATTR_DIM);
|
||||
/* cursor fg and bg */
|
||||
attr |= (260 << ATTR_FGSHIFT) | (261 << ATTR_BGSHIFT);
|
||||
is_cursor = TRUE;
|
||||
@ -3543,6 +3543,12 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
|
||||
else
|
||||
bg = colours[nbg];
|
||||
|
||||
if (!pal && (attr & ATTR_DIM)) {
|
||||
fg = RGB(GetRValue(fg) * 2 / 3,
|
||||
GetGValue(fg) * 2 / 3,
|
||||
GetBValue(fg) * 2 / 3);
|
||||
}
|
||||
|
||||
SelectObject(hdc, fonts[nfont]);
|
||||
SetTextColor(hdc, fg);
|
||||
SetBkColor(hdc, bg);
|
||||
|
Reference in New Issue
Block a user