From 51be4b5a8ea3a8fd79b4f223427aa0661904f3d3 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 8 Feb 2024 09:36:58 +0100 Subject: [PATCH 1/4] fix binding loop with palette assignments Signed-off-by: Matthieu Gallien --- src/gui/filedetails/ShareDetailsPage.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/filedetails/ShareDetailsPage.qml b/src/gui/filedetails/ShareDetailsPage.qml index c09f42abd6dc2..15ffbe61a14b4 100644 --- a/src/gui/filedetails/ShareDetailsPage.qml +++ b/src/gui/filedetails/ShareDetailsPage.qml @@ -332,7 +332,7 @@ Page { mid: Style.darkerHover dark: Style.menuBorder button: Style.buttonBackgroundColor - window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + window: Style.menuBorder base: Style.backgroundColor toolTipBase: Style.backgroundColor toolTipText: Style.ncTextColor @@ -549,7 +549,7 @@ Page { mid: Style.darkerHover dark: Style.menuBorder button: Style.buttonBackgroundColor - window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + window: Style.menuBorder base: Style.backgroundColor toolTipBase: Style.backgroundColor toolTipText: Style.ncTextColor @@ -682,7 +682,7 @@ Page { mid: Style.darkerHover dark: Style.menuBorder button: Style.buttonBackgroundColor - window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + window: Style.menuBorder base: Style.backgroundColor toolTipBase: Style.backgroundColor toolTipText: Style.ncTextColor @@ -790,7 +790,7 @@ Page { mid: Style.darkerHover dark: Style.menuBorder button: Style.buttonBackgroundColor - window: palette.dark // NOTE: Fusion theme uses darker window colour for the border of the checkbox + window: Style.menuBorder base: Style.backgroundColor toolTipBase: Style.backgroundColor toolTipText: Style.ncTextColor From 1d274a9a10da8d5d37d671bf03c6e3615d02bc7d Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 8 Feb 2024 09:37:52 +0100 Subject: [PATCH 2/4] ensure role hideDownload from ShareModel has a boolean default value Signed-off-by: Matthieu Gallien --- src/gui/filedetails/sharemodel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/filedetails/sharemodel.cpp b/src/gui/filedetails/sharemodel.cpp index 0f65454ddbcf0..b09c8c81783c5 100644 --- a/src/gui/filedetails/sharemodel.cpp +++ b/src/gui/filedetails/sharemodel.cpp @@ -189,6 +189,7 @@ QVariant ShareModel::data(const QModelIndex &index, const int role) const // Deal with roles that only return certain values for link or user/group share types case NoteEnabledRole: case ExpireDateEnabledRole: + case HideDownloadEnabledRole: return false; case LinkRole: case LinkShareNameRole: From 7f105b0e605698e5fe12e73a0a1ce377598e450e Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 8 Feb 2024 11:10:55 +0100 Subject: [PATCH 3/4] fix QML warnings about accessing undefined parent property we are defining a component, by definition there will be no parent setting the size if the responsibility of the stack view, not of the component (or even its definition) Signed-off-by: Matthieu Gallien --- src/gui/filedetails/ShareDelegate.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/filedetails/ShareDelegate.qml b/src/gui/filedetails/ShareDelegate.qml index e25a23f9b0602..baf378fe8ce6f 100644 --- a/src/gui/filedetails/ShareDelegate.qml +++ b/src/gui/filedetails/ShareDelegate.qml @@ -262,8 +262,6 @@ GridLayout { ShareDetailsPage { id: shareDetailsPage - width: parent.width - height: parent.height backgroundsVisible: root.backgroundsVisible accentColor: root.accentColor From 5b86a51b496e59fdfd7230d25912b47b40c93bc7 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 8 Feb 2024 11:57:09 +0100 Subject: [PATCH 4/4] fix more issues from qml in share dialog Signed-off-by: Matthieu Gallien --- src/gui/filedetails/ShareeSearchField.qml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gui/filedetails/ShareeSearchField.qml b/src/gui/filedetails/ShareeSearchField.qml index 300b9c36004b5..4246d54e9ed8d 100644 --- a/src/gui/filedetails/ShareeSearchField.qml +++ b/src/gui/filedetails/ShareeSearchField.qml @@ -185,8 +185,7 @@ TextField { interactive: true highlight: Rectangle { - width: shareeListView.currentItem.width - height: shareeListView.currentItem.height + anchors.fill: shareeListView.currentItem color: palette.highlight } highlightFollowsCurrentItem: true @@ -200,8 +199,7 @@ TextField { model: root.shareeModel delegate: ShareeDelegate { - anchors.left: parent.left - anchors.right: parent.right + width: shareeListView.contentItem.width enabled: model.type !== Sharee.LookupServerSearchResults hoverEnabled: model.type !== Sharee.LookupServerSearchResults