diff --git a/components/StyledTabBar.qml b/components/StyledTabBar.qml index 3c0b933..70a92c1 100644 --- a/components/StyledTabBar.qml +++ b/components/StyledTabBar.qml @@ -1,20 +1,8 @@ -import qs.config import QtQuick import QtQuick.Controls.Basic TabBar { id: control - property alias orientation: view.orientation - - contentItem: ListView { - id: view - model: control.contentModel - currentIndex: control.currentIndex - orientation: ListView.Horizontal - boundsBehavior: Flickable.StopAtBounds - } - background: Rectangle { - color: Styling.theme.base200 - } + background: Item {} } diff --git a/components/StyledTabButton.qml b/components/StyledTabButton.qml index 8cfbbfe..dea1d40 100644 --- a/components/StyledTabButton.qml +++ b/components/StyledTabButton.qml @@ -6,6 +6,7 @@ TabButton { id: control contentItem: Text { + id: icon font.pixelSize: Styling.typography.textSize.base font.family: Styling.typography.fontFamily text: control.text diff --git a/modules/configuration/Configuration.qml b/modules/configuration/Configuration.qml index 5684f30..d64fe74 100644 --- a/modules/configuration/Configuration.qml +++ b/modules/configuration/Configuration.qml @@ -1,7 +1,9 @@ import qs.components +import qs.config import qs.services import QtQuick import QtQuick.Controls +import QtQuick.Layouts StyledPanelWindow { id: window @@ -12,52 +14,53 @@ StyledPanelWindow { implicitWidth: 800 implicitHeight: 400 - StyledTabBar { - id: tabs - anchors.top: parent.top - anchors.left: parent.left - anchors.bottom: parent.bottom - anchors.right: view.left + ColumnLayout { + spacing: 0 + anchors.fill: parent + StyledText { + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - implicitWidth: 200 - orientation: ListView.Vertical - - StyledTabButton { - anchors.left: parent.left - anchors.right: parent.right - - text: "General" + text: "Configurations" + font.pixelSize: Styling.typography.textSize.xl + padding: 8 } - StyledTabButton { - anchors.left: parent.left - anchors.right: parent.right - text: "Styling" + + StyledRectangle { + id: titleBar + + Layout.fillWidth: true + Layout.preferredHeight: 4 } - } - - SwipeView { - id: view - - anchors.top: parent.top - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.left: tabs.right - - clip: true - orientation: Qt.Vertical - - currentIndex: tabs.currentIndex ScrollView { - padding: 36 - StyledPane { - anchors.left: parent.left - anchors.right: parent.right + id: view + + Layout.fillHeight: true + padding: 24 + background: Item {} + + GridLayout { + + columnSpacing: Styling.layout.spacing.xl + + StyledText { + text: "Theme" + // font.bold: true + font.pixelSize: Styling.typography.textSize.lg + } + + StyledComboBox { + currentIndex: Theme.themes.indexOf(Theme.currentTheme) + model: Theme.themes + onActivated: index => { + Theme.currentTheme = Theme.themes[index]; + } + } } } - ScrollView { - padding: 36 - StylingView {} - } + } + + component Menus: QtObject { + property Component theme } } diff --git a/modules/configuration/StylingView.qml b/modules/configuration/StylingView.qml deleted file mode 100644 index 731ecaf..0000000 --- a/modules/configuration/StylingView.qml +++ /dev/null @@ -1,25 +0,0 @@ -import qs.components -import qs.config -import QtQuick -import QtQuick.Layouts - -StyledPane { - GridLayout { - - columnSpacing: Styling.layout.spacing.xl - - StyledText { - text: "Theme" - // font.bold: true - font.pixelSize: Styling.typography.textSize.lg - } - - StyledComboBox { - currentIndex: Theme.themes.indexOf(Theme.currentTheme) - model: Theme.themes - onActivated: index => { - Theme.currentTheme = Theme.themes[index]; - } - } - } -} diff --git a/modules/configuration/ThemeConfig.qml b/modules/configuration/ThemeConfig.qml new file mode 100644 index 0000000..b2e4f9e --- /dev/null +++ b/modules/configuration/ThemeConfig.qml @@ -0,0 +1,5 @@ +import QtQuick +import QtQuick.Layouts +import Quickshell + +GridLayout {} diff --git a/modules/storybook/Storybook.qml b/modules/storybook/Storybook.qml index fdb17b6..0c0851f 100644 --- a/modules/storybook/Storybook.qml +++ b/modules/storybook/Storybook.qml @@ -36,7 +36,7 @@ StyledPanelWindow { anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right - anchors.bottom: view.top + anchors.bottom: stack.top StyledTabButton { text: "Fields" @@ -49,8 +49,8 @@ StyledPanelWindow { } } - SwipeView { - id: view + StackLayout { + id: stack anchors.top: tabs.bottom anchors.left: parent.left @@ -60,6 +60,7 @@ StyledPanelWindow { currentIndex: tabs.currentIndex ScrollView { + Layout.fillWidth: true padding: 36 Fields {} } @@ -68,6 +69,7 @@ StyledPanelWindow { Selectors {} } ScrollView { + Layout.fillWidth: true padding: 36 Components {} }