From: Claudio Cambra Date: Fri, 9 Dec 2022 12:42:29 +0000 (+0100) Subject: Adapt changes from share details page changes X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~77^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5930fb4ac912d33ba431a017cef103c9cf8cbc6c;p=nextcloud-desktop.git Adapt changes from share details page changes Signed-off-by: Claudio Cambra --- diff --git a/src/gui/filedetails/FileDetailsPage.qml b/src/gui/filedetails/FileDetailsPage.qml index 3147bbd64..ead5cd075 100644 --- a/src/gui/filedetails/FileDetailsPage.qml +++ b/src/gui/filedetails/FileDetailsPage.qml @@ -37,6 +37,7 @@ Page { property int iconSize: 32 property StackView rootStackView: StackView {} property bool showCloseButton: false + property bool backgroundsVisible: true property FileDetails fileDetails: FileDetails { id: fileDetails @@ -64,6 +65,7 @@ Page { background: Rectangle { color: Style.backgroundColor + visible: root.backgroundsVisible } header: ColumnLayout { @@ -210,6 +212,7 @@ Page { horizontalPadding: root.intendedPadding iconSize: root.iconSize rootStackView: root.rootStackView + backgroundsVisible: root.backgroundsVisible } } } diff --git a/src/gui/filedetails/FileDetailsView.qml b/src/gui/filedetails/FileDetailsView.qml index 8c9edbaf5..de5fec16e 100644 --- a/src/gui/filedetails/FileDetailsView.qml +++ b/src/gui/filedetails/FileDetailsView.qml @@ -22,14 +22,24 @@ import Style 1.0 StackView { id: root - property var accountState: ({}) - property string localPath: "" + signal closeButtonClicked + + property alias accountState: fileDetailsPage.accountState + property alias localPath: fileDetailsPage.localPath + property alias showCloseButton: fileDetailsPage.showCloseButton + property bool backgroundsVisible: true + + background: Rectangle { + color: Style.backgroundColor + visible: root.backgroundsVisible + } initialItem: FileDetailsPage { + id: fileDetailsPage width: parent.width height: parent.height - accountState: root.accountState - localPath: root.localPath + backgroundsVisible: root.backgroundsVisible rootStackView: root + onCloseButtonClicked: root.closeButtonClicked() } } diff --git a/src/gui/filedetails/ShareDelegate.qml b/src/gui/filedetails/ShareDelegate.qml index 2f0f32405..5768cc44d 100644 --- a/src/gui/filedetails/ShareDelegate.qml +++ b/src/gui/filedetails/ShareDelegate.qml @@ -47,6 +47,7 @@ GridLayout { property int iconSize: 32 property FileDetails fileDetails: FileDetails {} property StackView rootStackView: StackView {} + property bool backgroundsVisible: true property bool canCreateLinkShares: true @@ -221,6 +222,7 @@ GridLayout { width: parent.width height: parent.height + backgroundsVisible: root.backgroundsVisible fileDetails: root.fileDetails shareModelData: model diff --git a/src/gui/filedetails/ShareDetailsPage.qml b/src/gui/filedetails/ShareDetailsPage.qml index 3b52cac30..9c5618fec 100644 --- a/src/gui/filedetails/ShareDetailsPage.qml +++ b/src/gui/filedetails/ShareDetailsPage.qml @@ -41,6 +41,8 @@ Page { signal setPassword(string password) signal setNote(string note) + property bool backgroundsVisible: true + property FileDetails fileDetails: FileDetails {} property var shareModelData: ({}) @@ -177,6 +179,7 @@ Page { background: Rectangle { color: Style.backgroundColor + visible: root.backgroundsVisible } header: ColumnLayout { diff --git a/src/gui/filedetails/ShareView.qml b/src/gui/filedetails/ShareView.qml index 8bc90ba66..e2cb0d658 100644 --- a/src/gui/filedetails/ShareView.qml +++ b/src/gui/filedetails/ShareView.qml @@ -30,6 +30,7 @@ ColumnLayout { property FileDetails fileDetails: FileDetails {} property int horizontalPadding: 0 property int iconSize: 32 + property bool backgroundsVisible: true readonly property bool sharingPossible: shareModel && shareModel.canShare && shareModel.sharingEnabled readonly property bool userGroupSharingPossible: sharingPossible && shareModel.userGroupSharingEnabled @@ -225,6 +226,7 @@ ColumnLayout { iconSize: root.iconSize fileDetails: root.fileDetails rootStackView: root.rootStackView + backgroundsVisible: root.backgroundsVisible canCreateLinkShares: root.publicLinkSharingPossible onCreateNewLinkShare: { diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index fdf96a64f..356479f30 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -155,6 +155,7 @@ ApplicationWindow { edge: Qt.RightEdge modal: true visible: false + clip: true background: Rectangle { radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius @@ -188,13 +189,13 @@ ApplicationWindow { fileDetailsDrawer.pageToShow); } } - sourceComponent: FileDetailsPage { + sourceComponent: FileDetailsView { id: fileDetails width: parent.width height: parent.height - background: null + backgroundsVisible: false accountState: fileDetailsDrawer.folderAccountState localPath: fileDetailsDrawer.fileLocalPath showCloseButton: true