[vlc-devel] [PATCH 7/9] qml: fix SortControl combo box position

Pierre Lamot pierre at videolabs.io
Mon Nov 18 18:15:40 CET 2019


---
 modules/gui/qt/qml/BannerSources.qml     | 2 +-
 modules/gui/qt/qml/utils/SortControl.qml | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/qml/BannerSources.qml b/modules/gui/qt/qml/BannerSources.qml
index f835d0689a..7e034b96cb 100644
--- a/modules/gui/qt/qml/BannerSources.qml
+++ b/modules/gui/qt/qml/BannerSources.qml
@@ -212,7 +212,7 @@ Utils.NavigableFocusScope {
                             textRole: "text"
                             listWidth: VLCStyle.widthSortBox
 
-                            popupAlignment: Qt.AlignLeft
+                            popupAlignment: Qt.AlignLeft | Qt.AlignBottom
 
                             visible: !!root.contentModel
                             enabled: visible
diff --git a/modules/gui/qt/qml/utils/SortControl.qml b/modules/gui/qt/qml/utils/SortControl.qml
index 72e65ace31..091b9ed66f 100644
--- a/modules/gui/qt/qml/utils/SortControl.qml
+++ b/modules/gui/qt/qml/utils/SortControl.qml
@@ -59,12 +59,13 @@ Utils.NavigableFocusScope {
             else
                 popup.open()
         }
+
     }
 
     Popup {
         id: popup
 
-        y: (popupAlignment & Qt.AlignBottom) ? (root.height - 1) : 1
+        y: (popupAlignment & Qt.AlignBottom) ? (root.height + 1) : - (implicitHeight + 1)
         x: (popupAlignment & Qt.AlignRight) ? (button.width - width) :  0
         width: root.listWidth
         implicitHeight: contentItem.implicitHeight + padding * 2
-- 
2.17.1



More information about the vlc-devel mailing list