2021-12-25 01:17:08 +00:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import QtQuick 2.12
|
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
|
|
2023-07-25 01:13:52 +00:00
|
|
|
import org.kde.kirigami 2.20 as Kirigami
|
|
|
|
|
|
2021-12-25 01:17:08 +00:00
|
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
|
|
|
|
|
2023-07-25 01:13:52 +00:00
|
|
|
Item {
|
2021-12-25 01:17:08 +00:00
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
signal switchToListRequested()
|
|
|
|
|
signal switchToGridRequested()
|
|
|
|
|
|
2023-07-25 01:13:52 +00:00
|
|
|
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
|
|
|
|
Kirigami.Theme.inherit: false
|
2021-12-25 01:17:08 +00:00
|
|
|
|
2022-05-27 01:58:42 +00:00
|
|
|
// HACK: Here only to steal inputs the would normally be delivered to home
|
|
|
|
|
MouseArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-25 01:17:08 +00:00
|
|
|
RowLayout {
|
2023-07-25 01:13:52 +00:00
|
|
|
anchors.topMargin: Kirigami.Units.smallSpacing
|
|
|
|
|
anchors.leftMargin: Kirigami.Units.gridUnit
|
|
|
|
|
anchors.rightMargin: Kirigami.Units.gridUnit
|
2021-12-25 01:17:08 +00:00
|
|
|
anchors.fill: parent
|
2023-07-25 01:13:52 +00:00
|
|
|
spacing: Kirigami.Units.smallSpacing
|
2021-12-25 01:17:08 +00:00
|
|
|
|
2023-07-25 01:13:52 +00:00
|
|
|
Kirigami.Heading {
|
2021-12-25 01:17:08 +00:00
|
|
|
color: "white"
|
|
|
|
|
level: 1
|
|
|
|
|
text: i18n("Applications")
|
2022-04-06 16:04:57 +00:00
|
|
|
font.weight: Font.Medium
|
2021-12-25 01:17:08 +00:00
|
|
|
}
|
|
|
|
|
Item { Layout.fillWidth: true }
|
|
|
|
|
PlasmaComponents.ToolButton {
|
|
|
|
|
icon.name: "view-list-symbolic"
|
2023-07-25 01:13:52 +00:00
|
|
|
implicitWidth: Math.round(Kirigami.Units.gridUnit * 2.1)
|
|
|
|
|
implicitHeight: Math.round(Kirigami.Units.gridUnit * 2.1)
|
2021-12-25 01:17:08 +00:00
|
|
|
onClicked: root.switchToListRequested()
|
|
|
|
|
}
|
|
|
|
|
PlasmaComponents.ToolButton {
|
|
|
|
|
icon.name: "view-grid-symbolic"
|
2023-07-25 01:13:52 +00:00
|
|
|
implicitWidth: Math.round(Kirigami.Units.gridUnit * 2.1)
|
|
|
|
|
implicitHeight: Math.round(Kirigami.Units.gridUnit * 2.1)
|
2021-12-25 01:17:08 +00:00
|
|
|
onClicked: root.switchToGridRequested()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|