소스 검색

align activity text with "Sync now" text

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Matthieu Gallien 2 년 전
부모
커밋
c84bf309de
4개의 변경된 파일12개의 추가작업 그리고 11개의 파일을 삭제
  1. 1 0
      src/gui/tray/ActivityItem.qml
  2. 9 9
      src/gui/tray/ActivityItemContent.qml
  3. 1 1
      src/gui/tray/ActivityList.qml
  4. 1 1
      theme/Style/Style.qml

+ 1 - 0
src/gui/tray/ActivityItem.qml

@@ -37,6 +37,7 @@ ItemDelegate {
 
             Layout.fillWidth: true
             Layout.minimumHeight: Style.minActivityHeight
+            Layout.preferredWidth: parent.width
 
             showDismissButton: model.isDismissable
 

+ 9 - 9
src/gui/tray/ActivityItemContent.qml

@@ -6,7 +6,7 @@ import QtGraphicalEffects 1.15
 import Style 1.0
 import com.nextcloud.desktopclient 1.0
 
-Item {
+RowLayout {
     id: root
 
     property variant activityData: {{}}
@@ -23,6 +23,8 @@ Item {
 
     signal dismissButtonClicked()
 
+    spacing: Style.standardSpacing
+
     Item {
         id: thumbnailItem
 
@@ -30,12 +32,10 @@ Item {
         readonly property int imageHeight: height * (1 - Style.thumbnailImageSizeReduction)
         readonly property int thumbnailRadius: model.thumbnail && model.thumbnail.isUserAvatar ? width / 2 : 3
 
-        anchors.left: parent.left
-        anchors.top: parent.top
-        anchors.bottom: parent.bottom
+        Layout.fillHeight: true
 
-        implicitHeight: model.thumbnail && model.thumbnail.isMimeTypeIcon ? root.iconSize * 0.9 : root.iconSize
         implicitWidth: root.iconSize
+        implicitHeight: model.thumbnail && model.thumbnail.isMimeTypeIcon ? root.iconSize * 0.9 : root.iconSize
 
         Loader {
             id: thumbnailImageLoader
@@ -118,10 +118,10 @@ Item {
     ColumnLayout {
         id: activityContentLayout
 
-        anchors.left: thumbnailItem.right
-        anchors.right: parent.right
-        anchors.top: parent.top
-        anchors.bottom: parent.bottom
+        Layout.fillHeight: true
+        Layout.fillWidth: true
+        Layout.maximumWidth: root.width - Style.standardSpacing - root.iconSize
+        implicitWidth: root.width - Style.standardSpacing - root.iconSize
 
         spacing: Style.smallSpacing
 

+ 1 - 1
src/gui/tray/ActivityList.qml

@@ -15,7 +15,7 @@ ScrollView {
     signal activityItemClicked(int index)
 
     contentWidth: availableWidth
-    padding: 1
+    padding: 0
     focus: false
 
     ScrollBar.horizontal.policy: ScrollBar.AlwaysOff

+ 1 - 1
theme/Style/Style.qml

@@ -50,7 +50,7 @@ QtObject {
                                                     // this amount to properly center the sync status icon to the thumbnail
                                                     // images, which will work so long as the thumbnails are left aligned
 
-    property int standardSpacing: 10
+    property int standardSpacing: trayHorizontalMargin
     property int smallSpacing: 5
     property int extraSmallSpacing: 2