Commit fa1d779e authored by Nate Graham's avatar Nate Graham
Browse files

[desktop kcm] Use standard Kirigami.ListSectionHeader

There's no need for us to use a custom header because we now have a
standard one. It even looks a bit like the old custom one. And the
mobile KCM is already using it.
parent e0321515
......@@ -33,7 +33,6 @@ install( FILES
qml/AddConnectionDialog.qml
qml/ConfigurationDialog.qml
qml/ConnectionItem.qml
qml/Header.qml
qml/ListItem.qml
qml/main.qml
......
......@@ -71,7 +71,7 @@ Dialog {
currentIndex: -1
boundsBehavior: Flickable.StopAtBounds
section.property: "ConnectionTypeSection"
section.delegate: Header { text: section }
section.delegate: Kirigami.ListSectionHeader { text: section }
delegate: ListItem {
checked: mouseArea.containsMouse || view.currentlySelectedIndex == index
height: connectionTypeBase.height
......
/*
Copyright 2013-2014 Jan Grulich <jgrulich@redhat.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) version 3, or any
later version accepted by the membership of KDE e.V. (or its
successor approved by the membership of KDE e.V.), which shall
act as a proxy defined in Section 6 of version 3 of the license.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.2
import org.kde.kirigami 2.15 as Kirigami
ListItem {
id: header
property alias text: headerLabel.text
height: headerLabel.height + Kirigami.Units.gridUnit
width: parent.width
sectionDelegate: true
Text {
id: headerLabel
anchors.centerIn: parent
color: textColor
height: paintedHeight
font.weight: Font.DemiBold
}
}
......@@ -100,7 +100,7 @@ Item {
currentIndex: -1
boundsBehavior: Flickable.StopAtBounds
section.property: "KcmConnectionType"
section.delegate: Header { text: section }
section.delegate: Kirigami.ListSectionHeader { text: section }
delegate: ConnectionItem {
onAboutToChangeConnection: {
// Shouldn't be problem to set this in advance
......
Supports Markdown
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