align activity text with "Sync now" text
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 22 May 2023 15:33:56 +0000 (17:33 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Tue, 23 May 2023 12:22:35 +0000 (12:22 +0000)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/gui/tray/ActivityItem.qml
src/gui/tray/ActivityItemContent.qml
src/gui/tray/ActivityList.qml
theme/Style/Style.qml

index dab69f2fdcbf068227022f1e44e0cdd44caeabf9..20fa337c18a5267eec79f371f8f6161ad8bf7c31 100644 (file)
@@ -37,6 +37,7 @@ ItemDelegate {
 
             Layout.fillWidth: true
             Layout.minimumHeight: Style.minActivityHeight
+            Layout.preferredWidth: parent.width
 
             showDismissButton: model.isDismissable
 
index 5ff210449f830d3884dcf6ea8b0dd405cb06c08b..e3707e5b7170a0be80e98f74095e6b56ce5bdf4e 100644 (file)
@@ -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
 
index b0c30fbf0e5697b3f08b25f0f1b05b135cb95296..436a79e5bd6c6dc1adc5dc3809f426f66d54b0d5 100644 (file)
@@ -15,7 +15,7 @@ ScrollView {
     signal activityItemClicked(int index)
 
     contentWidth: availableWidth
-    padding: 1
+    padding: 0
     focus: false
 
     ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
index 365697dc5d9f7582a59de6e8f46136f59e612d75..b0ba7eb085c098c6d5dbc4163cb035a5aa6aa4f2 100644 (file)
@@ -50,7 +50,7 @@ QtObject {
                                                     // this amount to properly center the sync status icon to the thumbnail\r
                                                     // images, which will work so long as the thumbnails are left aligned\r
 \r
-    property int standardSpacing: 10\r
+    property int standardSpacing: trayHorizontalMargin\r
     property int smallSpacing: 5\r
     property int extraSmallSpacing: 2\r
 \r