• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28838 (tree)
Zeit2020-04-02 19:53:21
Autorstefankueng

Log Message

make the dark mode more easy to the eyes:
make the black color a little brighter, and the white color a little bit darker.

Ändern Zusammenfassung

Diff

--- trunk/src/SVN/SVNStatusListCtrl.cpp (revision 28837)
+++ trunk/src/SVN/SVNStatusListCtrl.cpp (revision 28838)
@@ -4904,7 +4904,7 @@
49044904 // Tell Windows to send draw notifications for each subitem.
49054905 *pResult = CDRF_NOTIFYSUBITEMDRAW;
49064906
4907- COLORREF crText = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
4907+ COLORREF crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
49084908
49094909 if (m_arListArray.size() > (DWORD_PTR)pLVCD->nmcd.dwItemSpec)
49104910 {
@@ -4960,7 +4960,7 @@
49604960 case svn_wc_status_normal:
49614961 case svn_wc_status_external:
49624962 default:
4963- crText = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
4963+ crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
49644964 break;
49654965 }
49664966
@@ -5447,10 +5447,10 @@
54475447 else
54485448 str = m_sEmpty;
54495449 }
5450- COLORREF clrText = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT));
5450+ COLORREF clrText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
54515451 COLORREF clrTextBk;
54525452 if (IsWindowEnabled())
5453- clrTextBk = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOW));
5453+ clrTextBk = CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW);
54545454 else
54555455 clrTextBk = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_3DFACE));
54565456
--- trunk/src/TortoiseBlame/TortoiseBlame.cpp (revision 28837)
+++ trunk/src/TortoiseBlame/TortoiseBlame.cpp (revision 28838)
@@ -96,8 +96,8 @@
9696 , m_pathWidth(0)
9797 , m_lineWidth(0)
9898 , m_mouseRev(-2)
99- , m_windowColor(GetSysColor(COLOR_WINDOW))
100- , m_textColor(GetSysColor(COLOR_WINDOWTEXT))
99+ , m_windowColor(CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW))
100+ , m_textColor(CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT))
101101 , m_textHighLightColor(GetSysColor(COLOR_HIGHLIGHTTEXT))
102102 , m_selectedRev(-1)
103103 , m_selectedOrigRev(-1)
@@ -1466,10 +1466,10 @@
14661466 {
14671467 for (int c = 0; c <= STYLE_DEFAULT; ++c)
14681468 {
1469- SendEditor(SCI_STYLESETFORE, c, ::GetSysColor(COLOR_WINDOWTEXT));
1470- SendEditor(SCI_STYLESETBACK, c, ::GetSysColor(COLOR_WINDOW));
1469+ SendEditor(SCI_STYLESETFORE, c, CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
1470+ SendEditor(SCI_STYLESETBACK, c, CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW));
14711471 }
1472- SendEditor(SCI_SETCARETFORE, ::GetSysColor(COLOR_WINDOWTEXT));
1472+ SendEditor(SCI_SETCARETFORE, CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
14731473 SendEditor(SCI_SETWHITESPACEFORE, true, ::GetSysColor(COLOR_3DSHADOW));
14741474 SendEditor(SCI_STYLESETFORE, STYLE_BRACELIGHT, RGB(0, 150, 0));
14751475 SendEditor(SCI_STYLESETBOLD, STYLE_BRACELIGHT, 1);
@@ -1689,7 +1689,7 @@
16891689 HFONT oldfont = (HFONT)::SelectObject(hDC, m_uiFont);
16901690 GetClientRect(wHeader, &rc);
16911691 ::SetBkColor(hDC, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_BTNFACE)));
1692- ::SetTextColor(hDC, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT)));
1692+ ::SetTextColor(hDC, CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
16931693 RECT edgerc = rc;
16941694 edgerc.bottom = edgerc.top + CDPIAware::Instance().Scale(HEADER_HEIGHT) / 2;
16951695 DrawEdge(hDC, &edgerc, EDGE_BUMP, BF_FLAT | BF_RECT | BF_ADJUST);
@@ -1760,7 +1760,7 @@
17601760 LONG_PTR line = SendEditor(SCI_GETFIRSTVISIBLELINE);
17611761 LONG_PTR linesonscreen = SendEditor(SCI_LINESONSCREEN);
17621762 LONG_PTR Y = 0;
1763- COLORREF blackColor = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
1763+ COLORREF blackColor = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
17641764
17651765 RECT rc;
17661766 GetClientRect(wLocator, &rc);
@@ -2232,8 +2232,8 @@
22322232
22332233 void TortoiseBlame::SetupColoring()
22342234 {
2235- m_windowColor = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOW));
2236- m_textColor = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
2235+ m_windowColor = CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW);
2236+ m_textColor = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
22372237 if (CTheme::Instance().IsDarkTheme() || CTheme::Instance().IsHighContrastModeDark())
22382238 {
22392239 m_textHighLightColor = m_textColor;
--- trunk/src/TortoiseIDiff/PicWindow.cpp (revision 28837)
+++ trunk/src/TortoiseIDiff/PicWindow.cpp (revision 28838)
@@ -599,7 +599,7 @@
599599
600600 COLORREF crBk, crFg;
601601 crBk = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_SCROLLBAR));
602- crFg = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT));
602+ crFg = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
603603 SetBkColor(hDC, crBk);
604604 ::ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &textrect, nullptr, 0, nullptr);
605605
@@ -1161,7 +1161,7 @@
11611161
11621162 void CPicWindow::ShowPicWithBorder(HDC hdc, const RECT &bounds, CPicture &pic, int scale)
11631163 {
1164- ::SetBkColor(hdc, CTheme::Instance().GetThemeColor(transparentColor));
1164+ ::SetBkColor(hdc, GetTransparentThemedColor());
11651165 ::ExtTextOut(hdc, 0, 0, ETO_OPAQUE, &bounds, nullptr, 0, nullptr);
11661166
11671167 RECT picrect;
@@ -1224,7 +1224,7 @@
12241224 if ((pSecondPic)&&(m_blend != BLEND_ALPHA))
12251225 {
12261226 // erase the place where the alpha slider would be
1227- ::SetBkColor(memDC, CTheme::Instance().GetThemeColor(transparentColor));
1227+ ::SetBkColor(memDC, GetTransparentThemedColor());
12281228 RECT bounds = { 0, m_inforect.top - border, slider_width, m_inforect.bottom + border };
12291229 ::ExtTextOut(memDC, 0, 0, ETO_OPAQUE, &bounds, nullptr, 0, nullptr);
12301230 }
@@ -1243,7 +1243,7 @@
12431243 if ((pSecondPic)&&(m_blend != BLEND_ALPHA))
12441244 {
12451245 // erase the place where the alpha slider would be
1246- ::SetBkColor(secondhdc, CTheme::Instance().GetThemeColor(transparentColor));
1246+ ::SetBkColor(secondhdc, GetTransparentThemedColor());
12471247 RECT bounds = { 0, m_inforect.top - border, slider_width, m_inforect.bottom + border };
12481248 ::ExtTextOut(secondhdc, 0, 0, ETO_OPAQUE, &bounds, nullptr, 0, nullptr);
12491249 }
@@ -1323,7 +1323,7 @@
13231323 m_inforect.right = rect.right+sliderwidth;
13241324 m_inforect.bottom = rect.bottom;
13251325
1326- SetBkColor(memDC, CTheme::Instance().GetThemeColor(transparentColor));
1326+ SetBkColor(memDC, GetTransparentThemedColor());
13271327 if (bShowInfo)
13281328 {
13291329 auto infostring = std::make_unique<TCHAR[]>(8192);
@@ -1350,7 +1350,7 @@
13501350 ::ExtTextOut(memDC, 0, 0, ETO_OPAQUE, &edgerect, nullptr, 0, nullptr);
13511351 DrawEdge(memDC, &edgerect, EDGE_BUMP, BF_RECT | BF_SOFT);
13521352
1353- SetTextColor(memDC, CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT)));
1353+ SetTextColor(memDC, CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
13541354 DrawText(memDC, infostring.get(), -1, &m_inforect, DT_EDITCONTROL | DT_EXPANDTABS | DT_LEFT | DT_VCENTER);
13551355 SelectObject(memDC, (HGDIOBJ)hFontOld);
13561356 DeleteObject(hFont);
@@ -1358,8 +1358,8 @@
13581358 }
13591359 else
13601360 {
1361- SetBkColor(memDC, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOW)));
1362- SetTextColor(memDC, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT)));
1361+ SetBkColor(memDC, CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW));
1362+ SetTextColor(memDC, CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
13631363 ::ExtTextOut(memDC, 0, 0, ETO_OPAQUE, &rect, nullptr, 0, nullptr);
13641364 SIZE stringsize;
13651365 ResString str = ResString(hResource, IDS_INVALIDIMAGEINFO);
@@ -1646,3 +1646,13 @@
16461646
16471647 InvalidateRect(*this, nullptr, true);
16481648 }
1649+
1650+COLORREF CPicWindow::GetTransparentThemedColor()
1651+{
1652+ if (CTheme::Instance().IsDarkTheme())
1653+ {
1654+ if (transparentColor == 0xFFFFFF)
1655+ return CTheme::darkBkColor;
1656+ }
1657+ return CTheme::Instance().GetThemeColor(transparentColor);
1658+}
--- trunk/src/TortoiseIDiff/PicWindow.h (revision 28837)
+++ trunk/src/TortoiseIDiff/PicWindow.h (revision 28838)
@@ -242,6 +242,8 @@
242242 void SetZoomToHeight(long height);
243243 /// sets the dark mode
244244 void SetTheme(bool bDark);
245+ /// returns the transparent color, adjusted for theme
246+ COLORREF GetTransparentThemedColor();
245247
246248 tstring picpath; ///< the path to the image we show
247249 tstring pictitle; ///< the string to show in the image view as a title
--- trunk/src/TortoiseMerge/BaseView.cpp (revision 28837)
+++ trunk/src/TortoiseMerge/BaseView.cpp (revision 28838)
@@ -1387,7 +1387,7 @@
13871387 if (!sLinenumber.IsEmpty())
13881388 {
13891389 pdc->SetBkColor(CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_SCROLLBAR)));
1390- pdc->SetTextColor(CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT)));
1390+ pdc->SetTextColor(CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
13911391
13921392 pdc->SelectObject(GetFont());
13931393 pdc->ExtTextOut(rect.left + iconWidth + CDPIAware::Instance().Scale(2), rect.top, ETO_CLIPPED, &rect, sLinenumber, nullptr);
@@ -1711,7 +1711,7 @@
17111711 case EOL_LS: // Line Separator, U+2028
17121712 case EOL_PS: // Paragraph Separator, U+2029
17131713 // draw a horizontal line at the bottom of this line
1714- pDC->FillSolidRect(rc.left, rc.bottom-1, rc.right, rc.bottom, CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT)));
1714+ pDC->FillSolidRect(rc.left, rc.bottom-1, rc.right, rc.bottom, CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
17151715 pDC->MoveTo(origin.x+GetCharWidth()-1, rc.bottom-GetCharWidth()-2);
17161716 pDC->LineTo(origin.x, rc.bottom-2);
17171717 pDC->LineTo(origin.x+5, rc.bottom-2);
@@ -1745,7 +1745,11 @@
17451745 return;
17461746
17471747 const int THICKNESS = 2;
1748- COLORREF rectcol = CTheme::Instance().GetThemeColor(GetSysColor(m_bFocused ? COLOR_WINDOWTEXT : COLOR_GRAYTEXT));
1748+ COLORREF rectcol = 0;
1749+ if (m_bFocused)
1750+ rectcol = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
1751+ else
1752+ rectcol = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_GRAYTEXT));
17491753
17501754 int nViewLineIndex = GetViewLineForScreen(nLineIndex);
17511755 int nSubLine = GetSubLineOffset(nLineIndex);
@@ -2006,7 +2010,7 @@
20062010 pDC->FillSolidRect(rc, crBkgnd);
20072011
20082012 const int THICKNESS = 2;
2009- COLORREF rectcol = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
2013+ COLORREF rectcol = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
20102014 pDC->FillSolidRect(rc.left, rc.top + (rc.Height()/2), rc.Width(), THICKNESS, rectcol);
20112015 pDC->SetTextColor(CTheme::Instance().GetThemeColor(GetSysColor(COLOR_GRAYTEXT)));
20122016 pDC->SetBkColor(crBkgnd);
--- trunk/src/TortoiseMerge/DiffColors.cpp (revision 28837)
+++ trunk/src/TortoiseMerge/DiffColors.cpp (revision 28838)
@@ -55,8 +55,8 @@
5555 {
5656 if (darkMode)
5757 {
58- crBkgnd = ::GetSysColor(COLOR_WINDOWTEXT);
59- crText = ::GetSysColor(COLOR_WINDOW);
58+ crBkgnd = CTheme::darkBkColor;
59+ crText = CTheme::darkTextColor;
6060 }
6161 else
6262 {
--- trunk/src/TortoiseMerge/DiffColors.h (revision 28837)
+++ trunk/src/TortoiseMerge/DiffColors.h (revision 28838)
@@ -19,6 +19,7 @@
1919 #pragma once
2020 #include "DiffStates.h"
2121 #include "registry.h"
22+#include "Theme.h"
2223
2324 #define INLINEADDED_COLOR RGB(255, 255, 150)
2425 #define INLINEREMOVED_COLOR RGB(200, 100, 100)
@@ -81,34 +82,34 @@
8182 #define DIFFSTATE_EDITED_DEFAULT_BG MODIFIED_COLOR
8283 #define DIFFSTATE_FILTERED_DEFAULT_BG RGB(220,255,220)
8384
84-#define DIFFSTATE_UNKNOWN_DEFAULT_DARK_FG RGB(255,255,255)
85-#define DIFFSTATE_NORMAL_DEFAULT_DARK_FG RGB(255,255,255)
86-#define DIFFSTATE_REMOVED_DEFAULT_DARK_FG RGB(255,255,255)
87-#define DIFFSTATE_REMOVEDWHITESPACE_DEFAULT_DARK_FG RGB(255,255,255)
88-#define DIFFSTATE_ADDED_DEFAULT_DARK_FG RGB(255,255,255)
89-#define DIFFSTATE_ADDEDWHITESPACE_DEFAULT_DARK_FG RGB(255,255,255)
90-#define DIFFSTATE_WHITESPACE_DEFAULT_DARK_FG RGB(255,255,255)
91-#define DIFFSTATE_WHITESPACE_DIFF_DEFAULT_DARK_FG RGB(255,255,255)
92-#define DIFFSTATE_EMPTY_DEFAULT_DARK_FG RGB(255,255,255)
93-#define DIFFSTATE_CONFLICTED_DEFAULT_DARK_FG RGB(255,255,255)
94-#define DIFFSTATE_CONFLICTED_IGNORED_DEFAULT_DARK_FG RGB(255,255,255)
95-#define DIFFSTATE_CONFLICTADDED_DEFAULT_DARK_FG RGB(255,255,255)
96-#define DIFFSTATE_CONFLICTEMPTY_DEFAULT_DARK_FG RGB(255,255,255)
97-#define DIFFSTATE_MOVEDFROM_DEFAULT_DARK_FG RGB(255,255,255)
98-#define DIFFSTATE_MOVEDTO_DEFAULT_DARK_FG RGB(255,255,255)
99-#define DIFFSTATE_IDENTICAL_MOVEDFROM_DEFAULT_DARK_FG RGB(255,255,255)
100-#define DIFFSTATE_IDENTICAL_MOVEDTO_DEFAULT_DARK_FG RGB(255,255,255)
101-#define DIFFSTATE_IDENTICALREMOVED_DEFAULT_DARK_FG RGB(255,255,255)
102-#define DIFFSTATE_IDENTICALADDED_DEFAULT_DARK_FG RGB(255,255,255)
103-#define DIFFSTATE_THEIRSREMOVED_DEFAULT_DARK_FG RGB(255,255,255)
104-#define DIFFSTATE_THEIRSADDED_DEFAULT_DARK_FG RGB(255,255,255)
105-#define DIFFSTATE_YOURSREMOVED_DEFAULT_DARK_FG RGB(255,255,255)
106-#define DIFFSTATE_YOURSADDED_DEFAULT_DARK_FG RGB(255,255,255)
107-#define DIFFSTATE_CONFLICTRESOLVED_DEFAULT_DARK_FG RGB(255,255,255)
108-#define DIFFSTATE_EDITED_DEFAULT_DARK_FG RGB(255,255,255)
85+#define DIFFSTATE_UNKNOWN_DEFAULT_DARK_FG CTheme::darkTextColor
86+#define DIFFSTATE_NORMAL_DEFAULT_DARK_FG CTheme::darkTextColor
87+#define DIFFSTATE_REMOVED_DEFAULT_DARK_FG CTheme::darkTextColor
88+#define DIFFSTATE_REMOVEDWHITESPACE_DEFAULT_DARK_FG CTheme::darkTextColor
89+#define DIFFSTATE_ADDED_DEFAULT_DARK_FG CTheme::darkTextColor
90+#define DIFFSTATE_ADDEDWHITESPACE_DEFAULT_DARK_FG CTheme::darkTextColor
91+#define DIFFSTATE_WHITESPACE_DEFAULT_DARK_FG CTheme::darkTextColor
92+#define DIFFSTATE_WHITESPACE_DIFF_DEFAULT_DARK_FG CTheme::darkTextColor
93+#define DIFFSTATE_EMPTY_DEFAULT_DARK_FG CTheme::darkTextColor
94+#define DIFFSTATE_CONFLICTED_DEFAULT_DARK_FG CTheme::darkTextColor
95+#define DIFFSTATE_CONFLICTED_IGNORED_DEFAULT_DARK_FG CTheme::darkTextColor
96+#define DIFFSTATE_CONFLICTADDED_DEFAULT_DARK_FG CTheme::darkTextColor
97+#define DIFFSTATE_CONFLICTEMPTY_DEFAULT_DARK_FG CTheme::darkTextColor
98+#define DIFFSTATE_MOVEDFROM_DEFAULT_DARK_FG CTheme::darkTextColor
99+#define DIFFSTATE_MOVEDTO_DEFAULT_DARK_FG CTheme::darkTextColor
100+#define DIFFSTATE_IDENTICAL_MOVEDFROM_DEFAULT_DARK_FG CTheme::darkTextColor
101+#define DIFFSTATE_IDENTICAL_MOVEDTO_DEFAULT_DARK_FG CTheme::darkTextColor
102+#define DIFFSTATE_IDENTICALREMOVED_DEFAULT_DARK_FG CTheme::darkTextColor
103+#define DIFFSTATE_IDENTICALADDED_DEFAULT_DARK_FG CTheme::darkTextColor
104+#define DIFFSTATE_THEIRSREMOVED_DEFAULT_DARK_FG CTheme::darkTextColor
105+#define DIFFSTATE_THEIRSADDED_DEFAULT_DARK_FG CTheme::darkTextColor
106+#define DIFFSTATE_YOURSREMOVED_DEFAULT_DARK_FG CTheme::darkTextColor
107+#define DIFFSTATE_YOURSADDED_DEFAULT_DARK_FG CTheme::darkTextColor
108+#define DIFFSTATE_CONFLICTRESOLVED_DEFAULT_DARK_FG CTheme::darkTextColor
109+#define DIFFSTATE_EDITED_DEFAULT_DARK_FG CTheme::darkTextColor
109110
110-#define DIFFSTATE_UNKNOWN_DEFAULT_DARK_BG RGB(0,0,0)
111-#define DIFFSTATE_NORMAL_DEFAULT_DARK_BG RGB(0,0,0)
111+#define DIFFSTATE_UNKNOWN_DEFAULT_DARK_BG CTheme::darkBkColor
112+#define DIFFSTATE_NORMAL_DEFAULT_DARK_BG CTheme::darkBkColor
112113 #define DIFFSTATE_REMOVED_DEFAULT_DARK_BG RGB(83,66,33)
113114 #define DIFFSTATE_REMOVEDWHITESPACE_DEFAULT_DARK_BG DIFFSTATE_NORMAL_DEFAULT_DARK_BG
114115 #define DIFFSTATE_ADDED_DEFAULT_DARK_BG RGB(83,83,0)
--- trunk/src/TortoiseMerge/FilePatchesDlg.cpp (revision 28837)
+++ trunk/src/TortoiseMerge/FilePatchesDlg.cpp (revision 28838)
@@ -284,7 +284,7 @@
284284 // item's text color. Our return value will tell Windows to draw the
285285 // item itself, but it will use the new color we set here.
286286
287- COLORREF crText = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT));
287+ COLORREF crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
288288
289289 if (m_arFileStates.GetCount() > (INT_PTR)pLVCD->nmcd.dwItemSpec)
290290 {
--- trunk/src/TortoiseProc/CopyDlg.cpp (revision 28837)
+++ trunk/src/TortoiseProc/CopyDlg.cpp (revision 28838)
@@ -922,7 +922,7 @@
922922 {
923923 *pResult = CDRF_NOTIFYSUBITEMDRAW;
924924
925- COLORREF crText = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
925+ COLORREF crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
926926 if (pLVCD->nmcd.dwItemSpec < (UINT_PTR)m_externals.size())
927927 {
928928 SVNExternal ext = m_externals[pLVCD->nmcd.dwItemSpec];
--- trunk/src/TortoiseProc/FileDiffDlg.cpp (revision 28837)
+++ trunk/src/TortoiseProc/FileDiffDlg.cpp (revision 28838)
@@ -550,7 +550,7 @@
550550 // Tell Windows to paint the control itself.
551551 *pResult = CDRF_DODEFAULT;
552552
553- COLORREF crText = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
553+ COLORREF crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
554554
555555 if (m_arFilteredList.size() > pLVCD->nmcd.dwItemSpec)
556556 {
--- trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28837)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28838)
@@ -526,8 +526,16 @@
526526 CHARFORMAT2 format = { 0 };
527527 format.cbSize = sizeof(CHARFORMAT2);
528528 format.dwMask = CFM_COLOR | CFM_BACKCOLOR;
529- format.crTextColor = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
530- format.crBackColor = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOW));
529+ if (CTheme::Instance().IsDarkTheme())
530+ {
531+ format.crTextColor = CTheme::darkTextColor;
532+ format.crBackColor = CTheme::darkBkColor;
533+ }
534+ else
535+ {
536+ format.crTextColor = GetSysColor(COLOR_WINDOWTEXT);
537+ format.crBackColor = GetSysColor(COLOR_WINDOW);
538+ }
531539 pWnd->SendMessage(EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&format);
532540 pWnd->SendMessage(EM_SETBKGNDCOLOR, 0, (LPARAM)format.crBackColor);
533541 }
@@ -3492,7 +3500,7 @@
34923500 if (m_bLogThreadRunning)
34933501 return;
34943502
3495- static COLORREF crText = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
3503+ static COLORREF crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
34963504
34973505 switch (pLVCD->nmcd.dwDrawStage)
34983506 {
@@ -3509,7 +3517,7 @@
35093517
35103518 // Tell Windows to send draw notifications for each subitem.
35113519 *pResult = CDRF_NOTIFYSUBITEMDRAW;
3512- crText = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
3520+ crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
35133521 if (m_logEntries.GetVisibleCount() > pLVCD->nmcd.dwItemSpec)
35143522 {
35153523 PLOGENTRYDATA data = m_logEntries.GetVisible(pLVCD->nmcd.dwItemSpec);
@@ -3700,7 +3708,7 @@
37003708 // Tell Windows to send draw notifications for each subitem.
37013709 *pResult = CDRF_NOTIFYSUBITEMDRAW;
37023710
3703- COLORREF crText = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
3711+ COLORREF crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
37043712 bool bGrayed = false;
37053713 if ((m_cShowPaths.GetState() & 0x0003) == BST_UNCHECKED)
37063714 {
@@ -3841,7 +3849,7 @@
38413849 if (pLogEntry && pLogEntry->GetChangedPaths().ContainsSelfCopy())
38423850 brush = ::CreateSolidBrush(CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_MENU)));
38433851 else
3844- brush = ::CreateSolidBrush(CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOW)));
3852+ brush = ::CreateSolidBrush(CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW));
38453853 }
38463854 if (brush == NULL)
38473855 return rect;
@@ -3987,7 +3995,7 @@
39873995 if (::GetFocus() == listCtrl.GetSafeHwnd())
39883996 textColor = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));
39893997 else
3990- textColor = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT));
3998+ textColor = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
39913999 }
39924000 SetTextColor(pLVCD->nmcd.hdc, textColor);
39934001 SetBkMode(pLVCD->nmcd.hdc, TRANSPARENT);
@@ -4145,7 +4153,7 @@
41454153 return CDRF_NOTIFYITEMDRAW;
41464154 case CDDS_ITEMPREPAINT:
41474155 {
4148- pNMTB->clrText = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT));
4156+ pNMTB->clrText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
41494157 return CDRF_DODEFAULT | TBCDRF_USECDCOLORS;
41504158 }
41514159 }
--- trunk/src/TortoiseProc/Properties/EditPropertiesDlg.cpp (revision 28837)
+++ trunk/src/TortoiseProc/Properties/EditPropertiesDlg.cpp (revision 28838)
@@ -435,7 +435,7 @@
435435 if ((int)pLVCD->nmcd.dwItemSpec > m_propList.GetItemCount())
436436 return;
437437
438- COLORREF crText = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
438+ COLORREF crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
439439 PropValue * pProp = (PropValue*)m_propList.GetItemData(static_cast<int>(pLVCD->nmcd.dwItemSpec));
440440
441441 if (pProp->isbinary)
--- trunk/src/TortoiseProc/RepositoryBrowser.cpp (revision 28837)
+++ trunk/src/TortoiseProc/RepositoryBrowser.cpp (revision 28838)
@@ -5029,7 +5029,7 @@
50295029
50305030 if (m_RepoList.GetItemCount() > (int)pLVCD->nmcd.dwItemSpec)
50315031 {
5032- COLORREF crText = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOWTEXT));
5032+ COLORREF crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
50335033 CAutoReadLock locker(m_guard);
50345034 CItem * pItem = (CItem*)m_RepoList.GetItemData((int)pLVCD->nmcd.dwItemSpec);
50355035 if (pItem && pItem->unversioned)
--- trunk/src/TortoiseProc/SVNProgressDlg.cpp (revision 28837)
+++ trunk/src/TortoiseProc/SVNProgressDlg.cpp (revision 28838)
@@ -1999,7 +1999,7 @@
19991999 {
20002000 if ((*it)->bConflictedActionItem)
20012001 {
2002- (*it)->color = ::GetSysColor(COLOR_WINDOWTEXT);
2002+ (*it)->color = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
20032003 (*it)->colorIsDirect = false;
20042004 (*it)->action = svn_wc_notify_resolved;
20052005 (*it)->sActionColumnText.LoadString(IDS_SVNACTION_RESOLVE);
@@ -2359,7 +2359,7 @@
23592359 DialogEnableWindow(IDOK, TRUE);
23602360 break;
23612361 }
2362- data2->color = ::GetSysColor(COLOR_WINDOWTEXT);
2362+ data2->color = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
23632363 data2->colorIsDirect = false;
23642364 data2->action = svn_wc_notify_resolved;
23652365 data2->sActionColumnText.LoadString(IDS_SVNACTION_RESOLVE);
--- trunk/src/TortoiseUDiff/MainWindow.cpp (revision 28837)
+++ trunk/src/TortoiseUDiff/MainWindow.cpp (revision 28838)
@@ -751,7 +751,7 @@
751751 SendEditor(SCI_STYLESETFORE, STYLE_BRACEBAD, RGB(255, 0, 0));
752752 SendEditor(SCI_STYLESETBOLD, STYLE_BRACEBAD, 1);
753753 SendEditor(SCI_SETFOLDMARGINCOLOUR, true, UDiffTextColorDark);
754- SendEditor(SCI_SETFOLDMARGINHICOLOUR, true, RGB(0, 0, 0));
754+ SendEditor(SCI_SETFOLDMARGINHICOLOUR, true, CTheme::darkBkColor);
755755 SendEditor(SCI_STYLESETFORE, STYLE_LINENUMBER, RGB(140, 140, 140));
756756 SendEditor(SCI_STYLESETBACK, STYLE_LINENUMBER, UDiffBackColorDark);
757757 }
--- trunk/src/Utils/MiscUI/FilterEdit.cpp (revision 28837)
+++ trunk/src/Utils/MiscUI/FilterEdit.cpp (revision 28838)
@@ -38,7 +38,7 @@
3838 , m_iButtonClickedMessageId(WM_FILTEREDIT_INFOCLICKED)
3939 , m_iCancelClickedMessageId(WM_FILTEREDIT_CANCELCLICKED)
4040 , m_pValidator(NULL)
41- , m_backColor(CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOW)))
41+ , m_backColor(CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW))
4242 , m_themeCallbackId(0)
4343 {
4444 m_rcEditArea.SetRect(0, 0, 0, 0);
@@ -332,7 +332,7 @@
332332
333333 HBRUSH CFilterEdit::CtlColor(CDC* pDC, UINT /*nCtlColor*/)
334334 {
335- if (m_backColor != CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOW)))
335+ if (m_backColor != (CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW)))
336336 {
337337 pDC->SetBkColor(m_backColor);
338338 return m_brBack;
@@ -352,7 +352,7 @@
352352 {
353353 CString text;
354354 GetWindowText(text);
355- m_backColor = CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOW));
355+ m_backColor = CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW);
356356 if (!m_pValidator->Validate(text))
357357 {
358358 // Use a background color slightly shifted to red.
@@ -408,7 +408,7 @@
408408
409409 dcDraw.SelectObject((*GetFont()));
410410 dcDraw.SetTextColor(CTheme::Instance().GetThemeColor(GetSysColor(COLOR_GRAYTEXT)));
411- dcDraw.SetBkColor(CTheme::Instance().GetThemeColor(GetSysColor(COLOR_WINDOW)));
411+ dcDraw.SetBkColor(CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW));
412412 dcDraw.DrawText(m_sCueBanner, m_sCueBanner.GetLength(), &m_rcEditArea, DT_CENTER | DT_VCENTER);
413413 dcDraw.RestoreDC(iState);
414414 return;
--- trunk/src/Utils/MiscUI/HintCtrl.h (revision 28837)
+++ trunk/src/Utils/MiscUI/HintCtrl.h (revision 28838)
@@ -26,13 +26,16 @@
2626 * content. Can be used for example during lengthy operations (showing "please wait")
2727 * or to indicate why the control is empty (showing "no data available").
2828 */
29-template <typename BaseType> class CHintCtrl : public BaseType
29+template <typename BaseType>
30+class CHintCtrl : public BaseType
3031 {
3132 public:
32- CHintCtrl() : BaseType(), m_uiFont(0)
33+ CHintCtrl()
34+ : BaseType()
35+ , m_uiFont(0)
3336 {
34- NONCLIENTMETRICS metrics = { 0 };
35- metrics.cbSize = sizeof(NONCLIENTMETRICS);
37+ NONCLIENTMETRICS metrics = {0};
38+ metrics.cbSize = sizeof(NONCLIENTMETRICS);
3639 SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, FALSE);
3740 m_uiFont = CreateFontIndirect(&metrics.lfMessageFont);
3841 }
@@ -61,28 +64,27 @@
6164 Invalidate();
6265 }
6366
64- bool HasText() const {return !m_sText.IsEmpty();}
67+ bool HasText() const { return !m_sText.IsEmpty(); }
6568
6669 DECLARE_MESSAGE_MAP()
6770
6871 protected:
69-
7072 afx_msg void CHintCtrl::OnPaint()
7173 {
7274 LRESULT defres = Default();
7375 if (!m_sText.IsEmpty())
7476 {
75- COLORREF clrText = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT));
77+ COLORREF clrText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : ::GetSysColor(COLOR_WINDOWTEXT);
7678 COLORREF clrTextBk;
7779 if (IsWindowEnabled())
78- clrTextBk = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOW));
80+ clrTextBk = CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : ::GetSysColor(COLOR_WINDOW);
7981 else
8082 clrTextBk = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_3DFACE));
8183
8284 CRect rc;
8385 GetClientRect(&rc);
84- bool bIsEmpty = false;
85- CListCtrl * pListCtrl = dynamic_cast<CListCtrl*>(this);
86+ bool bIsEmpty = false;
87+ CListCtrl* pListCtrl = dynamic_cast<CListCtrl*>(this);
8688 if (pListCtrl)
8789 {
8890 CHeaderCtrl* pHC;
@@ -99,6 +101,8 @@
99101 CDC* pDC = GetDC();
100102 {
101103 pDC->SetBkMode(TRANSPARENT);
104+ pDC->SetTextColor(clrText);
105+ pDC->SetBkColor(clrTextBk);
102106 CMyMemDC memDC(pDC, &rc);
103107
104108 memDC.SetTextColor(clrText);
@@ -109,9 +113,8 @@
109113 else
110114 memDC.FillSolidRect(rc, clrTextBk);
111115 rc.top += 10;
112- CGdiObject * oldfont = memDC.SelectObject(CGdiObject::FromHandle(m_uiFont));
113- memDC.DrawText(m_sText, rc, DT_CENTER | DT_VCENTER |
114- DT_WORDBREAK | DT_NOPREFIX | DT_NOCLIP);
116+ CGdiObject* oldfont = memDC.SelectObject(CGdiObject::FromHandle(m_uiFont));
117+ memDC.DrawText(m_sText, rc, DT_CENTER | DT_VCENTER | DT_WORDBREAK | DT_NOPREFIX | DT_NOCLIP);
115118 memDC.SelectObject(oldfont);
116119 }
117120 ReleaseDC(pDC);
@@ -129,11 +132,11 @@
129132 }
130133
131134 private:
132- CString m_sText;
133- HFONT m_uiFont;
135+ CString m_sText;
136+ HFONT m_uiFont;
134137 };
135138
136139 BEGIN_TEMPLATE_MESSAGE_MAP(CHintCtrl, BaseType, BaseType)
137- ON_WM_PAINT()
138-END_MESSAGE_MAP()
139-
140+ON_WM_PAINT()
141+END_MESSAGE_MAP
142+()
--- trunk/src/Utils/MiscUI/MyGraph.cpp (revision 28837)
+++ trunk/src/Utils/MiscUI/MyGraph.cpp (revision 28838)
@@ -695,9 +695,9 @@
695695 if (GetMaxSeriesSize()) {
696696 dc.SetBkMode(TRANSPARENT);
697697
698- dc.SetTextColor(CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT)));
699- auto themePen = CreatePen(PS_SOLID, 1, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT)));
700- auto themeBrush = CreateSolidBrush(CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOW)));
698+ dc.SetTextColor(CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
699+ auto themePen = CreatePen(PS_SOLID, 1, CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
700+ auto themeBrush = CreateSolidBrush(CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW));
701701 auto oldThemePen = dc.SelectObject(themePen);
702702 auto oldThemeBrush = dc.SelectObject(themeBrush);
703703
@@ -707,7 +707,7 @@
707707
708708 int baseColorL = 120;
709709 int diffColorL = 60;
710- DWORD backgroundColor = CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOW));
710+ DWORD backgroundColor = CTheme::Instance().IsDarkTheme() ? CTheme::darkBkColor : GetSysColor(COLOR_WINDOW);
711711 // If graph is a non-stacked line graph, use darker colors if system window color is light.
712712 #if 0
713713 if (m_eGraphType == MyGraph::Line && !m_bStackedGraph) {
@@ -922,7 +922,7 @@
922922 if (nShownAuthors < GetMaxSeriesSize())
923923 skipped_row = nShownAuthors-2;
924924
925- dc.SetTextColor(CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT)));
925+ dc.SetTextColor(CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
926926 // Draw each group's label and bar.
927927 for (int nGroup = 0; nGroup < nShownAuthors; ++nGroup) {
928928
@@ -981,7 +981,7 @@
981981 ASSERT_VALID(&dc);
982982 _ASSERTE(MyGraph::PieChart != m_eGraphType);
983983
984- dc.SetTextColor(CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT)));
984+ dc.SetTextColor(CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT));
985985
986986 // Draw y axis.
987987 dc.MoveTo(m_ptOrigin);
--- trunk/src/Utils/MiscUI/SciEdit.cpp (revision 28837)
+++ trunk/src/Utils/MiscUI/SciEdit.cpp (revision 28838)
@@ -1056,15 +1056,21 @@
10561056 void CSciEdit::OnSysColorChange()
10571057 {
10581058 __super::OnSysColorChange();
1059+ Call(SCI_CLEARDOCUMENTSTYLE);
10591060 if (CTheme::Instance().IsDarkTheme())
1061+ {
10601062 SetClassLongPtr(GetSafeHwnd(), GCLP_HBRBACKGROUND, (LONG_PTR)GetStockObject(BLACK_BRUSH));
1063+ Call(SCI_STYLESETFORE, STYLE_DEFAULT, CTheme::darkTextColor);
1064+ Call(SCI_STYLESETBACK, STYLE_DEFAULT, CTheme::darkBkColor);
1065+ Call(SCI_SETCARETFORE, CTheme::darkTextColor);
1066+ }
10611067 else
1068+ {
10621069 SetClassLongPtr(GetSafeHwnd(), GCLP_HBRBACKGROUND, (LONG_PTR)GetSysColorBrush(COLOR_3DFACE));
1063-
1064- Call(SCI_CLEARDOCUMENTSTYLE);
1065- Call(SCI_STYLESETFORE, STYLE_DEFAULT, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT)));
1066- Call(SCI_STYLESETBACK, STYLE_DEFAULT, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOW)));
1067- Call(SCI_SETCARETFORE, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_WINDOWTEXT)));
1070+ Call(SCI_STYLESETFORE, STYLE_DEFAULT, ::GetSysColor(COLOR_WINDOWTEXT));
1071+ Call(SCI_STYLESETBACK, STYLE_DEFAULT, ::GetSysColor(COLOR_WINDOW));
1072+ Call(SCI_SETCARETFORE, ::GetSysColor(COLOR_WINDOWTEXT));
1073+ }
10681074 Call(SCI_SETSELFORE, TRUE, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_HIGHLIGHTTEXT)));
10691075 Call(SCI_SETSELBACK, TRUE, CTheme::Instance().GetThemeColor(::GetSysColor(COLOR_HIGHLIGHT)));
10701076 }
--- trunk/src/Utils/Theme.cpp (revision 28837)
+++ trunk/src/Utils/Theme.cpp (revision 28838)
@@ -34,10 +34,6 @@
3434 #pragma warning(pop)
3535 #include "SmartHandle.h"
3636
37-constexpr COLORREF darkBkColor = 0x101010;
38-constexpr COLORREF darkTextColor = 0xEEEEEE;
39-constexpr COLORREF darkDisabledTextColor = 0x808080;
40-
4137 constexpr auto SubclassID = 1234;
4238
4339 static int GetStateFromBtnState(LONG_PTR dwStyle, BOOL bHot, BOOL bFocus, LRESULT dwCheckState, int iPartId, BOOL bHasMouseCapture);
@@ -549,7 +545,8 @@
549545 if (hFontOld)
550546 hFontOld = (HFONT)SelectObject(hdcPaint, hFontOld);
551547
552- PatBlt(hdcPaint, 0, 0, RECTWIDTH(rcClient), RECTHEIGHT(rcClient), BLACKNESS);
548+ ::SetBkColor(hdcPaint, darkBkColor);
549+ ::ExtTextOut(hdcPaint, 0, 0, ETO_OPAQUE, &rcClient, nullptr, 0, nullptr);
553550
554551 BufferedPaintSetAlpha(hBufferedPaint, &ps.rcPaint, 0x00);
555552
@@ -560,7 +557,7 @@
560557
561558 DetermineGlowSize(&DttOpts.iGlowSize);
562559
563- COLORREF cr = RGB(0x00, 0x00, 0x00);
560+ COLORREF cr = darkBkColor;
564561 GetEditBorderColor(hWnd, &cr);
565562 cr |= 0xff000000;
566563
@@ -590,7 +587,8 @@
590587 rcDraw = rcClient;
591588 rcDraw.left += iX;
592589 DrawTextW(hdcPaint, szText, -1, &rcDraw, dwFlags | DT_CALCRECT);
593- PatBlt(hdcPaint, rcDraw.left, rcDraw.top, RECTWIDTH(rcDraw) + 3, RECTHEIGHT(rcDraw), BLACKNESS);
590+ ::SetBkColor(hdcPaint, darkBkColor);
591+ ::ExtTextOut(hdcPaint, 0, 0, ETO_OPAQUE, &rcDraw, nullptr, 0, nullptr);
594592 rcDraw.left++;
595593 rcDraw.right++;
596594
@@ -626,7 +624,8 @@
626624 HPAINTBUFFER hBufferedPaint = BeginBufferedPaint(hdc, &rcClient, BPBF_TOPDOWNDIB, &params, &hdcPaint);
627625 if (hdcPaint)
628626 {
629- PatBlt(hdcPaint, 0, 0, RECTWIDTH(rcClient), RECTHEIGHT(rcClient), BLACKNESS);
627+ ::SetBkColor(hdcPaint, darkBkColor);
628+ ::ExtTextOut(hdcPaint, 0, 0, ETO_OPAQUE, &rcClient, nullptr, 0, nullptr);
630629
631630 BufferedPaintSetAlpha(hBufferedPaint, &ps.rcPaint, 0x00);
632631
--- trunk/src/Utils/Theme.h (revision 28837)
+++ trunk/src/Utils/Theme.h (revision 28838)
@@ -38,6 +38,10 @@
3838 public:
3939 static CTheme& Instance();
4040
41+ static const COLORREF darkBkColor = 0x202020;
42+ static const COLORREF darkTextColor = 0xDDDDDD;
43+ static const COLORREF darkDisabledTextColor = 0x808080;
44+
4145 /// call this on every WM_SYSCOLORCHANGED message
4246 void OnSysColorChanged();
4347 /// returns true if dark mode is even allowed. We only allow dark mode on Win10 1809 or later.
Show on old repository browser