tabbbss are still kinda fucked
This commit is contained in:
parent
9d6a88aa43
commit
c76f29345e
4 changed files with 122 additions and 58 deletions
|
|
@ -1,7 +1,9 @@
|
|||
import qs.components
|
||||
import qs.config
|
||||
import qs.services
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Wayland
|
||||
|
||||
|
|
@ -13,6 +15,7 @@ StyledPanelWindow {
|
|||
visible: Visibility.configuration
|
||||
implicitWidth: 800
|
||||
implicitHeight: 400
|
||||
background.color: Styling.theme.base200
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
WlrLayershell.keyboardFocus: window.visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||
|
|
@ -32,19 +35,39 @@ StyledPanelWindow {
|
|||
anchors.bottom: parent.bottom
|
||||
anchors.right: view.left
|
||||
|
||||
implicitWidth: 200
|
||||
implicitWidth: 150
|
||||
orientation: ListView.Vertical
|
||||
|
||||
StyledTabButton {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
text: "Audio"
|
||||
}
|
||||
StyledTabButton {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: "Styling"
|
||||
Repeater {
|
||||
model: views.data
|
||||
delegate: StyledTabButton {
|
||||
id: tabButton
|
||||
required property ConfigurationView modelData
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
contentItem: RowLayout {
|
||||
states: [
|
||||
State {
|
||||
when: tabButton.hovered
|
||||
PropertyChanges {
|
||||
tabIcon.color: Styling.theme.primarycontent
|
||||
tabText.color: Styling.theme.primarycontent
|
||||
}
|
||||
}
|
||||
]
|
||||
LucideIcon {
|
||||
id: tabIcon
|
||||
text: tabButton.modelData.icon
|
||||
font.pixelSize: Styling.typography.textSize.lg
|
||||
}
|
||||
StyledText {
|
||||
id: tabText
|
||||
text: tabButton.modelData.title
|
||||
font.pixelSize: Styling.typography.textSize.lg
|
||||
}
|
||||
}
|
||||
text: tabButton.modelData.title
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -55,19 +78,54 @@ StyledPanelWindow {
|
|||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: tabs.right
|
||||
anchors.topMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
anchors.bottomMargin: 4
|
||||
|
||||
clip: true
|
||||
orientation: Qt.Vertical
|
||||
|
||||
currentIndex: tabs.currentIndex
|
||||
|
||||
ScrollView {
|
||||
padding: 24
|
||||
AudioView {}
|
||||
background: Rectangle {
|
||||
color: Styling.theme.base100
|
||||
radius: Styling.theme.radiusBox
|
||||
}
|
||||
ScrollView {
|
||||
padding: 24
|
||||
StylingView {}
|
||||
|
||||
Repeater {
|
||||
model: views.data
|
||||
delegate: ScrollView {
|
||||
id: scrollView
|
||||
required property ConfigurationView modelData
|
||||
padding: 24
|
||||
Loader {
|
||||
anchors.fill: parent
|
||||
active: scrollView.modelData.view
|
||||
sourceComponent: scrollView.modelData.view
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: views
|
||||
|
||||
ConfigurationView {
|
||||
icon: Styling.lucide.icons.audioLines
|
||||
title: "Audio"
|
||||
view: AudioView {}
|
||||
}
|
||||
|
||||
ConfigurationView {
|
||||
icon: Styling.lucide.icons.swatchBook
|
||||
title: "Styling"
|
||||
view: StylingView {}
|
||||
}
|
||||
}
|
||||
|
||||
component ConfigurationView: QtObject {
|
||||
property string icon
|
||||
property string title
|
||||
property Component view
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue