qml: pad main view if e2e enforcement is active
What changed, and why it matters
This commit adjusts the Electrum mobile app's main screen layout so that Android's system status bar and navigation bar do not overlap the app's toolbar or bottom controls when the operating system's 'edge-to-edge' display mode is active. It is a UI spacing fix, not a security patch.
No security action required; treat as a normal UI compatibility fix.
Security signals we found
No security-relevant code paths modified
No input validation, cryptography, authentication, or network changes
Change is purely UI/UX layout padding
Evidence from the diff
The change adds dynamic top padding to the QML ToolBar equal to the Android status bar height and a bottom spacer equal to the navigation bar height, using new AppController helpers. It also switches the toolbar content container from toolbar.height to toolbar.availableHeight so content is laid out within the padded area. This prevents system gesture/navigation areas from obscuring app UI under edge-to-edge enforcement.
Changed components
electrum/gui/qml/components/main.qmlInspect captured patch +14 / −1
diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml
index 826d7a2..cfdbf4e 100644
--- a/electrum/gui/qml/components/main.qml
+++ b/electrum/gui/qml/components/main.qml
@@ -19,6 +19,9 @@ ApplicationWindow
visible: false // initial value
+ readonly property int statusBarHeight: AppController ? AppController.getStatusBarHeight() : 0
+ readonly property int navigationBarHeight: AppController ? AppController.getNavigationBarHeight() : 0
+
// dimensions ignored on android
width: 480
height: 800
@@ -117,6 +120,9 @@ ApplicationWindow
header: ToolBar {
id: toolbar
+
+ // Add top margin for status bar on Android when using edge-to-edge
+ topPadding: app.statusBarHeight
background: Rectangle {
implicitHeight: 48
@@ -133,7 +139,7 @@ ApplicationWindow
spacing: 0
anchors.left: parent.left
anchors.right: parent.right
- height: toolbar.height
+ height: toolbar.availableHeight
RowLayout {
id: toolbarTopLayout
@@ -277,6 +283,13 @@ ApplicationWindow
}
}
}
+
+ // Add bottom padding for navigation bar on Android when UI is edge-to-edge
+ Item {
+ visible: app.navigationBarHeight > 0
+ Layout.fillWidth: true
+ Layout.preferredHeight: app.navigationBarHeight
+ }
}
Timer {
Why this scored 20/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.