|
|
@ -34,8 +34,10 @@ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#include <QApplication> |
|
|
|
#include <QApplication> |
|
|
|
|
|
|
|
#include <QColor> |
|
|
|
#include <QDesktopServices> |
|
|
|
#include <QDesktopServices> |
|
|
|
#include <QIcon> |
|
|
|
#include <QIcon> |
|
|
|
|
|
|
|
#include <QPalette> |
|
|
|
#include <QPixmap> |
|
|
|
#include <QPixmap> |
|
|
|
#include <QPixmapCache> |
|
|
|
#include <QPixmapCache> |
|
|
|
#include <QPoint> |
|
|
|
#include <QPoint> |
|
|
@ -54,6 +56,13 @@ |
|
|
|
#include "base/utils/fs.h" |
|
|
|
#include "base/utils/fs.h" |
|
|
|
#include "base/utils/version.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) |
|
|
|
QPixmap Utils::Gui::scaledPixmap(const QIcon &icon, const QWidget *widget, const int height) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Q_UNUSED(widget); // TODO: remove it
|
|
|
|
Q_UNUSED(widget); // TODO: remove it
|
|
|
|