mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 06:25:56 +03:00
Eliminate unneeded parent Item in FileActivityView
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
0ca927843f
commit
31afb02c84
3 changed files with 17 additions and 24 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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...
|
||||
|
|
Loading…
Reference in a new issue