Преглед на файлове

Font and icon size improvements, svg transfer to new folder

Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Dominique Fuchs преди 6 години
родител
ревизия
29138cc533
променени са 6 файла, в които са добавени 31 реда и са изтрити 16 реда
  1. 7 7
      src/gui/tray/ActivityListModel.cpp
  2. 16 9
      src/gui/tray/Window.qml
  3. 3 0
      theme.qrc
  4. 2 0
      theme/black/activity.svg
  5. 3 0
      theme/black/bell.svg
  6. 0 0
      theme/black/state-info.svg

+ 7 - 7
src/gui/tray/ActivityListModel.cpp

@@ -111,27 +111,27 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
     }
     case ActionIconRole: {
         if (a._type == Activity::NotificationType) {
-            return "qrc:///client/resources/bell.svg";
+            return "qrc:///client/theme/black/bell.svg";
         } else if (a._type == Activity::SyncResultType) {
-            return "qrc:///client/resources/state-error.svg";
+            return "qrc:///client/theme/black/state-error.svg";
         } else if (a._type == Activity::SyncFileItemType) {
             if (a._status == SyncFileItem::NormalError
                 || a._status == SyncFileItem::FatalError
                 || a._status == SyncFileItem::DetailError
                 || a._status == SyncFileItem::BlacklistedError) {
-                return "qrc:///client/resources/state-error.svg";
+                return "qrc:///client/theme/black/state-error.svg";
             } else if (a._status == SyncFileItem::SoftError
                 || a._status == SyncFileItem::Conflict
                 || a._status == SyncFileItem::Restoration
                 || a._status == SyncFileItem::FileLocked) {
-                return "qrc:///client/resources/state-warning.svg";
+                return "qrc:///client/theme/black/state-warning.svg";
             } else if (a._status == SyncFileItem::FileIgnored) {
-                return "qrc:///client/resources/state-info.svg";
+                return "qrc:///client/theme/black/state-info.svg";
             } else {
-                return "qrc:///client/resources/state-sync.svg";
+                return "qrc:///client/theme/black/state-sync.svg";
             }
         } else {
-            return "qrc:///client/resources/activity.svg";
+            return "qrc:///client/theme/black/activity.svg";
         }
     }
     case ObjectTypeRole:

+ 16 - 9
src/gui/tray/Window.qml

@@ -172,21 +172,25 @@ Window {
 
                             MenuItem {
                                 id: syncPauseButton
+                                font.pixelSize: 12
                                 onClicked: systrayBackend.pauseResumeSync()
                             }
 
                             MenuItem {
                                 text: qsTr("Open settings")
+                                font.pixelSize: 12
                                 onClicked: systrayBackend.openSettings()
                             }
 
                             MenuItem {
                                 text: qsTr("Help")
+                                font.pixelSize: 12
                                 onClicked: systrayBackend.openHelp()
                             }
 
                             MenuItem {
                                 text: qsTr("Quit Nextcloud")
+                                font.pixelSize: 12
                                 onClicked: systrayBackend.shutdown()
                             }
                         }
@@ -449,16 +453,17 @@ Window {
                 height: trayWindowHeaderLayout.height
                 spacing: 0
                 visible: (activityListView.model.rowCount() > 0)
+
                 Image {
                     id: activityIcon
-                    Layout.leftMargin: 6
-                    Layout.preferredWidth: 48
-                    Layout.preferredHeight: 48
+                    Layout.leftMargin: 8
+                    Layout.preferredWidth: activityButton1.icon.width
+                    Layout.preferredHeight: activityButton1.icon.height
                     verticalAlignment: Qt.AlignCenter
                     cache: true
                     source: icon
-                    sourceSize.height: 48
-                    sourceSize.width: 48
+                    sourceSize.height: activityButton1.icon.height
+                    sourceSize.width: activityButton1.icon.width
                 }
                 Column {
                     id: activityTextColumn
@@ -468,16 +473,18 @@ Window {
                     Text {
                         id: activityTextTitle
                         text: (type === "Activity") ? subject : message
-                        width: 220
+                        width: 236
                         elide: Text.ElideRight
-                        font.pointSize: 9
+                        font.pixelSize: 12
                     }
+
                     Text {
                         id: activityTextInfo
                         text: displaypath
-                        width: 220
+                        height: (displaypath === "") ? 0 : activityTextTitle.height
+                        width: 236
                         elide: Text.ElideRight
-                        font.pointSize: 8
+                        font.pixelSize: 10
                     }
                 }
                 Item {

+ 3 - 0
theme.qrc

@@ -140,5 +140,8 @@
         <file>theme/black/user.svg</file>
         <file>theme/white/add.svg</file>
         <file>theme/black/add.svg</file>
+        <file>theme/black/activity.svg</file>
+        <file>theme/black/bell.svg</file>
+        <file>theme/black/state-info.svg</file>
     </qresource>
 </RCC>

+ 2 - 0
theme/black/activity.svg

@@ -0,0 +1,2 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.1"><path fill="#000" d="m32 2-20 36h22l-2 24 20-36h-22z"/>
+</svg>

+ 3 - 0
theme/black/bell.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" viewBox="0 0 16 16">
+ <path d="m8 2c-0.5523 0-1 0.4477-1 1 0 0.0472 0.021 0.0873 0.0273 0.1328-1.7366 0.4362-3.0273 1.9953-3.0273 3.8672v2l-1 1v1h10v-1l-1-1v-2c0-1.8719-1.291-3.431-3.0273-3.8672 0.0063-0.0455 0.0273-0.0856 0.0273-0.1328 0-0.5523-0.4477-1-1-1zm-2 10c0 1.1046 0.8954 2 2 2s2-0.8954 2-2z" fill="#000"/>
+</svg>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
theme/black/state-info.svg


Някои файлове не бяха показани, защото твърде много файлове са промени