Mercurial > hg > svcore
changeset 1821:472865574b1a background-mode
Use slightly lighter version of accent colour in dark mode - it generally seems more appropriate in practice
author | Chris Cannam |
---|---|
date | Fri, 24 Jan 2020 12:38:55 +0000 |
parents | fc18ce2d99d7 |
children | 0bc6caf87658 |
files | system/System.cpp |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/system/System.cpp Thu Jan 23 15:43:30 2020 +0000 +++ b/system/System.cpp Fri Jan 24 12:38:55 2020 +0000 @@ -359,11 +359,13 @@ SVCERR << "OSQueryAccentColour() called" << endl; #ifdef _MSC_VER using namespace winrt::Windows::UI::ViewManagement; + bool dark = OSReportsDarkThemeActive(); UISettings settings; - auto background = settings.GetColorValue(UIColorType::Accent); - r = background.R; - g = background.G; - b = background.B; + auto accent = settings.GetColorValue + (dark ? UIColorType::AccentLight1 : UIColorType::Accent); + r = accent.R; + g = accent.G; + b = accent.B; return true; #endif return false;