qml: unify dialog headers
This commit is contained in:
@@ -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