diff options
| author | 2022-09-17 06:28:25 +1000 | |
|---|---|---|
| committer | 2022-09-17 06:31:07 +1000 | |
| commit | c25428f519d401634d2e7555cc5cc0908efb5b0d (patch) | |
| tree | 870decebdc57c8c742a8059629225aa923034e53 /src/osd/modules/debugger/win/debugviewinfo.cpp | |
| parent | b64b4ef8bbae5c5745740d0861393a2b37b0fd32 (diff) | |
Added a crude dark theme for the Win32 debugger.
Also made a start on weaning the Qt debugger off its weird configuation
objects. It can now save more view state with less string comparisons
on memory labels, but it can't restore all of it yet.
Diffstat (limited to 'src/osd/modules/debugger/win/debugviewinfo.cpp')
| -rw-r--r-- | src/osd/modules/debugger/win/debugviewinfo.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/osd/modules/debugger/win/debugviewinfo.cpp b/src/osd/modules/debugger/win/debugviewinfo.cpp index faed31e74bc..744121cbe77 100644 --- a/src/osd/modules/debugger/win/debugviewinfo.cpp +++ b/src/osd/modules/debugger/win/debugviewinfo.cpp @@ -498,7 +498,7 @@ void debugview_info::draw_contents(HDC windc) for (int iter = 0; iter < 2; iter++) { COLORREF fgcolor; - COLORREF bgcolor = RGB(0xff,0xff,0xff); + COLORREF bgcolor = metrics().view_colors(DCA_NORMAL).second; HBRUSH bgbrush = nullptr; int last_attrib = -1; TCHAR buffer[256]; @@ -522,20 +522,8 @@ void debugview_info::draw_contents(HDC windc) { COLORREF oldbg = bgcolor; - // pick new background color - bgcolor = RGB(0xff,0xff,0xff); - if (viewdata[col].attrib & DCA_VISITED) bgcolor = RGB(0xc6, 0xe2, 0xff); - if (viewdata[col].attrib & DCA_ANCILLARY) bgcolor = RGB(0xe0,0xe0,0xe0); - if (viewdata[col].attrib & DCA_SELECTED) bgcolor = RGB(0xff,0x80,0x80); - if (viewdata[col].attrib & DCA_CURRENT) bgcolor = RGB(0xff,0xff,0x00); - if ((viewdata[col].attrib & DCA_SELECTED) && (viewdata[col].attrib & DCA_CURRENT)) bgcolor = RGB(0xff,0xc0,0x80); - - // pick new foreground color - fgcolor = RGB(0x00,0x00,0x00); - if (viewdata[col].attrib & DCA_CHANGED) fgcolor = RGB(0xff,0x00,0x00); - if (viewdata[col].attrib & DCA_INVALID) fgcolor = RGB(0x00,0x00,0xff); - if (viewdata[col].attrib & DCA_DISABLED) fgcolor = RGB((GetRValue(fgcolor) + GetRValue(bgcolor)) / 2, (GetGValue(fgcolor) + GetGValue(bgcolor)) / 2, (GetBValue(fgcolor) + GetBValue(bgcolor)) / 2); - if (viewdata[col].attrib & DCA_COMMENT) fgcolor = RGB(0x00,0x80,0x00); + // pick new colors + std::tie(fgcolor, bgcolor) = metrics().view_colors(viewdata[col].attrib); // flush any pending drawing if (count > 0) @@ -546,7 +534,7 @@ void debugview_info::draw_contents(HDC windc) FillRect(dc, &bounds, bgbrush); if (do_filldown) { - COLORREF const filldown = (last_attrib & DCA_ANCILLARY) ? RGB(0xe0,0xe0,0xe0) : RGB(0xff,0xff,0xff); + COLORREF const filldown = metrics().view_colors(last_attrib & DCA_ANCILLARY).second; if (oldbg != filldown) { DeleteObject(bgbrush); @@ -593,7 +581,7 @@ void debugview_info::draw_contents(HDC windc) FillRect(dc, &bounds, bgbrush); if (do_filldown) { - COLORREF const filldown = (last_attrib & DCA_ANCILLARY) ? RGB(0xe0,0xe0,0xe0) : RGB(0xff,0xff,0xff); + COLORREF const filldown = metrics().view_colors(last_attrib & DCA_ANCILLARY).second; if (bgcolor != filldown) { DeleteObject(bgbrush); |
