2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Apply cloud themes.

This commit is contained in:
John Preston
2019-09-03 21:04:38 +03:00
parent ac8f924909
commit 4929de2bfb
12 changed files with 280 additions and 152 deletions

View File

@@ -998,9 +998,9 @@ void SetupDefaultThemes(not_null<Ui::VerticalLayout*> container) {
container.get());
const auto chosen = [] {
const auto path = Window::Theme::Background()->themeAbsolutePath();
const auto &object = Window::Theme::Background()->themeObject();
for (const auto &scheme : kSchemesList) {
if (path == scheme.path) {
if (object.pathAbsolute == scheme.path) {
return scheme.type;
}
}
@@ -1013,7 +1013,8 @@ void SetupDefaultThemes(not_null<Ui::VerticalLayout*> container) {
const auto type = scheme.type;
return (type != Type::DayBlue) && (type != Type::Default);
};
const auto currentlyIsCustom = (chosen() == Type(-1));
const auto currentlyIsCustom = (chosen() == Type(-1))
&& !Window::Theme::Background()->themeObject().cloud.id;
if (Window::Theme::IsNightMode() == isNight(scheme)) {
Window::Theme::ApplyDefaultWithPath(scheme.path);
} else {