Add copy share link button to share details page footer, remove unneeded columnlayout in contentitem

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2022-11-23 15:25:09 +01:00 committed by Claudio Cambra
parent e723b75919
commit 6ae41c0759

View file

@ -250,13 +250,8 @@ Page {
}
}
contentItem: ColumnLayout {
ScrollView {
Layout.fillWidth: true
Layout.fillHeight: true
contentItem: ScrollView {
contentWidth: availableWidth
clip: true
ColumnLayout {
@ -755,12 +750,38 @@ Page {
}
}
RowLayout {
Layout.fillWidth: true
footer: DialogButtonBox {
topPadding: 0
bottomPadding: root.padding
rightPadding: root.padding
leftPadding: root.padding
alignment: Qt.AlignRight | Qt.AlignVCenter
visible: copyShareLinkButton.visible
CustomButton {
id: copyShareLinkButton
height: Style.standardPrimaryButtonHeight
imageSource: "image://svgimage-custom-color/copy.svg/" + Style.ncHeaderTextColor
text: qsTr("Copy share link")
textColor: Style.ncHeaderTextColor
contentsFont.bold: true
bgColor: Style.ncBlue
bgNormalOpacity: 1.0
bgHoverOpacity: Style.hoverOpacity
visible: root.isLinkShare
enabled: visible
onClicked: {
clipboardHelper.text = root.link;
clipboardHelper.selectAll();
clipboardHelper.copy();
clipboardHelper.clear();
}
TextEdit { id: clipboardHelper; visible: false }
}
}
}