1
0

qml: add padding to ElDialog for android e2e

This commit is contained in:
f321x
2025-08-27 09:24:08 +02:00
parent 53595e1be7
commit 5f0180910c
13 changed files with 26 additions and 1 deletions

View File

@@ -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

View File

@@ -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'])

View File

@@ -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()

View File

@@ -21,6 +21,7 @@ ElDialog {
anchors.centerIn: parent
padding: 0
needsSystemBarPadding: false
width: rootLayout.width

View File

@@ -15,6 +15,8 @@ ElDialog {
property string selectedPubkey
needsSystemBarPadding: false
anchors.centerIn: parent
padding: 0

View File

@@ -25,6 +25,7 @@ ElDialog {
anchors.centerIn: parent
padding: 0
needsSystemBarPadding: false
ColumnLayout {
spacing: 0

View File

@@ -20,6 +20,7 @@ ElDialog {
anchors.centerIn: parent
width: parent.width * 4/5
padding: 0
needsSystemBarPadding: false
ColumnLayout {
id: rootLayout

View File

@@ -25,6 +25,7 @@ ElDialog {
focus: true
closePolicy: canCancel ? Popup.CloseOnEscape | Popup.CloseOnPressOutside : Popup.NoAutoClose
allowClose: canCancel
needsSystemBarPadding: false
anchors.centerIn: parent

View File

@@ -20,6 +20,7 @@ ElDialog {
property bool isLightning: false
padding: 0
needsSystemBarPadding: false
ColumnLayout {
width: parent.width

View File

@@ -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

View File

@@ -16,6 +16,7 @@ ElDialog {
anchors.centerIn: parent
padding: 0
needsSystemBarPadding: false
width: rootPane.width

View File

@@ -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

View File

@@ -26,6 +26,7 @@ ElDialog {
anchors.centerIn: parent
padding: 0
needsSystemBarPadding: false
width: rootLayout.width