2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Remove some unused themes code.

This commit is contained in:
John Preston
2018-09-29 09:53:30 +03:00
parent 20e303d3e6
commit 29432d5d6a
3 changed files with 1 additions and 42 deletions

View File

@@ -451,7 +451,7 @@ void ChatBackground::setPreparedImage(QImage &&image) {
if (testingPalette()) {
return false;
} else if (IsNonDefaultThemeOrBackground() || nightMode()) {
} else if (isNonDefaultThemeOrBackground() || nightMode()) {
return !usingThemeBackground();
}
return !usingDefaultBackground();
@@ -857,10 +857,6 @@ bool Apply(std::unique_ptr<Preview> preview) {
return true;
}
void ApplyDefault() {
ApplyDefaultWithPath(IsNightMode() ? NightThemePath() : QString());
}
void ApplyDefaultWithPath(const QString &themePath) {
if (!themePath.isEmpty()) {
if (auto preview = PreviewFromFile(themePath)) {
@@ -937,10 +933,6 @@ QString NightThemePath() {
return str_const_toString(kNightThemeFile);
}
bool IsNonDefaultThemeOrBackground() {
return Background()->isNonDefaultThemeOrBackground();
}
bool IsNonDefaultBackground() {
return Background()->isNonDefaultBackground();
}
@@ -963,10 +955,6 @@ void ToggleNightMode(const QString &path) {
Background()->toggleNightMode(path);
}
bool SuggestThemeReset() {
return IsNonDefaultThemeOrBackground();
}
bool LoadFromFile(const QString &path, Instance *out, QByteArray *outContent) {
*outContent = readThemeContent(path);
if (outContent->size() < 4) {