mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
Add darkmode support for the settings window (#494)
This commit is contained in:
committed by
GitHub
parent
c8039828fa
commit
52b15f29ad
@@ -50,6 +50,10 @@ WindowsColors::Color WindowsColors::get_accent_color() {
|
||||
WindowsColors::Color WindowsColors::get_background_color() {
|
||||
winrt::Windows::UI::ViewManagement::UISettings uiSettings;
|
||||
return uiSettings.GetColorValue(winrt::Windows::UI::ViewManagement::UIColorType::Background);
|
||||
}
|
||||
|
||||
bool WindowsColors::is_dark_mode() {
|
||||
return rgb_color(get_background_color()) == 0;
|
||||
}
|
||||
|
||||
bool WindowsColors::update() {
|
||||
|
||||
@@ -16,7 +16,7 @@ struct WindowsColors {
|
||||
static Color get_accent_dark_1_color();
|
||||
static Color get_accent_color();
|
||||
static Color get_background_color();
|
||||
|
||||
static bool is_dark_mode();
|
||||
// Update colors - returns true if the values where changed
|
||||
bool update();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user