[vlc-commits] [Git][videolan/vlc][master] qml: fix position mapping when opening the menu in side navigation pane

François Cartegnie (@fcartegnie) gitlab at videolan.org
Thu Sep 24 10:55:03 UTC 2026



François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
55a8791d by Fatih Uzunoglu at 2026-09-24T08:51:35+02:00
qml: fix position mapping when opening the menu in side navigation pane

Currently the menu can be positioned incorrectly in some cases, such
occurs after switching main view modes, for example.

`Item::mapToGlobal()` maps from item's local coordinates to global
coordinates, in this case item's position is relative to its visual
parent. Using bare `mapToGlobal()` in the signal handler most likely
refers to `SideNavigationPane::mapToGlobal()` instead, which is not
the delegate's immediate visual parent.

- - - - -


1 changed file:

- modules/gui/qt/maininterface/qml/MainDisplay.qml


Changes:

=====================================
modules/gui/qt/maininterface/qml/MainDisplay.qml
=====================================
@@ -608,7 +608,7 @@ FocusScope {
                 if ((sidebar.state !== 'expanded') && item.expandable) {
                     // TODO: Investigate opening the menu on hover, if
                     //       we switch to `Popup.Item` type of menus.
-                    const mappedPos = mapToGlobal(item.x + item.width, item.y)
+                    const mappedPos = item.mapToGlobal(item.width, 0)
                     navigationBarContextMenu.popup(item.index, mappedPos, !item.hovered)
 
                     return



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/55a8791d34283ca9846caddf0e0586e3555c3e55

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/55a8791d34283ca9846caddf0e0586e3555c3e55
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list