[vlc-commits] [Git][videolan/vlc][master] qml: re-layout when implicit height of menu bar changes in `TopBar.qml`

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Feb 1 10:59:46 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
2a0f7735 by Fatih Uzunoglu at 2025-02-01T10:39:09+00:00
qml: re-layout when implicit height of menu bar changes in `TopBar.qml`

This fixes the layouting issue where the cone bar overlaps with the
menu bar when the page changes (such as, switching to player view).

- - - - -


1 changed file:

- modules/gui/qt/player/qml/TopBar.qml


Changes:

=====================================
modules/gui/qt/player/qml/TopBar.qml
=====================================
@@ -95,6 +95,7 @@ FocusScope{
 
     // Functions
 
+    // FIXME: Imperative layouting in QML is stupid, this needs to be gone.
     function _layoutLine(c1, c2, offset)
     {
         let c1Height = c1?.implicitHeight ?? 0
@@ -120,6 +121,7 @@ FocusScope{
         return lineHeight
     }
 
+    // FIXME: Imperative layouting in QML is stupid, this needs to be gone.
     //FIXME: if CSD will be weirdly placed if application safe-area are used,
     //nota that if you need a safe area (kiosk mode), you probably don't need CSD
     function _layout() {
@@ -225,6 +227,7 @@ FocusScope{
 
         onHoveredChanged: menu => root.requestLockUnlockAutoHide(hovered)
         onMenuOpenedChanged: menu => root.requestLockUnlockAutoHide(menuOpened)
+        onImplicitHeightChanged: root._layout()
     }
 
     Item {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2a0f7735597ca113742b4f5fca519f129c368284

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2a0f7735597ca113742b4f5fca519f129c368284
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