[Pkg-owncloud-commits] [owncloud-client] 275/484: Folder Status: Use same fat ... icon as web

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 4784b327e74adf04781485219f62282234dcca3f
Author: Markus Goetz <markus at woboq.com>
Date:   Fri Nov 6 16:10:03 2015 +0100

    Folder Status: Use same fat ... icon as web
---
 client.qrc                       |   1 +
 resources/more.png               | Bin 0 -> 122 bytes
 src/gui/folderstatusdelegate.cpp |   8 +++++++-
 src/gui/folderstatusdelegate.h   |   2 ++
 4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/client.qrc b/client.qrc
index f1116f6..3505f5c 100644
--- a/client.qrc
+++ b/client.qrc
@@ -20,5 +20,6 @@
         <file>resources/lock-https.png</file>
         <file>resources/lock-https at 2x.png</file>
         <file>resources/account.png</file>
+        <file>resources/more.png</file>
     </qresource>
 </RCC>
diff --git a/resources/more.png b/resources/more.png
new file mode 100644
index 0000000..880d5dc
Binary files /dev/null and b/resources/more.png differ
diff --git a/src/gui/folderstatusdelegate.cpp b/src/gui/folderstatusdelegate.cpp
index 52b989e..875f531 100644
--- a/src/gui/folderstatusdelegate.cpp
+++ b/src/gui/folderstatusdelegate.cpp
@@ -28,6 +28,10 @@
 
 namespace OCC {
 
+FolderStatusDelegate::FolderStatusDelegate() : QStyledItemDelegate() {
+    m_moreIcon = QIcon(QPixmap(Theme::hidpiFileName(":/client/resources/more.png")));
+}
+
 QString FolderStatusDelegate::addFolderText()
 {
     return tr("Add Folder Sync Connection");
@@ -324,13 +328,15 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
 
     {
         QStyleOptionToolButton btnOpt;
-        btnOpt.text = QLatin1String("...");
+        //btnOpt.text = QLatin1String("...");
         btnOpt.state = option.state;
         btnOpt.state &= ~(QStyle::State_Selected | QStyle::State_HasFocus);
         btnOpt.state |= QStyle::State_Raised;
         btnOpt.arrowType = Qt::NoArrow;
         btnOpt.subControls = QStyle::SC_ToolButton;
         btnOpt.rect = optionsButtonRect(option.rect);
+        btnOpt.icon = m_moreIcon;
+        btnOpt.iconSize = btnOpt.rect.size();
         QApplication::style()->drawComplexControl( QStyle::CC_ToolButton, &btnOpt, painter );
     }
 }
diff --git a/src/gui/folderstatusdelegate.h b/src/gui/folderstatusdelegate.h
index 1cea50e..b299a30 100644
--- a/src/gui/folderstatusdelegate.h
+++ b/src/gui/folderstatusdelegate.h
@@ -26,6 +26,8 @@ class FolderStatusDelegate : public QStyledItemDelegate
 {
     Q_OBJECT
 public:
+    QIcon m_moreIcon;
+    FolderStatusDelegate();
 
     enum datarole { FolderAliasRole = Qt::UserRole + 100,
                     HeaderRole,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list