Allow to use another icons in dark mode

PR #18435.
This commit is contained in:
Vladimir Golovnev
2023-02-07 22:07:15 +03:00
committed by GitHub
parent 22ea508ff6
commit 72ac92ec68
7 changed files with 365 additions and 209 deletions

View File

@@ -35,10 +35,8 @@
#endif
#include <QApplication>
#include <QColor>
#include <QDesktopServices>
#include <QIcon>
#include <QPalette>
#include <QPixmap>
#include <QPixmapCache>
#include <QPoint>
@@ -57,13 +55,6 @@
#include "base/utils/fs.h"
#include "base/utils/version.h"
bool Utils::Gui::isDarkTheme()
{
const QPalette palette = qApp->palette();
const QColor &color = palette.color(QPalette::Active, QPalette::Base);
return (color.lightness() < 127);
}
QPixmap Utils::Gui::scaledPixmap(const QIcon &icon, const QWidget *widget, const int height)
{
Q_UNUSED(widget); // TODO: remove it