comparison system/System.cpp @ 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 029d7d3f0a3a
comparison
equal deleted inserted replaced
1820:fc18ce2d99d7 1821:472865574b1a
357 OSQueryAccentColour(int &r, int &g, int &b) 357 OSQueryAccentColour(int &r, int &g, int &b)
358 { 358 {
359 SVCERR << "OSQueryAccentColour() called" << endl; 359 SVCERR << "OSQueryAccentColour() called" << endl;
360 #ifdef _MSC_VER 360 #ifdef _MSC_VER
361 using namespace winrt::Windows::UI::ViewManagement; 361 using namespace winrt::Windows::UI::ViewManagement;
362 bool dark = OSReportsDarkThemeActive();
362 UISettings settings; 363 UISettings settings;
363 auto background = settings.GetColorValue(UIColorType::Accent); 364 auto accent = settings.GetColorValue
364 r = background.R; 365 (dark ? UIColorType::AccentLight1 : UIColorType::Accent);
365 g = background.G; 366 r = accent.R;
366 b = background.B; 367 g = accent.G;
368 b = accent.B;
367 return true; 369 return true;
368 #endif 370 #endif
369 return false; 371 return false;
370 } 372 }
371 373