Commit 21f0227e authored by Carl Schwan's avatar Carl Schwan 🚴 Committed by Nicolas Fella
Browse files

Use Kirigami header in sidebar

parent e57fd79f
Pipeline #34814 canceled with stage
...@@ -35,8 +35,15 @@ Kirigami.ApplicationWindow ...@@ -35,8 +35,15 @@ Kirigami.ApplicationWindow
modal: !root.wideScreen modal: !root.wideScreen
handleVisible: !root.wideScreen handleVisible: !root.wideScreen
topContent: RowLayout { header: Kirigami.AbstractApplicationHeader {
width: parent.width 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 { DBusProperty {
id: announcedNameProperty id: announcedNameProperty
object: DaemonDbusInterface object: DaemonDbusInterface
...@@ -48,7 +55,6 @@ Kirigami.ApplicationWindow ...@@ -48,7 +55,6 @@ Kirigami.ApplicationWindow
id: nameField id: nameField
visible: false visible: false
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: Kirigami.Units.smallSpacing
text: announcedNameProperty.value text: announcedNameProperty.value
onAccepted: { onAccepted: {
DaemonDbusInterface.setAnnouncedName(text) DaemonDbusInterface.setAnnouncedName(text)
...@@ -56,13 +62,13 @@ Kirigami.ApplicationWindow ...@@ -56,13 +62,13 @@ Kirigami.ApplicationWindow
} }
} }
Label { Kirigami.Heading {
level: 2
text: announcedNameProperty.value text: announcedNameProperty.value
visible: !nameField.visible
Layout.fillWidth: true Layout.fillWidth: true
visible: !nameField.visible
elide: Qt.ElideRight elide: Qt.ElideRight
font.pointSize: 18 font.pointSize: 18
Layout.leftMargin: Kirigami.Units.smallSpacing
} }
Button { Button {
...@@ -73,6 +79,7 @@ Kirigami.ApplicationWindow ...@@ -73,6 +79,7 @@ Kirigami.ApplicationWindow
} }
} }
} }
}
property var objects: [findDevicesAction] property var objects: [findDevicesAction]
Instantiator { Instantiator {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment