Apply clang-format
This commit is contained in:
parent
0651323da4
commit
9e3cd95b13
|
@ -4,8 +4,8 @@
|
|||
#include <syncthingmodel/syncthingdevicemodel.h>
|
||||
#include <syncthingmodel/syncthingicons.h>
|
||||
|
||||
#include <qtforkawesome/renderer.h>
|
||||
#include <qtforkawesome/icon.h>
|
||||
#include <qtforkawesome/renderer.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBrush>
|
||||
|
@ -57,7 +57,9 @@ void DevButtonsItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
|||
return;
|
||||
}
|
||||
const int buttonY = option.rect.y() + centerObj(option.rect.height(), 16);
|
||||
IconManager::instance().forkAwesomeRenderer().render(index.data(SyncthingDeviceModel::DevicePaused).toBool() ? QtForkAwesome::Icon::Play : QtForkAwesome::Icon::Pause, painter, QRect(option.rect.right() - 16, buttonY, 16, 16), QGuiApplication::palette().color(QPalette::Text));
|
||||
IconManager::instance().forkAwesomeRenderer().render(
|
||||
index.data(SyncthingDeviceModel::DevicePaused).toBool() ? QtForkAwesome::Icon::Play : QtForkAwesome::Icon::Pause, painter,
|
||||
QRect(option.rect.right() - 16, buttonY, 16, 16), QGuiApplication::palette().color(QPalette::Text));
|
||||
}
|
||||
}
|
||||
} // namespace QtGui
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include <syncthingmodel/syncthingdirectorymodel.h>
|
||||
#include <syncthingmodel/syncthingicons.h>
|
||||
|
||||
#include <qtforkawesome/renderer.h>
|
||||
#include <qtforkawesome/icon.h>
|
||||
#include <qtforkawesome/renderer.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBrush>
|
||||
|
@ -59,7 +59,8 @@ void DirButtonsItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
|||
if (!dirPaused) {
|
||||
forkAwesomeRenderer.render(QtForkAwesome::Icon::Refresh, painter, QRect(option.rect.right() - 52, buttonY, 16, 16), iconColor);
|
||||
}
|
||||
forkAwesomeRenderer.render(dirPaused ? QtForkAwesome::Icon::Play : QtForkAwesome::Icon::Pause, painter, QRect(option.rect.right() - 34, buttonY, 16, 16), iconColor);
|
||||
forkAwesomeRenderer.render(
|
||||
dirPaused ? QtForkAwesome::Icon::Play : QtForkAwesome::Icon::Pause, painter, QRect(option.rect.right() - 34, buttonY, 16, 16), iconColor);
|
||||
forkAwesomeRenderer.render(QtForkAwesome::Icon::Folder, painter, QRect(option.rect.right() - 16, buttonY, 16, 16), iconColor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include <syncthingmodel/syncthingdownloadmodel.h>
|
||||
#include <syncthingmodel/syncthingicons.h>
|
||||
|
||||
#include <qtforkawesome/renderer.h>
|
||||
#include <qtforkawesome/icon.h>
|
||||
#include <qtforkawesome/renderer.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QBrush>
|
||||
|
@ -83,7 +83,8 @@ void DownloadItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
if (!index.parent().isValid()) {
|
||||
buttonY += centerObj(progressBarOption.rect.height(), 16);
|
||||
}
|
||||
IconManager::instance().forkAwesomeRenderer().render(QtForkAwesome::Icon::Folder, painter, QRect(option.rect.right() - 16, buttonY, 16, 16), QGuiApplication::palette().color(QPalette::Text));
|
||||
IconManager::instance().forkAwesomeRenderer().render(
|
||||
QtForkAwesome::Icon::Folder, painter, QRect(option.rect.right() - 16, buttonY, 16, 16), QGuiApplication::palette().color(QPalette::Text));
|
||||
|
||||
// draw file icon
|
||||
if (index.parent().isValid()) {
|
||||
|
|
|
@ -49,8 +49,8 @@ TrayIcon::TrayIcon(const QString &connectionConfig, QObject *parent)
|
|||
|
||||
// set context menu
|
||||
#ifndef SYNCTHINGTRAY_UNIFY_TRAY_MENUS
|
||||
connect(m_contextMenu.addAction(QIcon(QStringLiteral("syncthing.fa")), tr("Open Syncthing")),
|
||||
&QAction::triggered, &widget, &TrayWidget::showWebUi);
|
||||
connect(
|
||||
m_contextMenu.addAction(QIcon(QStringLiteral("syncthing.fa")), tr("Open Syncthing")), &QAction::triggered, &widget, &TrayWidget::showWebUi);
|
||||
connect(m_contextMenu.addAction(
|
||||
QIcon::fromTheme(QStringLiteral("preferences-other"), QIcon(QStringLiteral(":/icons/hicolor/scalable/apps/preferences-other.svg"))),
|
||||
tr("Settings")),
|
||||
|
@ -59,9 +59,7 @@ TrayIcon::TrayIcon(const QString &connectionConfig, QObject *parent)
|
|||
QIcon::fromTheme(QStringLiteral("folder-sync"), QIcon(QStringLiteral(":/icons/hicolor/scalable/actions/folder-sync.svg"))),
|
||||
tr("Rescan all")),
|
||||
&QAction::triggered, &widget.connection(), &SyncthingConnection::rescanAllDirs);
|
||||
connect(m_contextMenu.addAction(QIcon(QStringLiteral("file-code-o.fa")),
|
||||
tr("Log")),
|
||||
&QAction::triggered, &widget, &TrayWidget::showLog);
|
||||
connect(m_contextMenu.addAction(QIcon(QStringLiteral("file-code-o.fa")), tr("Log")), &QAction::triggered, &widget, &TrayWidget::showLog);
|
||||
m_errorsAction = m_contextMenu.addAction(
|
||||
QIcon::fromTheme(QStringLiteral("emblem-error"), QIcon(QStringLiteral(":/icons/hicolor/scalable/emblems/8/emblem-error.svg"))),
|
||||
tr("Show internal errors"));
|
||||
|
|
Loading…
Reference in New Issue