mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
Fix layout for FileProviderFileDelegate
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
d905f13d83
commit
64e1166066
1 changed files with 30 additions and 49 deletions
|
@ -36,21 +36,14 @@ Item {
|
|||
|
||||
required property size documentSize
|
||||
|
||||
GridLayout {
|
||||
RowLayout {
|
||||
id: internalLayout
|
||||
|
||||
anchors.fill: parent
|
||||
rows: 3
|
||||
columns: 4
|
||||
|
||||
Image {
|
||||
id: fileIconImage
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.row: 0
|
||||
Layout.rowSpan: internalLayout.rows
|
||||
Layout.column: 0
|
||||
|
||||
verticalAlignment: Image.AlignVCenter
|
||||
horizontalAlignment: Image.AlignHCenter
|
||||
source: "image://tray-image-provider/:/fileicon/" + root.userVisiblePath
|
||||
|
@ -59,60 +52,48 @@ Item {
|
|||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
Column {
|
||||
Layout.fillWidth: true
|
||||
|
||||
EnforcedPlainTextLabel {
|
||||
id: fileNameLabel
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.row: 0
|
||||
Layout.column: 1
|
||||
Layout.columnSpan: 2
|
||||
|
||||
width: parent.width
|
||||
text: root.fileName
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
id: deleteButton
|
||||
|
||||
Layout.preferredWidth: width
|
||||
Layout.minimumWidth: implicitWidth
|
||||
Layout.fillHeight: true
|
||||
Layout.row: 0
|
||||
Layout.rowSpan: internalLayout.rows
|
||||
Layout.column: 2
|
||||
|
||||
text: qsTr("Delete")
|
||||
bgColor: Style.errorBoxBackgroundColor
|
||||
onClicked: root.evictItem(root.identifier, root.domainIdentifier)
|
||||
}
|
||||
|
||||
EnforcedPlainTextLabel {
|
||||
id: pathLabel
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.row: 1
|
||||
Layout.column: 1
|
||||
Layout.columnSpan: 2
|
||||
|
||||
width: parent.width
|
||||
text: root.userVisiblePath
|
||||
elide: Text.ElideLeft
|
||||
}
|
||||
|
||||
Row {
|
||||
width: parent.width
|
||||
|
||||
EnforcedPlainTextLabel {
|
||||
id: fileSizeLabel
|
||||
|
||||
Layout.row: 2
|
||||
Layout.column: 1
|
||||
|
||||
text: root.documentSize
|
||||
}
|
||||
|
||||
EnforcedPlainTextLabel {
|
||||
id: fileTypeLabel
|
||||
|
||||
Layout.row: 2
|
||||
Layout.column: 2
|
||||
|
||||
text: root.fileType
|
||||
color: Style.ncSecondaryTextColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CustomButton {
|
||||
id: deleteButton
|
||||
|
||||
Layout.minimumWidth: implicitWidth
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
|
||||
text: qsTr("Delete")
|
||||
bgColor: Style.errorBoxBackgroundColor
|
||||
onClicked: root.evictItem(root.identifier, root.domainIdentifier)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue