[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: do not use uncustomized ScrollView in BrowseHomeDisplay

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jun 7 16:48:25 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
22c34ea7 by Fatih Uzunoglu at 2024-06-07T16:36:12+00:00
qml: do not use uncustomized ScrollView in BrowseHomeDisplay

- Certain implementations provide their own wheel handler,
  which does not respect our options.
- We should not use an uncustomized control for such a marginal
  view since we have no control on how it would appear and
  behave.
- Using pure `Flickable` allows fine-grained control. Other
  option here could be adding a child `Flickable`, but that
  is not necessary since the parent item is a focus scope
  anyway.

- - - - -
691016b8 by Fatih Uzunoglu at 2024-06-07T16:36:12+00:00
qml: use custom scroll handler in BrowseHomeDisplay

The custom scroll handler, which makes it possible
to disable smooth scrolling has been used in various
flickables except here.

- - - - -


1 changed file:

- modules/gui/qt/network/qml/BrowseHomeDisplay.qml


Changes:

=====================================
modules/gui/qt/network/qml/BrowseHomeDisplay.qml
=====================================
@@ -127,7 +127,7 @@ FocusScope {
         text: qsTr("No network shares found")
     }
 
-    ScrollView {
+    Flickable {
         id: flickable
 
         anchors.fill: parent
@@ -135,9 +135,21 @@ FocusScope {
         anchors.leftMargin: root.leftPadding
         anchors.rightMargin: root.rightPadding
 
+        ScrollBar.vertical: ScrollBar { }
+
+        flickableDirection: Flickable.AutoFlickIfNeeded
+        boundsBehavior: Flickable.StopAtBounds
+
         focus: true
 
+        contentWidth: column.width
+        contentHeight: column.height
+
+        Util.FlickableScrollHandler { }
+
         Column {
+            id: column
+
             width: foldersSection.width
             height: implicitHeight
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cbe0ab5b918322b7d5daff9f4e9aaf95bbd2c5bf...691016b84e3f918f8ab15b20dfb3a8af1251b839

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cbe0ab5b918322b7d5daff9f4e9aaf95bbd2c5bf...691016b84e3f918f8ab15b20dfb3a8af1251b839
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list