From e3a00ab8ac136a358da82295a2d211fbe8892c5f Mon Sep 17 00:00:00 2001 From: Joshua Strobl Date: Sun, 6 Oct 2024 13:05:43 +0300 Subject: [PATCH] feat: start tinkering with adding a footer for the playerbar on the ApplicationWindow --- desktop/CMakeLists.txt | 2 ++ desktop/qml/Main.qml | 4 +++- desktop/qml/PlayerBar/PlayerBar.qml | 23 +++++++++++++++++++++++ desktop/qml/Root.qml | 21 +++++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 desktop/qml/PlayerBar/PlayerBar.qml create mode 100644 desktop/qml/Root.qml diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index bada5af..bf95279 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -27,9 +27,11 @@ ecm_add_qml_module(com.github.joshstrobl.koto URI "com.github.joshstrobl.koto" G ecm_target_qml_sources(com.github.joshstrobl.koto SOURCES + qml/PlayerBar/PlayerBar.qml qml/PrimaryNavigation.qml qml/HomePage.qml qml/Main.qml + qml/Root.qml ) target_link_libraries(com.github.joshstrobl.koto diff --git a/desktop/qml/Main.qml b/desktop/qml/Main.qml index 5e81c38..6f729b3 100644 --- a/desktop/qml/Main.qml +++ b/desktop/qml/Main.qml @@ -8,11 +8,13 @@ Kirigami.ApplicationWindow { visible: true width: 1000 + footer: PlayerBar { + } globalDrawer: PrimaryNavigation { windowRef: root } // TODO: Implement an onboarding page - pageStack.initialPage: HomePage { + pageStack.initialPage: Root { } } diff --git a/desktop/qml/PlayerBar/PlayerBar.qml b/desktop/qml/PlayerBar/PlayerBar.qml new file mode 100644 index 0000000..6c4ace3 --- /dev/null +++ b/desktop/qml/PlayerBar/PlayerBar.qml @@ -0,0 +1,23 @@ +import QtQuick.Controls as Controls +import QtQuick.Layouts +import org.kde.kirigami as Kirigami + +ColumnLayout { + id: playerBar + + Layout.fillWidth: true + + Controls.Slider { + id: seekSlider + + Layout.fillWidth: true + } + RowLayout { + Layout.fillWidth: true + + Controls.Button { + icon.height: Kirigami.Units.iconSizes.small + icon.name: "media-seek-backward" + } + } +} \ No newline at end of file diff --git a/desktop/qml/Root.qml b/desktop/qml/Root.qml new file mode 100644 index 0000000..9016e11 --- /dev/null +++ b/desktop/qml/Root.qml @@ -0,0 +1,21 @@ +import QtQuick +import QtQuick.Controls as Controls +import QtQuick.Layouts +import org.kde.kirigami as Kirigami + +Kirigami.Page { + id: rootPage + + ColumnLayout { + id: rootLayout + + Layout.fillWidth: true + + Controls.StackView { + id: rootStack + + initialItem: HomePage { + } + } + } +} \ No newline at end of file