diff --git a/src/gui/filedetails/FileActivityView.qml b/src/gui/filedetails/FileActivityView.qml index 47fbe35be..002654b79 100644 --- a/src/gui/filedetails/FileActivityView.qml +++ b/src/gui/filedetails/FileActivityView.qml @@ -20,28 +20,14 @@ import com.nextcloud.desktopclient 1.0 import Style 1.0 import "../tray" -Item { +ActivityList { id: root - property string localPath: "" - property var accountState: ({}) - property int horizontalPadding: 0 - property int iconSize: 32 - property alias model: activityModel + property alias localPath: activityListModel.localPath + property alias accountState: activityListModel.accountState - FileActivityListModel { - id: activityModel - localPath: root.localPath - accountState: root.accountState - } - - ActivityList { - anchors.fill: parent - anchors.leftMargin: root.horizontalPadding - anchors.rightMargin: root.horizontalPadding - - iconSize: root.iconSize - isFileActivityList: true - model: root.model + isFileActivityList: true + model: FileActivityListModel { + id: activityListModel } } diff --git a/src/gui/filedetails/FileDetailsPage.qml b/src/gui/filedetails/FileDetailsPage.qml index 3e31f102a..fc39825a3 100644 --- a/src/gui/filedetails/FileDetailsPage.qml +++ b/src/gui/filedetails/FileDetailsPage.qml @@ -168,9 +168,10 @@ Page { property int swipeIndex: SwipeView.index + delegateHorizontalPadding: root.intendedPadding + accountState: root.accountState localPath: root.localPath - horizontalPadding: root.intendedPadding iconSize: root.iconSize } diff --git a/src/gui/tray/ActivityList.qml b/src/gui/tray/ActivityList.qml index d01c566e1..18e15e663 100644 --- a/src/gui/tray/ActivityList.qml +++ b/src/gui/tray/ActivityList.qml @@ -11,6 +11,7 @@ ScrollView { property bool isFileActivityList: false property int iconSize: Style.trayListItemIconSize + property int delegateHorizontalPadding: 0 signal openFile(string filePath) signal activityItemClicked(int index) @@ -38,8 +39,9 @@ ScrollView { highlight: Rectangle { id: activityHover - width: activityList.currentItem.width - height: activityList.currentItem.height + + anchors.fill: activityList.currentItem + color: Style.lightHover visible: activityList.activeFocus } @@ -56,9 +58,13 @@ ScrollView { } delegate: ActivityItem { + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: controlRoot.delegateHorizontalPadding + anchors.rightMargin: controlRoot.delegateHorizontalPadding + isFileActivityList: controlRoot.isFileActivityList iconSize: controlRoot.iconSize - width: activityList.contentWidth flickable: activityList onHoveredChanged: if (hovered) { // When we set the currentIndex the list view will scroll...