Settings: cleaned Bar tabs

This commit is contained in:
quadbyte 2025-08-07 11:21:17 -04:00
parent 34148f4676
commit 19431fa6a2
3 changed files with 57 additions and 361 deletions

View file

@ -1,390 +1,86 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import qs.Settings
import qs.Components import qs.Components
import qs.Settings
ScrollView { ColumnLayout {
id: root
spacing: 0
anchors.fill: parent anchors.fill: parent
padding: 0 anchors.margins: 0
rightPadding: 12
clip: true ScrollView {
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff id: scrollView
ScrollBar.vertical.policy: ScrollBar.AsNeeded
ColumnLayout {
id: root
width: parent.availableWidth
spacing: 0
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
padding: 16
Item { rightPadding: 12
Layout.fillWidth: true clip: true
Layout.preferredHeight: 0 ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
} ScrollBar.vertical.policy: ScrollBar.AsNeeded
ColumnLayout { ColumnLayout {
spacing: 4 width: scrollView.availableWidth
Layout.fillWidth: true spacing: 0
Text { Text {
text: "Elements" text: "Elements"
font.pixelSize: 18 * Theme.uiScale font.pixelSize: 18 * Theme.uiScale
font.bold: true font.bold: true
color: Theme.textPrimary color: Theme.textPrimary
Layout.bottomMargin: 8 Layout.bottomMargin: 16 * Theme.uiScale
} }
ToggleOption {
ColumnLayout { label: "Show Active Window"
spacing: 8 description: "Display the title of the currently focused window below the bar"
Layout.fillWidth: true value: Settings.settings.showActiveWindow
onToggled: function() {
RowLayout { Settings.settings.showActiveWindow = !Settings.settings.showActiveWindow;
spacing: 8
Layout.fillWidth: true
ColumnLayout {
spacing: 4
Layout.fillWidth: true
Text {
text: "Show Active Window Icon"
font.pixelSize: 13 * Theme.uiScale
font.bold: true
color: Theme.textPrimary
}
Text {
text: "Display the icon of the currently focused window in the bar"
font.pixelSize: 12 * Theme.uiScale
color: Theme.textSecondary
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}
Rectangle {
id: activeWindowIconSwitch
width: 52
height: 32
radius: 16
color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.surfaceVariant
border.color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.outline
border.width: 2
Rectangle {
id: activeWindowIconThumb
width: 28
height: 28
radius: 14
color: Theme.surface
border.color: Theme.outline
border.width: 1
y: 2
x: Settings.settings.showActiveWindowIcon ? activeWindowIconSwitch.width - width - 2 : 2
Behavior on x {
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
Settings.settings.showActiveWindowIcon = !Settings.settings.showActiveWindowIcon;
}
}
}
} }
} }
ToggleOption {
ColumnLayout { label: "Show Active Window Icon"
spacing: 8 description: "Display the icon of the currently focused window"
Layout.fillWidth: true value: Settings.settings.showActiveWindowIcon
Layout.topMargin: 8 onToggled: function() {
Settings.settings.showActiveWindowIcon = !Settings.settings.showActiveWindowIcon;
RowLayout {
spacing: 8
Layout.fillWidth: true
ColumnLayout {
spacing: 4
Layout.fillWidth: true
Text {
text: "Show Active Window"
font.pixelSize: 13 * Theme.uiScale
font.bold: true
color: Theme.textPrimary
}
Text {
text: "Display the title of the currently focused window below the bar"
font.pixelSize: 12 * Theme.uiScale
color: Theme.textSecondary
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}
Rectangle {
id: activeWindowSwitch
width: 52
height: 32
radius: 16
color: Settings.settings.showActiveWindow ? Theme.accentPrimary : Theme.surfaceVariant
border.color: Settings.settings.showActiveWindow ? Theme.accentPrimary : Theme.outline
border.width: 2
Rectangle {
id: activeWindowThumb
width: 28
height: 28
radius: 14
color: Theme.surface
border.color: Theme.outline
border.width: 1
y: 2
x: Settings.settings.showActiveWindow ? activeWindowSwitch.width - width - 2 : 2
Behavior on x {
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
Settings.settings.showActiveWindow = !Settings.settings.showActiveWindow;
}
}
}
} }
} }
ToggleOption {
ColumnLayout { label: "Show System Info"
spacing: 8 description: "Display system information (CPU, RAM, Temperature)"
Layout.fillWidth: true value: Settings.settings.showSystemInfoInBar
Layout.topMargin: 8 onToggled: function() {
Settings.settings.showSystemInfoInBar = !Settings.settings.showSystemInfoInBar;
RowLayout {
spacing: 8
Layout.fillWidth: true
ColumnLayout {
spacing: 4
Layout.fillWidth: true
Text {
text: "Show System Info"
font.pixelSize: 13 * Theme.uiScale
font.bold: true
color: Theme.textPrimary
}
Text {
text: "Display system information (CPU, RAM, etc.) in the bar"
font.pixelSize: 12 * Theme.uiScale
color: Theme.textSecondary
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}
Rectangle {
id: systemInfoSwitch
width: 52
height: 32
radius: 16
color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.surfaceVariant
border.color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.outline
border.width: 2
Rectangle {
id: systemInfoThumb
width: 28
height: 28
radius: 14
color: Theme.surface
border.color: Theme.outline
border.width: 1
y: 2
x: Settings.settings.showSystemInfoInBar ? systemInfoSwitch.width - width - 2 : 2
Behavior on x {
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
Settings.settings.showSystemInfoInBar = !Settings.settings.showSystemInfoInBar;
}
}
}
} }
} }
ToggleOption {
ColumnLayout { label: "Show Taskbar"
spacing: 8 description: "Display a taskbar showing currently open windows"
Layout.fillWidth: true value: Settings.settings.showTaskbar
Layout.topMargin: 8 onToggled: function() {
Settings.settings.showTaskbar = !Settings.settings.showTaskbar;
RowLayout {
spacing: 8
Layout.fillWidth: true
ColumnLayout {
spacing: 4
Layout.fillWidth: true
Text {
text: "Show Taskbar"
font.pixelSize: 13 * Theme.uiScale
font.bold: true
color: Theme.textPrimary
}
Text {
text: "Display a taskbar showing currently open windows"
font.pixelSize: 12 * Theme.uiScale
color: Theme.textSecondary
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}
Rectangle {
id: taskbarSwitch
width: 52
height: 32
radius: 16
color: Settings.settings.showTaskbar ? Theme.accentPrimary : Theme.surfaceVariant
border.color: Settings.settings.showTaskbar ? Theme.accentPrimary : Theme.outline
border.width: 2
Rectangle {
id: taskbarThumb
width: 28
height: 28
radius: 14
color: Theme.surface
border.color: Theme.outline
border.width: 1
y: 2
x: Settings.settings.showTaskbar ? taskbarSwitch.width - width - 2 : 2
Behavior on x {
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
Settings.settings.showTaskbar = !Settings.settings.showTaskbar;
}
}
}
} }
} }
ToggleOption {
ColumnLayout { label: "Show Media"
spacing: 8 description: "Display media controls and information"
Layout.fillWidth: true value: Settings.settings.showMediaInBar
Layout.topMargin: 8 onToggled: function() {
Settings.settings.showMediaInBar = !Settings.settings.showMediaInBar;
RowLayout {
spacing: 8
Layout.fillWidth: true
ColumnLayout {
spacing: 4
Layout.fillWidth: true
Text {
text: "Show Media"
font.pixelSize: 13 * Theme.uiScale
font.bold: true
color: Theme.textPrimary
}
Text {
text: "Display media controls and information in the bar"
font.pixelSize: 12 * Theme.uiScale
color: Theme.textSecondary
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}
Rectangle {
id: mediaSwitch
width: 52
height: 32
radius: 16
color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.surfaceVariant
border.color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.outline
border.width: 2
Rectangle {
id: mediaThumb
width: 28
height: 28
radius: 14
color: Theme.surface
border.color: Theme.outline
border.width: 1
y: 2
x: Settings.settings.showMediaInBar ? mediaSwitch.width - width - 2 : 2
Behavior on x {
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
Settings.settings.showMediaInBar = !Settings.settings.showMediaInBar;
}
}
}
} }
} }
} }
Item {
Layout.fillWidth: true
Layout.fillHeight: true
}
} }
} }

View file

@ -132,7 +132,7 @@ ColumnLayout {
Layout.bottomMargin: 16 * Theme.uiScale Layout.bottomMargin: 16 * Theme.uiScale
} }
Toggle { ToggleOption {
label: "Show Corners" label: "Show Corners"
description: "Display rounded corners" description: "Display rounded corners"
value: Settings.settings.showCorners value: Settings.settings.showCorners
@ -141,16 +141,16 @@ ColumnLayout {
} }
} }
Toggle { ToggleOption {
label: "Show Dock" label: "Show Dock"
description: "Display a dock at the bottom of the screen for quick access to applications" description: "Display a dock at the bottom of the screen for quick access to applications"
value: Settings.settings.showDock value: Settings.settings.showDock
onToggled: function() { onToggled: function() {
Settings.settings.showDock = !Settings.settings.showDock; Settings.settings.showDock = !Settings.settings.showDock;
} }
} }
Toggle { ToggleOption {
label: "Dim Desktop" label: "Dim Desktop"
description: "Dim the desktop when panels or menus are open" description: "Dim the desktop when panels or menus are open"
value: Settings.settings.dimPanels value: Settings.settings.dimPanels
@ -158,9 +158,9 @@ ColumnLayout {
Settings.settings.dimPanels = !Settings.settings.dimPanels; Settings.settings.dimPanels = !Settings.settings.dimPanels;
} }
} }
}
} }
} }
}