diff --git a/electrum/gui/qml/components/BIP39RecoveryDialog.qml b/electrum/gui/qml/components/BIP39RecoveryDialog.qml index cda047a78..6910d3de8 100644 --- a/electrum/gui/qml/components/BIP39RecoveryDialog.qml +++ b/electrum/gui/qml/components/BIP39RecoveryDialog.qml @@ -18,6 +18,8 @@ ElDialog { property string derivationPath property string scriptType + needsSystemBarPadding: false + z: 1 // raise z so it also covers wizard dialog anchors.centerIn: parent diff --git a/electrum/gui/qml/components/LnurlPayRequestDialog.qml b/electrum/gui/qml/components/LnurlPayRequestDialog.qml index ce6b85f5f..338dc08d8 100644 --- a/electrum/gui/qml/components/LnurlPayRequestDialog.qml +++ b/electrum/gui/qml/components/LnurlPayRequestDialog.qml @@ -16,6 +16,7 @@ ElDialog { property InvoiceParser invoiceParser padding: 0 + needsSystemBarPadding: false property bool commentValid: comment.text.length <= invoiceParser.lnurlData['comment_allowed'] property bool amountValid: amountBtc.textAsSats.satsInt >= parseInt(invoiceParser.lnurlData['min_sendable_sat']) diff --git a/electrum/gui/qml/components/LoadingWalletDialog.qml b/electrum/gui/qml/components/LoadingWalletDialog.qml index f40327f1d..2cd07ac7a 100644 --- a/electrum/gui/qml/components/LoadingWalletDialog.qml +++ b/electrum/gui/qml/components/LoadingWalletDialog.qml @@ -18,6 +18,7 @@ ElDialog { x: Math.floor((parent.width - implicitWidth) / 2) y: Math.floor((parent.height - implicitHeight) / 2) // anchors.centerIn: parent // this strangely pixelates the spinner + needsSystemBarPadding: false function open() { showTimer.start() diff --git a/electrum/gui/qml/components/MessageDialog.qml b/electrum/gui/qml/components/MessageDialog.qml index e80d4bb88..a2211ff75 100644 --- a/electrum/gui/qml/components/MessageDialog.qml +++ b/electrum/gui/qml/components/MessageDialog.qml @@ -21,6 +21,7 @@ ElDialog { anchors.centerIn: parent padding: 0 + needsSystemBarPadding: false width: rootLayout.width diff --git a/electrum/gui/qml/components/NostrSwapServersDialog.qml b/electrum/gui/qml/components/NostrSwapServersDialog.qml index 384789e0f..3330d782c 100644 --- a/electrum/gui/qml/components/NostrSwapServersDialog.qml +++ b/electrum/gui/qml/components/NostrSwapServersDialog.qml @@ -15,6 +15,8 @@ ElDialog { property string selectedPubkey + needsSystemBarPadding: false + anchors.centerIn: parent padding: 0 diff --git a/electrum/gui/qml/components/OpenWalletDialog.qml b/electrum/gui/qml/components/OpenWalletDialog.qml index 59319bcff..b6209dec5 100644 --- a/electrum/gui/qml/components/OpenWalletDialog.qml +++ b/electrum/gui/qml/components/OpenWalletDialog.qml @@ -25,6 +25,7 @@ ElDialog { anchors.centerIn: parent padding: 0 + needsSystemBarPadding: false ColumnLayout { spacing: 0 diff --git a/electrum/gui/qml/components/PasswordDialog.qml b/electrum/gui/qml/components/PasswordDialog.qml index 442f44a19..71a43d9a4 100644 --- a/electrum/gui/qml/components/PasswordDialog.qml +++ b/electrum/gui/qml/components/PasswordDialog.qml @@ -20,6 +20,7 @@ ElDialog { anchors.centerIn: parent width: parent.width * 4/5 padding: 0 + needsSystemBarPadding: false ColumnLayout { id: rootLayout diff --git a/electrum/gui/qml/components/Pin.qml b/electrum/gui/qml/components/Pin.qml index 261a37574..1f222c0a8 100644 --- a/electrum/gui/qml/components/Pin.qml +++ b/electrum/gui/qml/components/Pin.qml @@ -25,6 +25,7 @@ ElDialog { focus: true closePolicy: canCancel ? Popup.CloseOnEscape | Popup.CloseOnPressOutside : Popup.NoAutoClose allowClose: canCancel + needsSystemBarPadding: false anchors.centerIn: parent diff --git a/electrum/gui/qml/components/ReceiveDetailsDialog.qml b/electrum/gui/qml/components/ReceiveDetailsDialog.qml index 136af00a3..ab000913d 100644 --- a/electrum/gui/qml/components/ReceiveDetailsDialog.qml +++ b/electrum/gui/qml/components/ReceiveDetailsDialog.qml @@ -20,6 +20,7 @@ ElDialog { property bool isLightning: false padding: 0 + needsSystemBarPadding: false ColumnLayout { width: parent.width diff --git a/electrum/gui/qml/components/controls/ElDialog.qml b/electrum/gui/qml/components/controls/ElDialog.qml index 1a3abd4f1..74bd44c21 100644 --- a/electrum/gui/qml/components/controls/ElDialog.qml +++ b/electrum/gui/qml/components/controls/ElDialog.qml @@ -9,11 +9,16 @@ Dialog { property bool allowClose: true property string iconSource property bool resizeWithKeyboard: true + // inheriting classes can set needsSystemBarPadding this false to disable padding + property bool needsSystemBarPadding: true property bool _result: false // workaround: remember opened state, to inhibit closed -> closed event property bool _wasOpened: false + // Add bottom padding for Android navigation bar if needed + bottomPadding: needsSystemBarPadding ? app.navigationBarHeight : 0 + // called to finally close dialog after checks by onClosing handler in main.qml function doClose() { doReject() @@ -65,6 +70,13 @@ Dialog { header: ColumnLayout { spacing: 0 + // Add top padding for status bar on Android when using edge-to-edge + Item { + visible: needsSystemBarPadding && app.statusBarHeight > 0 + Layout.fillWidth: true + Layout.preferredHeight: app.statusBarHeight + } + RowLayout { spacing: 0 diff --git a/electrum/gui/qml/components/controls/HelpDialog.qml b/electrum/gui/qml/components/controls/HelpDialog.qml index f11a0d138..8d1b87d86 100644 --- a/electrum/gui/qml/components/controls/HelpDialog.qml +++ b/electrum/gui/qml/components/controls/HelpDialog.qml @@ -16,6 +16,7 @@ ElDialog { anchors.centerIn: parent padding: 0 + needsSystemBarPadding: false width: rootPane.width diff --git a/electrum/gui/qml/qeapp.py b/electrum/gui/qml/qeapp.py index 28764c0d4..3232cf6ca 100644 --- a/electrum/gui/qml/qeapp.py +++ b/electrum/gui/qml/qeapp.py @@ -422,7 +422,7 @@ class QEAppController(BaseCrashReporter, QObject): return False return bool(systemSdkVersion >= 35) - @profiler(min_threshold=0.05) + @profiler(min_threshold=0.02) def _getSystemBarHeight(self, bar_type: str) -> int: if not self.enforcesEdgeToEdge(): return 0 diff --git a/electrum/plugins/psbt_nostr/qml/PsbtReceiveDialog.qml b/electrum/plugins/psbt_nostr/qml/PsbtReceiveDialog.qml index 286324ff8..bb59d3fbc 100644 --- a/electrum/plugins/psbt_nostr/qml/PsbtReceiveDialog.qml +++ b/electrum/plugins/psbt_nostr/qml/PsbtReceiveDialog.qml @@ -26,6 +26,7 @@ ElDialog { anchors.centerIn: parent padding: 0 + needsSystemBarPadding: false width: rootLayout.width