Update launcher/Application.cpp with suggestion from scrumplex
Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net> Signed-off-by: Tayou <tayou@gmx.net>
This commit is contained in:
parent
6daa457838
commit
7d440402ad
3 changed files with 8 additions and 3 deletions
|
@ -143,7 +143,7 @@ QString ThemeManager::getCatImage(QString catName)
|
|||
QDateTime birthday(QDate(now.date().year(), 11, 30), QTime(0, 0));
|
||||
QDateTime xmas(QDate(now.date().year(), 12, 25), QTime(0, 0));
|
||||
QDateTime halloween(QDate(now.date().year(), 10, 31), QTime(0, 0));
|
||||
QString cat = catName == "" ? APPLICATION->settings()->get("BackgroundCat").toString() : catName;
|
||||
QString cat = !catName.isEmpty() ? catName : APPLICATION->settings()->get("BackgroundCat").toString();
|
||||
if (std::abs(now.daysTo(xmas)) <= 4) {
|
||||
cat += "-xmas";
|
||||
} else if (std::abs(now.daysTo(halloween)) <= 4) {
|
||||
|
@ -152,4 +152,4 @@ QString ThemeManager::getCatImage(QString catName)
|
|||
cat += "-bday";
|
||||
}
|
||||
return cat;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue