Browse Source

Revert "qml: ElDialog titlebar click moves focus, hack for android to remove onscreen keyboard"

This reverts commit f0f320b119.
master
Sander van Grieken 3 years ago
parent
commit
c690c9c1be
  1. 73
      electrum/gui/qml/components/controls/ElDialog.qml

73
electrum/gui/qml/components/controls/ElDialog.qml

@ -29,57 +29,42 @@ Dialog {
} }
} }
header: Item { header: ColumnLayout {
implicitWidth: rootLayout.implicitWidth spacing: 0
implicitHeight: rootLayout.implicitHeight
MouseArea { RowLayout {
anchors.fill: parent
onClicked: {
// hack to allow titlebar click to remove on screen keyboard by
// moving focus to label
titleLabel.forceActiveFocus()
}
}
ColumnLayout {
id: rootLayout
spacing: 0 spacing: 0
RowLayout { Image {
spacing: 0 visible: iconSource
source: iconSource
Image { Layout.preferredWidth: constants.iconSizeXLarge
visible: iconSource Layout.preferredHeight: constants.iconSizeXLarge
source: iconSource Layout.leftMargin: constants.paddingMedium
Layout.preferredWidth: constants.iconSizeXLarge Layout.topMargin: constants.paddingMedium
Layout.preferredHeight: constants.iconSizeXLarge Layout.bottomMargin: constants.paddingMedium
Layout.leftMargin: constants.paddingMedium
Layout.topMargin: constants.paddingMedium
Layout.bottomMargin: constants.paddingMedium
}
Label {
id: titleLabel
text: title
elide: Label.ElideRight
Layout.fillWidth: true
leftPadding: constants.paddingXLarge
topPadding: constants.paddingXLarge
bottomPadding: constants.paddingXLarge
rightPadding: constants.paddingXLarge
font.bold: true
font.pixelSize: constants.fontSizeMedium
}
} }
Rectangle { Label {
text: title
elide: Label.ElideRight
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: constants.paddingXXSmall leftPadding: constants.paddingXLarge
Layout.rightMargin: constants.paddingXXSmall topPadding: constants.paddingXLarge
height: 1 bottomPadding: constants.paddingXLarge
color: Qt.rgba(0,0,0,0.5) rightPadding: constants.paddingXLarge
font.bold: true
font.pixelSize: constants.fontSizeMedium
} }
} }
Rectangle {
Layout.fillWidth: true
Layout.leftMargin: constants.paddingXXSmall
Layout.rightMargin: constants.paddingXXSmall
height: 1
color: Qt.rgba(0,0,0,0.5)
}
} }
} }

Loading…
Cancel
Save