Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dark wallpaper #1709

Merged
merged 4 commits into from Jul 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Background/BackgroundSource.vala
Expand Up @@ -23,6 +23,7 @@ namespace Gala {
"picture-opacity",
"picture-options",
"picture-uri",
"picture-uri-dark",
"primary-color",
"secondary-color"
};
Expand Down Expand Up @@ -67,6 +68,9 @@ namespace Gala {
}
}
});

unowned var granite_settings = Granite.Settings.get_default ();
granite_settings.notify["prefers-color-scheme"].connect (() => changed ());
}

private void monitors_changed () {
Expand All @@ -91,7 +95,10 @@ namespace Gala {

var style = settings.get_enum ("picture-options");
if (style != GDesktop.BackgroundStyle.NONE) {
var uri = settings.get_string ("picture-uri");
var uri = settings.get_string (
Granite.Settings.get_default ().prefers_color_scheme == DARK ?
"picture-uri-dark" : "picture-uri"
);
lenemter marked this conversation as resolved.
Show resolved Hide resolved
if (Uri.parse_scheme (uri) != null)
filename = File.new_for_uri (uri).get_path ();
else
Expand Down