mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Use palatable Fusion backup style to correctly draw progress bar in folder settings instead of QCommonStyle
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
ac0d39e219
commit
d31a9ec9ce
1 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QCommonStyle>
|
#include <QStyleFactory>
|
||||||
|
|
||||||
inline static QFont makeAliasFont(const QFont &normalFont)
|
inline static QFont makeAliasFont(const QFont &normalFont)
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ inline static QFont makeAliasFont(const QFont &normalFont)
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
QCommonStyle backupStyle;
|
const auto backupStyle = QStyleFactory::create("Fusion");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||||
progressBarOpt.orientation = Qt::Horizontal;
|
progressBarOpt.orientation = Qt::Horizontal;
|
||||||
progressBarOpt.rect = QStyle::visualRect(option.direction, option.rect, progressBarRect);
|
progressBarOpt.rect = QStyle::visualRect(option.direction, option.rect, progressBarRect);
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
backupStyle.drawControl(QStyle::CE_ProgressBar, &progressBarOpt, painter, option.widget);
|
backupStyle->drawControl(QStyle::CE_ProgressBar, &progressBarOpt, painter, option.widget);
|
||||||
#else
|
#else
|
||||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &progressBarOpt, painter, option.widget);
|
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &progressBarOpt, painter, option.widget);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue