Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2020-08-19 18:27:34 +0300
committerHannah von Reth <vonreth@kde.org>2020-08-21 12:38:17 +0300
commit4d21f8fb72fe48b32035041f4d629ae57ce4eae7 (patch)
tree6b5a41999f3ba65ba43778b2b3deacded71092b7 /src/gui/guiutility.cpp
parent1a78bf1ef14af7c673c535a2ce8d777823f686fe (diff)
Use QIcon where possible, don't invert color of icons we will use color that...
matches a dark and light theme or use two seperate themes.
Diffstat (limited to 'src/gui/guiutility.cpp')
-rw-r--r--src/gui/guiutility.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/gui/guiutility.cpp b/src/gui/guiutility.cpp
index 2c31d3ec5..71cec1073 100644
--- a/src/gui/guiutility.cpp
+++ b/src/gui/guiutility.cpp
@@ -97,17 +97,3 @@ QString Utility::vfsFreeSpaceActionText()
{
return QCoreApplication::translate("utility", "Free up local space");
}
-
-QPixmap Utility::createColorAwareIcon(const QString &name, const QPalette &palette)
-{
- const QColor bg(palette.base().color());
- QImage img(Theme::hidpiFileName(name));
- if (img.isGrayscale()) {
- // account for different sensitivity of the human eye to certain colors
- double treshold = 1.0 - (0.299 * bg.red() + 0.587 * bg.green() + 0.114 * bg.blue()) / 255.0;
- if (treshold > 0.5) {
- img.invertPixels(QImage::InvertRgb);
- }
- }
- return QPixmap::fromImage(img);
-}