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

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schuster <michael@schuster.ms>2019-12-19 21:50:21 +0300
committerMichael Schuster <48932272+misch7@users.noreply.github.com>2019-12-20 00:07:30 +0300
commitacedf362b67d95164d892d8971413e797b0cef0d (patch)
treea9727914371063a896a9d235303910fff937fd81 /src/gui/folderstatusdelegate.cpp
parent3b580eeca7f8ac5837459d439685cc9e82fa0c67 (diff)
Make AccountSettings and ActivitySettings background-aware (Dark-/Light-Mode switching)
Signed-off-by: Michael Schuster <michael@schuster.ms>
Diffstat (limited to 'src/gui/folderstatusdelegate.cpp')
-rw-r--r--src/gui/folderstatusdelegate.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/folderstatusdelegate.cpp b/src/gui/folderstatusdelegate.cpp
index 337530da9..5cd2ed118 100644
--- a/src/gui/folderstatusdelegate.cpp
+++ b/src/gui/folderstatusdelegate.cpp
@@ -40,7 +40,7 @@ namespace OCC {
FolderStatusDelegate::FolderStatusDelegate()
: QStyledItemDelegate()
{
- m_moreIcon = QIcon(QLatin1String(":/client/resources/more.svg"));
+ customizeStyle();
}
QString FolderStatusDelegate::addFolderText()
@@ -349,7 +349,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
btnOpt.arrowType = Qt::NoArrow;
btnOpt.subControls = QStyle::SC_ToolButton;
btnOpt.rect = optionsButtonVisualRect;
- btnOpt.icon = m_moreIcon;
+ btnOpt.icon = _iconMore;
int e = QApplication::style()->pixelMetric(QStyle::PM_ButtonIconSize);
btnOpt.iconSize = QSize(e,e);
QApplication::style()->drawComplexControl(QStyle::CC_ToolButton, &btnOpt, painter);
@@ -423,5 +423,14 @@ QRect FolderStatusDelegate::errorsListRect(QRect within)
return within;
}
+void FolderStatusDelegate::slotStyleChanged()
+{
+ customizeStyle();
+}
+
+void FolderStatusDelegate::customizeStyle()
+{
+ _iconMore = Theme::createColorAwareIcon(QLatin1String(":/client/resources/more.svg"));
+}
} // namespace OCC