Settings: minor UI improvements

This commit is contained in:
LemmyCook 2025-09-02 08:51:08 -04:00
parent 63a545736c
commit 6c041fb27f
10 changed files with 47 additions and 91 deletions

View file

@ -123,9 +123,7 @@ ColumnLayout {
label: "Mute Audio Input" label: "Mute Audio Input"
description: "Mute or unmute the default audio input (microphone)." description: "Mute or unmute the default audio input (microphone)."
checked: AudioService.inputMuted checked: AudioService.inputMuted
onToggled: checked => { onToggled: checked => AudioService.setInputMuted(checked)
AudioService.setInputMuted(checked)
}
} }
} }
@ -249,18 +247,14 @@ ColumnLayout {
label: "Show Album Art In Bar Media Player" label: "Show Album Art In Bar Media Player"
description: "Show the album art of the currently playing song next to the title." description: "Show the album art of the currently playing song next to the title."
checked: Settings.data.audio.showMiniplayerAlbumArt checked: Settings.data.audio.showMiniplayerAlbumArt
onToggled: checked => { onToggled: checked => Settings.data.audio.showMiniplayerAlbumArt = checked
Settings.data.audio.showMiniplayerAlbumArt = checked
}
} }
NToggle { NToggle {
label: "Show Audio Visualizer In Bar Media Player" label: "Show Audio Visualizer In Bar Media Player"
description: "Shows an audio visualizer in the background of the miniplayer." description: "Shows an audio visualizer in the background of the miniplayer."
checked: Settings.data.audio.showMiniplayerCava checked: Settings.data.audio.showMiniplayerCava
onToggled: checked => { onToggled: checked => Settings.data.audio.showMiniplayerCava = checked
Settings.data.audio.showMiniplayerCava = checked
}
} }
// Preferred player (persistent) // Preferred player (persistent)
NTextInput { NTextInput {
@ -412,9 +406,7 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.audio.visualizerType currentKey: Settings.data.audio.visualizerType
onSelected: key => { onSelected: key => Settings.data.audio.visualizerType = key
Settings.data.audio.visualizerType = key
}
} }
NComboBox { NComboBox {
@ -451,9 +443,7 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.audio.cavaFrameRate currentKey: Settings.data.audio.cavaFrameRate
onSelected: key => { onSelected: key => Settings.data.audio.cavaFrameRate = key
Settings.data.audio.cavaFrameRate = key
}
} }
} }
// Divider // Divider

View file

@ -43,7 +43,7 @@ ColumnLayout {
} }
NText { NText {
text: "Adjust the background opacity of the bar" text: "Adjust the background opacity of the bar."
font.pointSize: Style.fontSizeXS * scaling font.pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
@ -74,32 +74,26 @@ ColumnLayout {
label: "Show Active Window's Icon" label: "Show Active Window's Icon"
description: "Display the app icon next to the title of the currently focused window." description: "Display the app icon next to the title of the currently focused window."
checked: Settings.data.bar.showActiveWindowIcon checked: Settings.data.bar.showActiveWindowIcon
onToggled: checked => { onToggled: checked => Settings.data.bar.showActiveWindowIcon = checked
Settings.data.bar.showActiveWindowIcon = checked
}
} }
NToggle { NToggle {
label: "Show Battery Percentage" label: "Show Battery Percentage"
description: "Display battery percentage at all times." description: "Display battery percentage at all times."
checked: Settings.data.bar.alwaysShowBatteryPercentage checked: Settings.data.bar.alwaysShowBatteryPercentage
onToggled: checked => { onToggled: checked => Settings.data.bar.alwaysShowBatteryPercentage = checked
Settings.data.bar.alwaysShowBatteryPercentage = checked
}
} }
NToggle { NToggle {
label: "Show Network Statistics" label: "Show Network Statistics"
description: "Display network upload and download speeds in the system monitor." description: "Display network upload and download speeds in the system monitor."
checked: Settings.data.bar.showNetworkStats checked: Settings.data.bar.showNetworkStats
onToggled: checked => { onToggled: checked => Settings.data.bar.showNetworkStats = checked
Settings.data.bar.showNetworkStats = checked
}
} }
NComboBox { NComboBox {
label: "Show Workspaces Labels" label: "Show Workspaces Labels"
description: "Display the workspace name or index in the workspace indicator" description: "Show the workspace name or index within the workspace indicator."
model: ListModel { model: ListModel {
ListElement { ListElement {
key: "none" key: "none"
@ -115,9 +109,7 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.bar.showWorkspaceLabel currentKey: Settings.data.bar.showWorkspaceLabel
onSelected: key => { onSelected: key => Settings.data.bar.showWorkspaceLabel = key
Settings.data.bar.showWorkspaceLabel = key
}
} }
} }
@ -142,7 +134,7 @@ ColumnLayout {
NText { NText {
text: "Drag and drop widgets to reorder them within each section, or use the add/remove buttons to manage widgets." text: "Drag and drop widgets to reorder them within each section, or use the add/remove buttons to manage widgets."
font.pointSize: Style.fontSizeXS * scaling font.pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
Layout.fillWidth: true Layout.fillWidth: true

View file

@ -298,9 +298,8 @@ ColumnLayout {
model: timeOptions model: timeOptions
currentKey: Settings.data.nightLight.manualSunrise currentKey: Settings.data.nightLight.manualSunrise
placeholder: "Select start time" placeholder: "Select start time"
onSelected: key => { onSelected: key => Settings.data.nightLight.manualSunrise = key
Settings.data.nightLight.manualSunrise = key
}
preferredWidth: 120 * scaling preferredWidth: 120 * scaling
} }
@ -316,9 +315,8 @@ ColumnLayout {
model: timeOptions model: timeOptions
currentKey: Settings.data.nightLight.manualSunset currentKey: Settings.data.nightLight.manualSunset
placeholder: "Select stop time" placeholder: "Select stop time"
onSelected: key => { onSelected: key => Settings.data.nightLight.manualSunset = key
Settings.data.nightLight.manualSunset = key
}
preferredWidth: 120 * scaling preferredWidth: 120 * scaling
} }
} }

View file

@ -1,6 +1,7 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Quickshell
import qs.Commons import qs.Commons
import qs.Services import qs.Services
import qs.Widgets import qs.Widgets
@ -15,8 +16,8 @@ ColumnLayout {
// Avatar preview // Avatar preview
NImageCircled { NImageCircled {
width: 128 * scaling width: 108 * scaling
height: 128 * scaling height: 108 * scaling
imagePath: Settings.data.general.avatarImage imagePath: Settings.data.general.avatarImage
fallbackIcon: "person" fallbackIcon: "person"
borderColor: Color.mPrimary borderColor: Color.mPrimary
@ -24,7 +25,7 @@ ColumnLayout {
} }
NTextInput { NTextInput {
label: "Profile Picture" label: `${Quickshell.env("USER") || "user"}'s profile picture`
description: "Your profile picture that appears throughout the interface." description: "Your profile picture that appears throughout the interface."
text: Settings.data.general.avatarImage text: Settings.data.general.avatarImage
placeholderText: "/home/user/.face" placeholderText: "/home/user/.face"
@ -57,27 +58,27 @@ ColumnLayout {
label: "Show Corners" label: "Show Corners"
description: "Display rounded corners on the edge of the screen." description: "Display rounded corners on the edge of the screen."
checked: Settings.data.general.showScreenCorners checked: Settings.data.general.showScreenCorners
onToggled: checked => { onToggled: checked =>
Settings.data.general.showScreenCorners = checked Settings.data.general.showScreenCorners = checked
}
} }
NToggle { NToggle {
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."
checked: Settings.data.general.dimDesktop checked: Settings.data.general.dimDesktop
onToggled: checked => { onToggled: checked =>
Settings.data.general.dimDesktop = checked Settings.data.general.dimDesktop = checked
}
} }
NToggle { NToggle {
label: "Auto-hide Dock" label: "Auto-hide Dock"
description: "Automatically hide the dock when not in use." description: "Automatically hide the dock when not in use."
checked: Settings.data.dock.autoHide checked: Settings.data.dock.autoHide
onToggled: checked => { onToggled: checked =>
Settings.data.dock.autoHide = checked Settings.data.dock.autoHide = checked
}
} }
ColumnLayout { ColumnLayout {

View file

@ -56,9 +56,7 @@ ColumnLayout {
label: "Enable Clipboard History" label: "Enable Clipboard History"
description: "Show clipboard history in the launcher." description: "Show clipboard history in the launcher."
checked: Settings.data.appLauncher.enableClipboardHistory checked: Settings.data.appLauncher.enableClipboardHistory
onToggled: checked => { onToggled: checked => Settings.data.appLauncher.enableClipboardHistory = checked
Settings.data.appLauncher.enableClipboardHistory = checked
}
} }
ColumnLayout { ColumnLayout {

View file

@ -37,9 +37,7 @@ ColumnLayout {
label: "Show Cursor" label: "Show Cursor"
description: "Record mouse cursor in the video." description: "Record mouse cursor in the video."
checked: Settings.data.screenRecorder.showCursor checked: Settings.data.screenRecorder.showCursor
onToggled: checked => { onToggled: checked => Settings.data.screenRecorder.showCursor = checked
Settings.data.screenRecorder.showCursor = checked
}
} }
} }
} }
@ -66,7 +64,7 @@ ColumnLayout {
// Source // Source
NComboBox { NComboBox {
label: "Video Source" label: "Video Source"
description: "We recommend using portal, if you get artifacts try screen." description: "Portal is recommend, if you get artifacts try Screen."
model: ListModel { model: ListModel {
ListElement { ListElement {
key: "portal" key: "portal"
@ -78,9 +76,7 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.screenRecorder.videoSource currentKey: Settings.data.screenRecorder.videoSource
onSelected: key => { onSelected: key => Settings.data.screenRecorder.videoSource = key
Settings.data.screenRecorder.videoSource = key
}
} }
// Frame Rate // Frame Rate
@ -118,9 +114,7 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.screenRecorder.frameRate currentKey: Settings.data.screenRecorder.frameRate
onSelected: key => { onSelected: key => Settings.data.screenRecorder.frameRate = key
Settings.data.screenRecorder.frameRate = key
}
} }
// Video Quality // Video Quality
@ -146,15 +140,13 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.screenRecorder.quality currentKey: Settings.data.screenRecorder.quality
onSelected: key => { onSelected: key => Settings.data.screenRecorder.quality = key
Settings.data.screenRecorder.quality = key
}
} }
// Video Codec // Video Codec
NComboBox { NComboBox {
label: "Video Codec" label: "Video Codec"
description: "Different codecs offer different compression and compatibility." description: "h264 is the most common codec."
model: ListModel { model: ListModel {
ListElement { ListElement {
key: "h264" key: "h264"
@ -178,9 +170,7 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.screenRecorder.videoCodec currentKey: Settings.data.screenRecorder.videoCodec
onSelected: key => { onSelected: key => Settings.data.screenRecorder.videoCodec = key
Settings.data.screenRecorder.videoCodec = key
}
} }
// Color Range // Color Range
@ -198,9 +188,7 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.screenRecorder.colorRange currentKey: Settings.data.screenRecorder.colorRange
onSelected: key => { onSelected: key => Settings.data.screenRecorder.colorRange = key
Settings.data.screenRecorder.colorRange = key
}
} }
} }
@ -242,9 +230,7 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.screenRecorder.audioSource currentKey: Settings.data.screenRecorder.audioSource
onSelected: key => { onSelected: key => Settings.data.screenRecorder.audioSource = key
Settings.data.screenRecorder.audioSource = key
}
} }
// Audio Codec // Audio Codec
@ -262,9 +248,7 @@ ColumnLayout {
} }
} }
currentKey: Settings.data.screenRecorder.audioCodec currentKey: Settings.data.screenRecorder.audioCodec
onSelected: key => { onSelected: key => Settings.data.screenRecorder.audioCodec = key
Settings.data.screenRecorder.audioCodec = key
}
} }
} }

View file

@ -63,27 +63,21 @@ ColumnLayout {
label: "Use 12-Hour Clock" label: "Use 12-Hour Clock"
description: "Display time in 12-hour format (AM/PM) instead of 24-hour." description: "Display time in 12-hour format (AM/PM) instead of 24-hour."
checked: Settings.data.location.use12HourClock checked: Settings.data.location.use12HourClock
onToggled: checked => { onToggled: checked => Settings.data.location.use12HourClock = checked
Settings.data.location.use12HourClock = checked
}
} }
NToggle { NToggle {
label: "Reverse Day/Month" label: "Reverse Day/Month"
description: "Display date as DD/MM instead of MM/DD." description: "Display date as dd/mm instead of mm/dd."
checked: Settings.data.location.reverseDayMonth checked: Settings.data.location.reverseDayMonth
onToggled: checked => { onToggled: checked => Settings.data.location.reverseDayMonth = checked
Settings.data.location.reverseDayMonth = checked
}
} }
NToggle { NToggle {
label: "Show Date with Clock" label: "Show Date with Clock"
description: "Display date alongside time (e.g., 18:12 - Sat, 23 Aug)." description: "Display date alongside time (e.g., 18:12 - Sat, 23 Aug)."
checked: Settings.data.location.showDateWithClock checked: Settings.data.location.showDateWithClock
onToggled: checked => { onToggled: checked => Settings.data.location.showDateWithClock = checked
Settings.data.location.showDateWithClock = checked
}
} }
} }
@ -109,9 +103,7 @@ ColumnLayout {
label: "Use Fahrenheit" label: "Use Fahrenheit"
description: "Display temperature in Fahrenheit instead of Celsius." description: "Display temperature in Fahrenheit instead of Celsius."
checked: Settings.data.location.useFahrenheit checked: Settings.data.location.useFahrenheit
onToggled: checked => { onToggled: checked => Settings.data.location.useFahrenheit = checked
Settings.data.location.useFahrenheit = checked
}
} }
} }

View file

@ -43,9 +43,10 @@ NBox {
NText { NText {
text: Quickshell.env("USER") || "user" text: Quickshell.env("USER") || "user"
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
font.capitalization: Font.Capitalize
} }
NText { NText {
text: `System Uptime: ${uptimeText}` text: `System uptime: ${uptimeText}`
color: Color.mOnSurface color: Color.mOnSurface
} }
} }

View file

@ -17,6 +17,7 @@ ColumnLayout {
text: label text: label
font.pointSize: Style.fontSizeL * scaling font.pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
font.capitalization: Font.Capitalize
color: labelColor color: labelColor
visible: label !== "" visible: label !== ""
} }

View file

@ -75,9 +75,8 @@ NBox {
label: "" label: ""
description: "" description: ""
placeholder: "Select a widget to add..." placeholder: "Select a widget to add..."
onSelected: key => { onSelected: key => comboBox.currentKey = key
comboBox.currentKey = key
}
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
} }