Use Kirigami.ListSectionHeader

This commit is contained in:
Nicolas Fella 2020-02-06 16:43:44 +01:00
parent d36f2f7c5e
commit bd7b4c305a

View file

@ -21,7 +21,7 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import org.kde.kirigami 2.7 as Kirigami import org.kde.kirigami 2.10 as Kirigami
import org.kde.kdeconnect 1.0 import org.kde.kdeconnect 1.0
Kirigami.ScrollablePage Kirigami.ScrollablePage
@ -44,9 +44,7 @@ Kirigami.ScrollablePage
id: devices id: devices
section { section {
property: "status" property: "status"
delegate: Kirigami.Heading { delegate: Kirigami.ListSectionHeader {
level: 4
leftPadding: Kirigami.Units.smallSpacing
text: switch (parseInt(section)) text: switch (parseInt(section))
{ {
case DevicesModel.Paired: case DevicesModel.Paired:
@ -56,7 +54,6 @@ Kirigami.ScrollablePage
case (DevicesModel.Reachable | DevicesModel.Paired): case (DevicesModel.Reachable | DevicesModel.Paired):
return i18nd("kdeconnect-app", "Connected") return i18nd("kdeconnect-app", "Connected")
} }
} }
} }