From 637bb39806eb4dfea2748cfc73bc65112cc1ae36 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 9 May 2022 23:14:22 +0200 Subject: [PATCH] Fix scroll view of Plasmoid --- plasmoid/package/contents/ui/DevicesPage.qml | 6 ++- .../package/contents/ui/DirectoriesPage.qml | 6 ++- .../package/contents/ui/DownloadsPage.qml | 6 ++- .../package/contents/ui/RecentChangesPage.qml | 6 ++- plasmoid/package/contents/ui/TopLevelView.qml | 1 - .../translations/syncthingplasmoid_de_DE.ts | 44 +++++++++---------- .../translations/syncthingplasmoid_en_US.ts | 44 +++++++++---------- 7 files changed, 60 insertions(+), 53 deletions(-) diff --git a/plasmoid/package/contents/ui/DevicesPage.qml b/plasmoid/package/contents/ui/DevicesPage.qml index 178102e..84f1e33 100644 --- a/plasmoid/package/contents/ui/DevicesPage.qml +++ b/plasmoid/package/contents/ui/DevicesPage.qml @@ -12,9 +12,11 @@ Item { PlasmaComponents3.ScrollView { anchors.fill: parent - TopLevelView { + // HACK: workaround for https://bugreports.qt.io/browse/QTBUG-83890 + PlasmaComponents3.ScrollBar.horizontal.policy: PlasmaComponents3.ScrollBar.AlwaysOff + + contentItem: TopLevelView { id: deviceView - width: parent.width model: plasmoid.nativeInterface.sortFilterDevModel delegate: TopLevelItem { diff --git a/plasmoid/package/contents/ui/DirectoriesPage.qml b/plasmoid/package/contents/ui/DirectoriesPage.qml index 3a7e0b8..1c5aa56 100644 --- a/plasmoid/package/contents/ui/DirectoriesPage.qml +++ b/plasmoid/package/contents/ui/DirectoriesPage.qml @@ -25,9 +25,11 @@ ColumnLayout { Layout.fillWidth: true Layout.fillHeight: true - TopLevelView { + // HACK: workaround for https://bugreports.qt.io/browse/QTBUG-83890 + PlasmaComponents3.ScrollBar.horizontal.policy: PlasmaComponents3.ScrollBar.AlwaysOff + + contentItem: TopLevelView { id: directoryView - width: parent.width model: plasmoid.nativeInterface.sortFilterDirModel delegate: TopLevelItem { diff --git a/plasmoid/package/contents/ui/DownloadsPage.qml b/plasmoid/package/contents/ui/DownloadsPage.qml index ee4774f..64197ae 100644 --- a/plasmoid/package/contents/ui/DownloadsPage.qml +++ b/plasmoid/package/contents/ui/DownloadsPage.qml @@ -12,9 +12,11 @@ Item { PlasmaComponents3.ScrollView { anchors.fill: parent - TopLevelView { + // HACK: workaround for https://bugreports.qt.io/browse/QTBUG-83890 + PlasmaComponents3.ScrollBar.horizontal.policy: PlasmaComponents3.ScrollBar.AlwaysOff + + contentItem: TopLevelView { id: downloadView - width: parent.width model: plasmoid.nativeInterface.downloadModel delegate: TopLevelItem { diff --git a/plasmoid/package/contents/ui/RecentChangesPage.qml b/plasmoid/package/contents/ui/RecentChangesPage.qml index 17258ce..ad00114 100644 --- a/plasmoid/package/contents/ui/RecentChangesPage.qml +++ b/plasmoid/package/contents/ui/RecentChangesPage.qml @@ -12,9 +12,11 @@ Item { PlasmaComponents3.ScrollView { anchors.fill: parent - TopLevelView { + // HACK: workaround for https://bugreports.qt.io/browse/QTBUG-83890 + PlasmaComponents3.ScrollBar.horizontal.policy: PlasmaComponents3.ScrollBar.AlwaysOff + + contentItem: TopLevelView { id: recentChangesView - width: parent.width model: plasmoid.nativeInterface.recentChangesModel delegate: TopLevelItem { width: recentChangesView.width diff --git a/plasmoid/package/contents/ui/TopLevelView.qml b/plasmoid/package/contents/ui/TopLevelView.qml index 5b08d39..d529bb9 100644 --- a/plasmoid/package/contents/ui/TopLevelView.qml +++ b/plasmoid/package/contents/ui/TopLevelView.qml @@ -2,7 +2,6 @@ import QtQuick 2.7 import org.kde.plasma.components 2.0 as PlasmaComponents // for Highlight and DialogStatus.Closed (used with Menu and MenuItem) ListView { - anchors.fill: parent boundsBehavior: Flickable.StopAtBounds interactive: contentHeight > height keyNavigationEnabled: true diff --git a/plasmoid/translations/syncthingplasmoid_de_DE.ts b/plasmoid/translations/syncthingplasmoid_de_DE.ts index fa8f883..3ee0f50 100644 --- a/plasmoid/translations/syncthingplasmoid_de_DE.ts +++ b/plasmoid/translations/syncthingplasmoid_de_DE.ts @@ -12,23 +12,23 @@ DevicesPage - + Resume Fortsetzen - - + + Pause Pausieren - + Copy name Namen kopieren - + Copy ID ID kopieren @@ -41,40 +41,40 @@ Verzeichnisse filtern - + Show errors Zeige Fehler - - + + Rescan Scannen - + Resume Fortsetzen - - + + Pause Pausieren - - + + Open in file browser Im Dateibrowser öffnen - + Copy label/ID Namen/ID kopieren - + Copy path Pfad kopieren @@ -82,14 +82,14 @@ DownloadsPage - - - + + + Open in file browser Im Dateibrowser öffnen - + Copy label/ID Namen/ID kopieren @@ -295,17 +295,17 @@ RecentChangesPage - + Copy path Pfad kopieren - + Copy device ID Geräte-ID kopieren - + Copy directory ID Verzeichnis-ID kopieren diff --git a/plasmoid/translations/syncthingplasmoid_en_US.ts b/plasmoid/translations/syncthingplasmoid_en_US.ts index cf63c02..dbed720 100644 --- a/plasmoid/translations/syncthingplasmoid_en_US.ts +++ b/plasmoid/translations/syncthingplasmoid_en_US.ts @@ -12,23 +12,23 @@ DevicesPage - + Resume - - + + Pause - + Copy name - + Copy ID @@ -41,40 +41,40 @@ - + Show errors - - + + Rescan - + Resume - - + + Pause - - + + Open in file browser - + Copy label/ID - + Copy path @@ -82,14 +82,14 @@ DownloadsPage - - - + + + Open in file browser - + Copy label/ID @@ -245,17 +245,17 @@ RecentChangesPage - + Copy path - + Copy device ID - + Copy directory ID