From 2f1b8bc2d028e67cee129e0785842096f0d953e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= Date: Tue, 21 Dec 2021 11:05:34 -0500 Subject: [PATCH] SelectScreen: use Scrollview GitLab: #601 Change-Id: Ie8afca9f1eaacb36c73d5ac32d975ad448e23742 --- src/mainview/components/SelectScreen.qml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/mainview/components/SelectScreen.qml b/src/mainview/components/SelectScreen.qml index 0a5d0a0c..d78888ab 100644 --- a/src/mainview/components/SelectScreen.qml +++ b/src/mainview/components/SelectScreen.qml @@ -42,6 +42,8 @@ Window { property string currentPreview: "" property var screens: [] + title: JamiStrings.selectScreen + // How many rows the ScrollView should have. function calculateRepeaterModel() { screens = [] @@ -51,7 +53,7 @@ Window { AvAdapter.getListWindows() for (var idx in AvAdapter.windowsNames) { screens.push(AvAdapter.windowsNames[idx]) - } + } return screens.length } @@ -83,20 +85,7 @@ Window { color: JamiTheme.backgroundColor - Text { - id: screenListText - - anchors.top: selectScreenWindowRect.top - anchors.topMargin: JamiTheme.preferredMarginSize - anchors.horizontalCenter: selectScreenWindowRect.horizontalCenter - - font.pointSize: JamiTheme.textFontSize + 2 - font.bold: true - text: JamiStrings.selectScreen - color: JamiTheme.textColor - } - - JamiFlickable { + ScrollView { id: screenSelectionScrollView anchors.topMargin: JamiTheme.preferredMarginSize @@ -106,7 +95,9 @@ Window { height: selectScreenWindowRect.height - (selectButton.height + JamiTheme.preferredMarginSize * 4) - contentHeight: screenSelectionScrollViewColumn.implicitHeight + clip: true + ScrollBar.horizontal.policy: ScrollBar.AlwaysOff + ScrollBar.vertical.policy: ScrollBar.AlwaysOn Flow { id: screenSelectionScrollViewFlow