[frameworks/kirigami] src/controls: Keep the ToolBarPageFooter menu inside the SafeArea

Marco Martin <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit afddbb918b49b76679c63d99eb2d0d4bb24765b5 by Marco Martin, on behalf of Ron El.
Committed on 10/08/2026 at 08:49.
Pushed by mart into branch 'master'.

Keep the ToolBarPageFooter menu inside the SafeArea

This amends commit 4959a9fc775db7e569da9d3abcfeebb324a74ec7 which kept
the menu out of the bottom safe area, to also keep it out of the right
side safe area too.

We anchor the bottom right corner of the menu to the top right corner
of its parent ToolButton for the Footer toolbar instead of relying on
Qt to push it to the left when we try to open it with their left sides
aligned (and it then does not fit in the available space).

This is congruent with how the Header button anchors the top left of
its menu with the bottom left of the ToolButton, and makes the menu
automatically respect any right side padding or SafeArea margins which
the button itself does.

M  +1    -0    src/controls/ActionToolBar.qml
M  +1    -0    src/controls/private/PrivateActionToolButton.qml

https://invent.kde.org/frameworks/kirigami/-/commit/afddbb918b49b76679c63d99eb2d0d4bb24765b5

diff --git a/src/controls/ActionToolBar.qml b/src/controls/ActionToolBar.qml
index f92482e73..1617a818c 100644
--- a/src/controls/ActionToolBar.qml
+++ b/src/controls/ActionToolBar.qml
@@ -216,6 +216,7 @@ QQC2.Control {
             menuActions: root.actions
 
             menuComponent: P.ActionsMenu {
+                x: root.position === QQC2.ToolBar.Footer ? parent.width - width : 0
                 y: root.position === QQC2.ToolBar.Footer ? -height : 0
                 submenuComponent: P.ActionsMenu {
                     id: actionsMenu
diff --git a/src/controls/private/PrivateActionToolButton.qml b/src/controls/private/PrivateActionToolButton.qml
index 0016c63aa..6b4834ac1 100644
--- a/src/controls/private/PrivateActionToolButton.qml
+++ b/src/controls/private/PrivateActionToolButton.qml
@@ -32,6 +32,7 @@ QQC2.ToolButton {
     }
 
     property Component menuComponent: ActionsMenu {
+        x: control.position === QQC2.ToolBar.Footer ? parent.width - width : 0
         y: control.position === QQC2.ToolBar.Footer ? -height : 0
         submenuComponent: ActionsMenu { }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.