qml: unify dialog headers
This commit is contained in:
@@ -14,6 +14,7 @@ ElDialog {
|
||||
property string text_help
|
||||
|
||||
title: ''
|
||||
|
||||
parent: Overlay.overlay
|
||||
modal: true
|
||||
standardButtons: Dialog.Close
|
||||
@@ -25,19 +26,19 @@ ElDialog {
|
||||
color: "#aa000000"
|
||||
}
|
||||
|
||||
header: RowLayout {
|
||||
width: dialog.width
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: dialog.title
|
||||
visible: dialog.title
|
||||
elide: Label.ElideRight
|
||||
padding: constants.paddingXLarge
|
||||
bottomPadding: 0
|
||||
font.bold: true
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
}
|
||||
}
|
||||
// header: RowLayout {
|
||||
// width: dialog.width
|
||||
// Label {
|
||||
// Layout.fillWidth: true
|
||||
// text: dialog.title
|
||||
// visible: dialog.title
|
||||
// elide: Label.ElideRight
|
||||
// padding: constants.paddingXLarge
|
||||
// bottomPadding: 0
|
||||
// font.bold: true
|
||||
// font.pixelSize: constants.fontSizeMedium
|
||||
// }
|
||||
// }
|
||||
|
||||
Flickable {
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -14,6 +14,7 @@ ElDialog {
|
||||
height: parent.height
|
||||
|
||||
title: qsTr("Open Wallet")
|
||||
iconSource: '../../../icons/wallet.png'
|
||||
|
||||
property string name
|
||||
property string path
|
||||
@@ -30,38 +31,6 @@ ElDialog {
|
||||
|
||||
property bool _unlockClicked: false
|
||||
|
||||
header: GridLayout {
|
||||
columns: 2
|
||||
rowSpacing: 0
|
||||
|
||||
Image {
|
||||
source: "../../icons/wallet.png"
|
||||
Layout.preferredWidth: constants.iconSizeXLarge
|
||||
Layout.preferredHeight: constants.iconSizeXLarge
|
||||
Layout.leftMargin: constants.paddingMedium
|
||||
Layout.topMargin: constants.paddingMedium
|
||||
Layout.bottomMargin: constants.paddingMedium
|
||||
}
|
||||
|
||||
Label {
|
||||
text: title
|
||||
Layout.fillWidth: true
|
||||
topPadding: constants.paddingXLarge
|
||||
bottomPadding: constants.paddingXLarge
|
||||
font.bold: true
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: constants.paddingXXSmall
|
||||
Layout.rightMargin: constants.paddingXXSmall
|
||||
height: 1
|
||||
color: Qt.rgba(0,0,0,0.5)
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
width: parent.width
|
||||
spacing: constants.paddingLarge
|
||||
|
||||
@@ -11,6 +11,7 @@ ElDialog {
|
||||
id: passworddialog
|
||||
|
||||
title: qsTr("Enter Password")
|
||||
iconSource: '../../../icons/lock.png'
|
||||
|
||||
property bool confirmPassword: false
|
||||
property string password
|
||||
@@ -24,39 +25,6 @@ ElDialog {
|
||||
color: "#aa000000"
|
||||
}
|
||||
|
||||
header: GridLayout {
|
||||
columns: 2
|
||||
rowSpacing: 0
|
||||
|
||||
Image {
|
||||
source: "../../icons/lock.png"
|
||||
Layout.preferredWidth: constants.iconSizeXLarge
|
||||
Layout.preferredHeight: constants.iconSizeXLarge
|
||||
Layout.leftMargin: constants.paddingMedium
|
||||
Layout.topMargin: constants.paddingMedium
|
||||
Layout.bottomMargin: constants.paddingMedium
|
||||
}
|
||||
|
||||
Label {
|
||||
text: title
|
||||
elide: Label.ElideRight
|
||||
Layout.fillWidth: true
|
||||
topPadding: constants.paddingXLarge
|
||||
bottomPadding: constants.paddingXLarge
|
||||
font.bold: true
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: constants.paddingXXSmall
|
||||
Layout.rightMargin: constants.paddingXXSmall
|
||||
height: 1
|
||||
color: Qt.rgba(0,0,0,0.5)
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
width: parent.width
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ ElDialog {
|
||||
id: root
|
||||
|
||||
title: qsTr('PIN')
|
||||
iconSource: '../../../icons/lock.png'
|
||||
|
||||
width: parent.width * 2/3
|
||||
height: parent.height * 1/3
|
||||
@@ -75,39 +76,6 @@ ElDialog {
|
||||
}
|
||||
}
|
||||
|
||||
header: GridLayout {
|
||||
columns: 2
|
||||
rowSpacing: 0
|
||||
|
||||
Image {
|
||||
source: "../../icons/lock.png"
|
||||
Layout.preferredWidth: constants.iconSizeXLarge
|
||||
Layout.preferredHeight: constants.iconSizeXLarge
|
||||
Layout.leftMargin: constants.paddingMedium
|
||||
Layout.topMargin: constants.paddingMedium
|
||||
Layout.bottomMargin: constants.paddingMedium
|
||||
}
|
||||
|
||||
Label {
|
||||
text: title
|
||||
elide: Label.ElideRight
|
||||
Layout.fillWidth: true
|
||||
topPadding: constants.paddingXLarge
|
||||
bottomPadding: constants.paddingXLarge
|
||||
font.bold: true
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: constants.paddingXXSmall
|
||||
Layout.rightMargin: constants.paddingXXSmall
|
||||
height: 1
|
||||
color: Qt.rgba(0,0,0,0.5)
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
@@ -30,20 +30,6 @@ ElDialog {
|
||||
color: "#aa000000"
|
||||
}
|
||||
|
||||
header: RowLayout {
|
||||
width: dialog.width
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: dialog.title
|
||||
visible: dialog.title
|
||||
elide: Label.ElideRight
|
||||
padding: constants.paddingXLarge
|
||||
bottomPadding: 0
|
||||
font.bold: true
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
}
|
||||
}
|
||||
|
||||
Flickable {
|
||||
anchors.fill: parent
|
||||
contentHeight: rootLayout.height
|
||||
|
||||
@@ -6,6 +6,7 @@ Dialog {
|
||||
id: abstractdialog
|
||||
|
||||
property bool allowClose: true
|
||||
property string iconSource
|
||||
|
||||
onOpenedChanged: {
|
||||
if (opened) {
|
||||
@@ -14,4 +15,42 @@ Dialog {
|
||||
app.activeDialogs.pop()
|
||||
}
|
||||
}
|
||||
|
||||
header: ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
RowLayout {
|
||||
spacing: 0
|
||||
|
||||
Image {
|
||||
visible: iconSource
|
||||
source: iconSource
|
||||
Layout.preferredWidth: constants.iconSizeXLarge
|
||||
Layout.preferredHeight: constants.iconSizeXLarge
|
||||
Layout.leftMargin: constants.paddingMedium
|
||||
Layout.topMargin: constants.paddingMedium
|
||||
Layout.bottomMargin: constants.paddingMedium
|
||||
}
|
||||
|
||||
Label {
|
||||
text: title
|
||||
elide: Label.ElideRight
|
||||
Layout.fillWidth: true
|
||||
leftPadding: constants.paddingXLarge
|
||||
topPadding: constants.paddingXLarge
|
||||
bottomPadding: 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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user