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

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

Keep ToolBarPageFooter buttons inside the SafeArea

The Page component now draws fully edge to edge and does not excise the
screen area under the device navigation bar anymore, so the globalFooter
also gets laid out in that space when it is visible, making the buttons
partly or wholly inaccessible.

This change carves that space back out again for the ToolBarPageFooter
when it is visible and leaves the page to draw edge to edge whenever it
is not.

FWIW, the QQC.Page.footer handles this correctly, but the merit, if any,
of using it instead of (or as part of?) KL.ColumnView.globalFooter is a
much bigger architectural discussion. In the meantime this should be the
correct thing to do with the current design.

M  +2    -2    src/controls/ActionToolBar.qml
M  +7    -1    src/controls/private/globaltoolbar/ToolBarPageFooter.qml

https://invent.kde.org/frameworks/kirigami/-/commit/9e11b9e9ef542060da00cec543424d33033b6c75

diff --git a/src/controls/ActionToolBar.qml b/src/controls/ActionToolBar.qml
index 3a6fdd4e9..f92482e73 100644
--- a/src/controls/ActionToolBar.qml
+++ b/src/controls/ActionToolBar.qml
@@ -152,8 +152,8 @@ QQC2.Control {
     property alias heightMode: layout.heightMode
 //END properties
 
-    implicitHeight: layout.implicitHeight
-    implicitWidth: layout.implicitWidth
+    implicitHeight: layout.implicitHeight + bottomPadding + topPadding
+    implicitWidth: layout.implicitWidth + leftPadding + rightPadding
 
     Layout.minimumWidth: layout.minimumWidth
     Layout.preferredWidth: 0
diff --git a/src/controls/private/globaltoolbar/ToolBarPageFooter.qml b/src/controls/private/globaltoolbar/ToolBarPageFooter.qml
index d723e2776..765b34fd6 100644
--- a/src/controls/private/globaltoolbar/ToolBarPageFooter.qml
+++ b/src/controls/private/globaltoolbar/ToolBarPageFooter.qml
@@ -36,9 +36,15 @@ QQC2.ToolBar {
     }
 
     contentItem: KC.ActionToolBar {
+        property KC.Page page: root.parent.page
+
+        leftPadding: page.parent.SafeArea.margins.left
+        rightPadding: page.parent.SafeArea.margins.right
+        bottomPadding: page.parent.SafeArea.margins.bottom
+
         display: QQC2.Button.TextUnderIcon
         position: QQC2.ToolBar.Footer
         alignment: Qt.AlignCenter
-        actions: root.parent.page.actions
+        actions: page.actions
     }
 }
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.