2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-25 15:16:15 +00:00

Removing almost all animated over states in IconButton.

This commit is contained in:
John Preston
2016-11-01 15:46:34 +03:00
parent e08f5437a6
commit c932f3d9df
44 changed files with 435 additions and 307 deletions

View File

@@ -822,16 +822,20 @@ QString ParsedFile::readMonoIconFilename() {
if (auto filename = readValue()) {
if (filename.type().tag == structure::TypeTag::String) {
auto filepath = QString::fromStdString(filename.String());
auto inverted = filepath.endsWith("-invert");
if (inverted) {
filepath.chop(QLatin1String("-invert").size());
}
for (const auto &path : options_.includePaths) {
QFileInfo fileinfo(path + '/' + filepath + ".png");
if (fileinfo.exists()) {
return path + '/' + filepath;
return path + '/' + filepath + (inverted ? "-invert" : "");
}
}
for (const auto &path : options_.includePaths) {
QFileInfo fileinfo(path + "/icons/" + filepath + ".png");
if (fileinfo.exists()) {
return path + "/icons/" + filepath;
return path + "/icons/" + filepath + (inverted ? "-invert" : "");
}
}
logError(common::kErrorFileNotFound) << "could not open icon file '" << filename.String() << "'";