diff --git a/components/StyledTabBar.qml b/components/StyledTabBar.qml index ed7f1f6..512ce5a 100644 --- a/components/StyledTabBar.qml +++ b/components/StyledTabBar.qml @@ -1,7 +1,7 @@ import QtQuick import QtQuick.Controls -TabBar { +Container { id: control property alias orientation: view.orientation diff --git a/components/StyledTabButton.qml b/components/StyledTabButton.qml index 4336abb..15d9859 100644 --- a/components/StyledTabButton.qml +++ b/components/StyledTabButton.qml @@ -2,10 +2,11 @@ import qs.config import QtQuick import QtQuick.Controls -TabButton { +Button { id: control property alias radius: rectangle.radius + padding: 8 radius: Styling.theme.radiusField diff --git a/modules/configuration/Configuration.qml b/modules/configuration/Configuration.qml index 749b195..a453993 100644 --- a/modules/configuration/Configuration.qml +++ b/modules/configuration/Configuration.qml @@ -1,3 +1,5 @@ +pragma ComponentBehavior: Bound + import qs.components import qs.config import qs.services @@ -20,7 +22,7 @@ StyledPanelWindow { Visibility.configuration = focused; } - GridLayout { + RowLayout { anchors.fill: parent @@ -40,6 +42,8 @@ StyledPanelWindow { required property ConfigurationView modelData anchors.left: parent.left anchors.right: parent.right + required property int index + contentItem: RowLayout { states: [ State { @@ -62,6 +66,8 @@ StyledPanelWindow { } } text: tabButton.modelData.title + + onClicked: tabs.setCurrentIndex(index) } } } diff --git a/modules/storybook/Storybook.qml b/modules/storybook/Storybook.qml index 406cc32..8a1a9b9 100644 --- a/modules/storybook/Storybook.qml +++ b/modules/storybook/Storybook.qml @@ -30,12 +30,15 @@ StyledPanelWindow { StyledTabButton { text: "Fields" + onClicked: tabs.setCurrentIndex(0) } StyledTabButton { text: "Selectors" + onClicked: tabs.setCurrentIndex(1) } StyledTabButton { text: "Components" + onClicked: tabs.setCurrentIndex(2) } }