From 49daa163530ceabc9eaa8911ab96b5f799cfb552 Mon Sep 17 00:00:00 2001 From: Fabien Proriol Date: Sun, 25 May 2025 17:58:09 +0200 Subject: Initial Commit --- qml/HomePage.qml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 qml/HomePage.qml (limited to 'qml/HomePage.qml') diff --git a/qml/HomePage.qml b/qml/HomePage.qml new file mode 100644 index 0000000..fbcfd70 --- /dev/null +++ b/qml/HomePage.qml @@ -0,0 +1,55 @@ +import QtQuick + +Rectangle { + id: homepage + clip: true + property string selected: "tests" + + ListView { + id: category + anchors.fill: parent + model: xdgEntries.categories + delegate: Rectangle { + Component.onCompleted: { + console.debug("MANAGE CATEGORY [" + modelData + "]") + } + + property bool isshow: modelData !== "System" && modelData !== "Debug" + width: homepage.width + height: (isshow) ? (entriesView.nbrow > 0 ? entriesView.height + categoryTitle.height : 0) : 0 + color: currentTheme.base + visible: isshow && entriesView.nbrow > 0 + + Rectangle { + id: categoryTitle + height: 20 + width: parent.width - 2 + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: 4 + anchors.topMargin: 4 + color: currentTheme.mid + + + Text { + anchors.top: parent.top + anchors.left: parent.left + anchors.bottom: parent.bottom + text: modelData + font.pixelSize: 15 + font.bold: true + color: currentTheme.windowText + } + } + + DesktopGridView { + id: entriesView + category: modelData + anchors.top: categoryTitle.bottom + anchors.left: parent.left + anchors.right: parent.right + } + } + } +} -- cgit v1.2.3