Use Kirigami header in sidebar
This commit is contained in:
parent
e57fd79f26
commit
21f0227e06
1 changed files with 38 additions and 31 deletions
|
@ -35,8 +35,15 @@ Kirigami.ApplicationWindow
|
|||
modal: !root.wideScreen
|
||||
handleVisible: !root.wideScreen
|
||||
|
||||
topContent: RowLayout {
|
||||
width: parent.width
|
||||
header: Kirigami.AbstractApplicationHeader {
|
||||
topPadding: Kirigami.Units.smallSpacing / 2 // HACK: not dividing by two makes the header to big and not adding the spacing make it to small
|
||||
bottomPadding: Kirigami.Units.smallSpacing
|
||||
leftPadding: Kirigami.Units.smallSpacing
|
||||
rightPadding: Kirigami.Units.smallSpacing
|
||||
contentItem: RowLayout {
|
||||
anchors.fill: parent
|
||||
spacing: Kirigami.Units.smallSpacing
|
||||
|
||||
DBusProperty {
|
||||
id: announcedNameProperty
|
||||
object: DaemonDbusInterface
|
||||
|
@ -48,7 +55,6 @@ Kirigami.ApplicationWindow
|
|||
id: nameField
|
||||
visible: false
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: Kirigami.Units.smallSpacing
|
||||
text: announcedNameProperty.value
|
||||
onAccepted: {
|
||||
DaemonDbusInterface.setAnnouncedName(text)
|
||||
|
@ -56,13 +62,13 @@ Kirigami.ApplicationWindow
|
|||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
Kirigami.Heading {
|
||||
level: 2
|
||||
text: announcedNameProperty.value
|
||||
visible: !nameField.visible
|
||||
Layout.fillWidth: true
|
||||
visible: !nameField.visible
|
||||
elide: Qt.ElideRight
|
||||
font.pointSize: 18
|
||||
Layout.leftMargin: Kirigami.Units.smallSpacing
|
||||
}
|
||||
|
||||
Button {
|
||||
|
@ -73,6 +79,7 @@ Kirigami.ApplicationWindow
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property var objects: [findDevicesAction]
|
||||
Instantiator {
|
||||
|
|
Loading…
Reference in a new issue