mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
settings: add index extractor script for search
This commit is contained in:
@@ -71,6 +71,8 @@ Item {
|
||||
settingKey: "dockVisibility"
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "showDock"
|
||||
tags: ["dock", "show", "display", "enable"]
|
||||
text: I18n.tr("Show Dock")
|
||||
description: I18n.tr("Display a dock with pinned and running applications")
|
||||
checked: SettingsData.showDock
|
||||
@@ -78,6 +80,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "dockAutoHide"
|
||||
tags: ["dock", "autohide", "hide", "hover"]
|
||||
text: I18n.tr("Auto-hide Dock")
|
||||
description: I18n.tr("Hide the dock when not in use and reveal it when hovering near the dock area")
|
||||
checked: SettingsData.dockAutoHide
|
||||
@@ -86,6 +90,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "dockOpenOnOverview"
|
||||
tags: ["dock", "overview", "niri"]
|
||||
text: I18n.tr("Show on Overview")
|
||||
description: I18n.tr("Always show the dock when niri's overview is open")
|
||||
checked: SettingsData.dockOpenOnOverview
|
||||
@@ -101,6 +107,8 @@ Item {
|
||||
settingKey: "dockBehavior"
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "dockIsolateDisplays"
|
||||
tags: ["dock", "isolate", "monitor", "multi-monitor"]
|
||||
text: I18n.tr("Isolate Displays")
|
||||
description: I18n.tr("Only show windows from the current monitor on each dock")
|
||||
checked: SettingsData.dockIsolateDisplays
|
||||
@@ -108,6 +116,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "dockGroupByApp"
|
||||
tags: ["dock", "group", "windows", "app"]
|
||||
text: I18n.tr("Group by App")
|
||||
description: I18n.tr("Group multiple windows of the same app together with a window count indicator")
|
||||
checked: SettingsData.dockGroupByApp
|
||||
@@ -115,6 +125,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsButtonGroupRow {
|
||||
settingKey: "dockIndicatorStyle"
|
||||
tags: ["dock", "indicator", "style", "circle", "line"]
|
||||
text: I18n.tr("Indicator Style")
|
||||
model: ["Circle", "Line"]
|
||||
currentIndex: SettingsData.dockIndicatorStyle === "circle" ? 0 : 1
|
||||
@@ -133,6 +145,8 @@ Item {
|
||||
settingKey: "dockSizing"
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "dockIconSize"
|
||||
tags: ["dock", "icon", "size", "scale"]
|
||||
text: I18n.tr("Icon Size")
|
||||
value: SettingsData.dockIconSize
|
||||
minimum: 24
|
||||
|
||||
@@ -250,6 +250,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "launcherLogoSizeOffset"
|
||||
tags: ["launcher", "logo", "size", "offset", "scale"]
|
||||
text: I18n.tr("Size Offset")
|
||||
minimum: -12
|
||||
maximum: 12
|
||||
@@ -267,6 +269,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "launcherLogoBrightness"
|
||||
tags: ["launcher", "logo", "brightness", "color"]
|
||||
text: I18n.tr("Brightness")
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
@@ -277,6 +281,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "launcherLogoContrast"
|
||||
tags: ["launcher", "logo", "contrast", "color"]
|
||||
text: I18n.tr("Contrast")
|
||||
minimum: 0
|
||||
maximum: 200
|
||||
@@ -287,6 +293,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "launcherLogoColorInvertOnMode"
|
||||
tags: ["launcher", "logo", "invert", "mode", "color"]
|
||||
text: I18n.tr("Invert on mode change")
|
||||
checked: SettingsData.launcherLogoColorInvertOnMode
|
||||
onToggled: checked => SettingsData.set("launcherLogoColorInvertOnMode", checked)
|
||||
@@ -324,6 +332,8 @@ Item {
|
||||
settingKey: "launcherSorting"
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "sortAppsAlphabetically"
|
||||
tags: ["launcher", "sort", "alphabetically", "apps", "order"]
|
||||
text: I18n.tr("Sort Alphabetically")
|
||||
description: I18n.tr("When enabled, apps are sorted alphabetically. When disabled, apps are sorted by usage frequency.")
|
||||
checked: SettingsData.sortAppsAlphabetically
|
||||
@@ -331,6 +341,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "appLauncherGridColumns"
|
||||
tags: ["launcher", "grid", "columns", "layout"]
|
||||
text: I18n.tr("Grid Columns")
|
||||
description: I18n.tr("Adjust the number of columns in grid view mode.")
|
||||
minimum: 2
|
||||
@@ -348,6 +360,8 @@ Item {
|
||||
visible: CompositorService.isNiri
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "spotlightCloseNiriOverview"
|
||||
tags: ["launcher", "niri", "overview", "close", "launch"]
|
||||
text: I18n.tr("Close Overview on Launch")
|
||||
description: I18n.tr("Auto-close Niri overview when launching apps.")
|
||||
checked: SettingsData.spotlightCloseNiriOverview
|
||||
@@ -355,6 +369,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "niriOverviewOverlayEnabled"
|
||||
tags: ["launcher", "niri", "overview", "overlay", "enable"]
|
||||
text: I18n.tr("Enable Overview Overlay")
|
||||
description: I18n.tr("Show launcher overlay when typing in Niri overview. Disable to use another launcher.")
|
||||
checked: SettingsData.niriOverviewOverlayEnabled
|
||||
|
||||
@@ -28,36 +28,48 @@ Item {
|
||||
settingKey: "lockLayout"
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "lockScreenShowPowerActions"
|
||||
tags: ["lock", "screen", "power", "actions", "shutdown", "reboot"]
|
||||
text: I18n.tr("Show Power Actions", "Enable power action icon on the lock screen window")
|
||||
checked: SettingsData.lockScreenShowPowerActions
|
||||
onToggled: checked => SettingsData.set("lockScreenShowPowerActions", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "lockScreenShowSystemIcons"
|
||||
tags: ["lock", "screen", "system", "icons", "status"]
|
||||
text: I18n.tr("Show System Icons", "Enable system status icons on the lock screen window")
|
||||
checked: SettingsData.lockScreenShowSystemIcons
|
||||
onToggled: checked => SettingsData.set("lockScreenShowSystemIcons", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "lockScreenShowTime"
|
||||
tags: ["lock", "screen", "time", "clock", "display"]
|
||||
text: I18n.tr("Show System Time", "Enable system time display on the lock screen window")
|
||||
checked: SettingsData.lockScreenShowTime
|
||||
onToggled: checked => SettingsData.set("lockScreenShowTime", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "lockScreenShowDate"
|
||||
tags: ["lock", "screen", "date", "calendar", "display"]
|
||||
text: I18n.tr("Show System Date", "Enable system date display on the lock screen window")
|
||||
checked: SettingsData.lockScreenShowDate
|
||||
onToggled: checked => SettingsData.set("lockScreenShowDate", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "lockScreenShowProfileImage"
|
||||
tags: ["lock", "screen", "profile", "image", "avatar", "picture"]
|
||||
text: I18n.tr("Show Profile Image", "Enable profile image display on the lock screen window")
|
||||
checked: SettingsData.lockScreenShowProfileImage
|
||||
onToggled: checked => SettingsData.set("lockScreenShowProfileImage", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "lockScreenShowPasswordField"
|
||||
tags: ["lock", "screen", "password", "field", "input", "visible"]
|
||||
text: I18n.tr("Show Password Field", "Enable password field display on the lock screen window")
|
||||
description: I18n.tr("If the field is hidden, it will appear as soon as a key is pressed.")
|
||||
checked: SettingsData.lockScreenShowPasswordField
|
||||
@@ -81,6 +93,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "loginctlLockIntegration"
|
||||
tags: ["lock", "screen", "loginctl", "dbus", "integration", "external"]
|
||||
text: I18n.tr("Enable loginctl lock integration")
|
||||
description: I18n.tr("Bind lock screen to dbus signals from loginctl. Disable if using an external lock screen")
|
||||
checked: SessionService.loginctlAvailable && SettingsData.loginctlLockIntegration
|
||||
@@ -93,6 +107,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "lockBeforeSuspend"
|
||||
tags: ["lock", "screen", "suspend", "sleep", "automatic"]
|
||||
text: I18n.tr("Lock before suspend")
|
||||
description: I18n.tr("Automatically lock the screen when the system prepares to suspend")
|
||||
checked: SettingsData.lockBeforeSuspend
|
||||
@@ -101,6 +117,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "enableFprint"
|
||||
tags: ["lock", "screen", "fingerprint", "authentication", "biometric", "fprint"]
|
||||
text: I18n.tr("Enable fingerprint authentication")
|
||||
description: I18n.tr("Use fingerprint reader for lock screen authentication (requires enrolled fingerprints)")
|
||||
checked: SettingsData.enableFprint
|
||||
@@ -126,6 +144,8 @@ Item {
|
||||
|
||||
SettingsDropdownRow {
|
||||
id: lockScreenMonitorDropdown
|
||||
settingKey: "lockScreenActiveMonitor"
|
||||
tags: ["lock", "screen", "monitor", "display", "active"]
|
||||
text: I18n.tr("Active Lock Screen Monitor")
|
||||
options: {
|
||||
var opts = [I18n.tr("All Monitors")];
|
||||
|
||||
@@ -93,6 +93,8 @@ Item {
|
||||
settingKey: "notificationPopups"
|
||||
|
||||
SettingsDropdownRow {
|
||||
settingKey: "notificationPopupPosition"
|
||||
tags: ["notification", "popup", "position", "screen", "location"]
|
||||
text: I18n.tr("Popup Position")
|
||||
description: I18n.tr("Choose where notification popups appear on screen")
|
||||
currentValue: {
|
||||
@@ -135,6 +137,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "notificationOverlayEnabled"
|
||||
tags: ["notification", "overlay", "fullscreen", "priority"]
|
||||
text: I18n.tr("Notification Overlay")
|
||||
description: I18n.tr("Display all priorities over fullscreen apps")
|
||||
checked: SettingsData.notificationOverlayEnabled
|
||||
@@ -149,6 +153,8 @@ Item {
|
||||
settingKey: "doNotDisturb"
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "doNotDisturb"
|
||||
tags: ["notification", "dnd", "mute", "silent", "suppress"]
|
||||
text: I18n.tr("Enable Do Not Disturb")
|
||||
description: I18n.tr("Suppress notification popups while enabled")
|
||||
checked: SessionData.doNotDisturb
|
||||
@@ -163,6 +169,8 @@ Item {
|
||||
settingKey: "notificationTimeouts"
|
||||
|
||||
SettingsDropdownRow {
|
||||
settingKey: "notificationTimeoutLow"
|
||||
tags: ["notification", "timeout", "low", "priority", "duration"]
|
||||
text: I18n.tr("Low Priority")
|
||||
description: I18n.tr("Timeout for low priority notifications")
|
||||
currentValue: root.getTimeoutText(SettingsData.notificationTimeoutLow)
|
||||
@@ -178,6 +186,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsDropdownRow {
|
||||
settingKey: "notificationTimeoutNormal"
|
||||
tags: ["notification", "timeout", "normal", "priority", "duration"]
|
||||
text: I18n.tr("Normal Priority")
|
||||
description: I18n.tr("Timeout for normal priority notifications")
|
||||
currentValue: root.getTimeoutText(SettingsData.notificationTimeoutNormal)
|
||||
@@ -193,6 +203,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsDropdownRow {
|
||||
settingKey: "notificationTimeoutCritical"
|
||||
tags: ["notification", "timeout", "critical", "priority", "duration"]
|
||||
text: I18n.tr("Critical Priority")
|
||||
description: I18n.tr("Timeout for critical priority notifications")
|
||||
currentValue: root.getTimeoutText(SettingsData.notificationTimeoutCritical)
|
||||
|
||||
@@ -64,6 +64,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "fadeToLockEnabled"
|
||||
tags: ["fade", "lock", "screen", "idle", "grace period"]
|
||||
text: I18n.tr("Fade to lock screen")
|
||||
description: I18n.tr("Gradually fade the screen before locking with a configurable grace period")
|
||||
checked: SettingsData.fadeToLockEnabled
|
||||
@@ -71,6 +73,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "lockBeforeSuspend"
|
||||
tags: ["lock", "suspend", "sleep", "security"]
|
||||
text: I18n.tr("Lock before suspend")
|
||||
description: I18n.tr("Automatically lock the screen when the system prepares to suspend")
|
||||
checked: SettingsData.lockBeforeSuspend
|
||||
@@ -80,6 +84,8 @@ Item {
|
||||
|
||||
SettingsDropdownRow {
|
||||
id: fadeGracePeriodDropdown
|
||||
settingKey: "fadeToLockGracePeriod"
|
||||
tags: ["fade", "grace", "period", "timeout", "lock"]
|
||||
property var periodOptions: ["1 second", "2 seconds", "3 seconds", "4 seconds", "5 seconds", "10 seconds", "15 seconds", "20 seconds", "30 seconds"]
|
||||
property var periodValues: [1, 2, 3, 4, 5, 10, 15, 20, 30]
|
||||
|
||||
@@ -103,6 +109,8 @@ Item {
|
||||
}
|
||||
SettingsDropdownRow {
|
||||
id: powerProfileDropdown
|
||||
settingKey: "powerProfile"
|
||||
tags: ["power", "profile", "performance", "balanced", "saver", "battery"]
|
||||
property var profileOptions: [I18n.tr("Don't Change"), Theme.getPowerProfileLabel(0), Theme.getPowerProfileLabel(1), Theme.getPowerProfileLabel(2)]
|
||||
property var profileValues: ["", "0", "1", "2"]
|
||||
|
||||
@@ -148,6 +156,8 @@ Item {
|
||||
|
||||
SettingsDropdownRow {
|
||||
id: lockDropdown
|
||||
settingKey: "lockTimeout"
|
||||
tags: ["lock", "timeout", "idle", "automatic", "security"]
|
||||
text: I18n.tr("Automatically lock after")
|
||||
options: root.timeoutOptions
|
||||
|
||||
@@ -179,6 +189,8 @@ Item {
|
||||
|
||||
SettingsDropdownRow {
|
||||
id: monitorDropdown
|
||||
settingKey: "monitorTimeout"
|
||||
tags: ["monitor", "display", "screen", "timeout", "off", "idle"]
|
||||
text: I18n.tr("Turn off monitors after")
|
||||
options: root.timeoutOptions
|
||||
|
||||
@@ -210,6 +222,8 @@ Item {
|
||||
|
||||
SettingsDropdownRow {
|
||||
id: suspendDropdown
|
||||
settingKey: "suspendTimeout"
|
||||
tags: ["suspend", "sleep", "timeout", "idle", "system"]
|
||||
text: I18n.tr("Suspend system after")
|
||||
options: root.timeoutOptions
|
||||
|
||||
@@ -307,6 +321,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "powerMenuGridLayout"
|
||||
tags: ["power", "menu", "grid", "layout", "list"]
|
||||
text: I18n.tr("Use Grid Layout")
|
||||
description: I18n.tr("Display power menu actions in a grid instead of a list")
|
||||
checked: SettingsData.powerMenuGridLayout
|
||||
@@ -315,6 +331,8 @@ Item {
|
||||
|
||||
SettingsDropdownRow {
|
||||
id: defaultActionDropdown
|
||||
settingKey: "powerMenuDefaultAction"
|
||||
tags: ["power", "menu", "default", "action", "reboot", "logout", "shutdown"]
|
||||
text: I18n.tr("Default selected action")
|
||||
options: ["Reboot", "Log Out", "Power Off", "Lock", "Suspend", "Restart DMS", "Hibernate"]
|
||||
property var actionValues: ["reboot", "logout", "poweroff", "lock", "suspend", "restart", "hibernate"]
|
||||
@@ -381,6 +399,8 @@ Item {
|
||||
|
||||
SettingsToggleRow {
|
||||
required property var modelData
|
||||
settingKey: "powerMenuAction_" + modelData.key
|
||||
tags: ["power", "menu", "action", "show", modelData.key]
|
||||
text: modelData.label
|
||||
description: modelData.desc || ""
|
||||
visible: !modelData.hibernate || SessionService.hibernateSupported
|
||||
@@ -406,6 +426,8 @@ Item {
|
||||
settingKey: "powerConfirmation"
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "powerActionConfirm"
|
||||
tags: ["power", "confirm", "hold", "button", "safety"]
|
||||
text: I18n.tr("Hold to Confirm Power Actions")
|
||||
description: I18n.tr("Require holding button/key to confirm power off, restart, suspend, hibernate and logout")
|
||||
checked: SettingsData.powerActionConfirm
|
||||
@@ -414,6 +436,8 @@ Item {
|
||||
|
||||
SettingsDropdownRow {
|
||||
id: holdDurationDropdown
|
||||
settingKey: "powerActionHoldDuration"
|
||||
tags: ["power", "hold", "duration", "confirm", "time"]
|
||||
property var durationOptions: ["250 ms", "500 ms", "750 ms", "1 second", "2 seconds", "3 seconds", "5 seconds", "10 seconds"]
|
||||
property var durationValues: [0.25, 0.5, 0.75, 1, 2, 3, 5, 10]
|
||||
|
||||
@@ -518,6 +542,8 @@ Item {
|
||||
expanded: false
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "batteryChargeLimit"
|
||||
tags: ["battery", "charge", "limit", "percentage", "power"]
|
||||
text: I18n.tr("Battery Charge Limit")
|
||||
description: I18n.tr("Note: this only changes the percentage, it does not actually limit charging.")
|
||||
value: SettingsData.batteryChargeLimit
|
||||
|
||||
@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Item {
|
||||
@@ -16,6 +17,46 @@ Item {
|
||||
|
||||
property string text: ""
|
||||
property string description: ""
|
||||
|
||||
readonly property bool isHighlighted: settingKey !== "" && SettingsSearchService.highlightSection === settingKey
|
||||
|
||||
function findParentFlickable() {
|
||||
let p = root.parent;
|
||||
while (p) {
|
||||
if (p.hasOwnProperty("contentY") && p.hasOwnProperty("contentItem"))
|
||||
return p;
|
||||
p = p.parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (!settingKey)
|
||||
return;
|
||||
let flickable = findParentFlickable();
|
||||
if (flickable)
|
||||
SettingsSearchService.registerCard(settingKey, root, flickable);
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
if (settingKey)
|
||||
SettingsSearchService.unregisterCard(settingKey);
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.withAlpha(Theme.primary, root.isHighlighted ? 0.2 : 0)
|
||||
visible: root.isHighlighted
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property alias model: buttonGroup.model
|
||||
property alias currentIndex: buttonGroup.currentIndex
|
||||
property alias selectionMode: buttonGroup.selectionMode
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
DankDropdown {
|
||||
@@ -10,6 +12,45 @@ DankDropdown {
|
||||
property var tags: []
|
||||
property string settingKey: ""
|
||||
|
||||
readonly property bool isHighlighted: settingKey !== "" && SettingsSearchService.highlightSection === settingKey
|
||||
|
||||
width: parent?.width ?? 0
|
||||
addHorizontalPadding: true
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.withAlpha(Theme.primary, root.isHighlighted ? 0.2 : 0)
|
||||
visible: root.isHighlighted
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function findParentFlickable() {
|
||||
let p = root.parent;
|
||||
while (p) {
|
||||
if (p.hasOwnProperty("contentY") && p.hasOwnProperty("contentItem"))
|
||||
return p;
|
||||
p = p.parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (!settingKey)
|
||||
return;
|
||||
let flickable = findParentFlickable();
|
||||
if (flickable)
|
||||
SettingsSearchService.registerCard(settingKey, root, flickable);
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
if (settingKey)
|
||||
SettingsSearchService.unregisterCard(settingKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Item {
|
||||
@@ -16,6 +17,45 @@ Item {
|
||||
|
||||
property string text: ""
|
||||
property string description: ""
|
||||
|
||||
readonly property bool isHighlighted: settingKey !== "" && SettingsSearchService.highlightSection === settingKey
|
||||
|
||||
function findParentFlickable() {
|
||||
let p = root.parent;
|
||||
while (p) {
|
||||
if (p.hasOwnProperty("contentY") && p.hasOwnProperty("contentItem"))
|
||||
return p;
|
||||
p = p.parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (!settingKey)
|
||||
return;
|
||||
let flickable = findParentFlickable();
|
||||
if (flickable)
|
||||
SettingsSearchService.registerCard(settingKey, root, flickable);
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
if (settingKey)
|
||||
SettingsSearchService.unregisterCard(settingKey);
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.withAlpha(Theme.primary, root.isHighlighted ? 0.2 : 0)
|
||||
visible: root.isHighlighted
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
}
|
||||
property alias value: slider.value
|
||||
property alias minimum: slider.minimum
|
||||
property alias maximum: slider.maximum
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
DankToggle {
|
||||
@@ -10,5 +12,44 @@ DankToggle {
|
||||
property var tags: []
|
||||
property string settingKey: ""
|
||||
|
||||
readonly property bool isHighlighted: settingKey !== "" && SettingsSearchService.highlightSection === settingKey
|
||||
|
||||
width: parent?.width ?? 0
|
||||
|
||||
function findParentFlickable() {
|
||||
let p = root.parent;
|
||||
while (p) {
|
||||
if (p.hasOwnProperty("contentY") && p.hasOwnProperty("contentItem"))
|
||||
return p;
|
||||
p = p.parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (!settingKey)
|
||||
return;
|
||||
let flickable = findParentFlickable();
|
||||
if (flickable)
|
||||
SettingsSearchService.registerCard(settingKey, root, flickable);
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
if (settingKey)
|
||||
SettingsSearchService.unregisterCard(settingKey);
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.withAlpha(Theme.primary, root.isHighlighted ? 0.2 : 0)
|
||||
visible: root.isHighlighted
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Theme.shortDuration
|
||||
easing.type: Theme.standardEasing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ Item {
|
||||
settingKey: "workspaceSettings"
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "showWorkspaceIndex"
|
||||
tags: ["workspace", "index", "numbers", "labels"]
|
||||
text: I18n.tr("Workspace Index Numbers")
|
||||
description: I18n.tr("Show workspace index numbers in the top bar workspace switcher")
|
||||
checked: SettingsData.showWorkspaceIndex
|
||||
@@ -34,6 +36,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "showWorkspacePadding"
|
||||
tags: ["workspace", "padding", "minimum"]
|
||||
text: I18n.tr("Workspace Padding")
|
||||
description: I18n.tr("Always show a minimum of 3 workspaces, even if fewer are available")
|
||||
checked: SettingsData.showWorkspacePadding
|
||||
@@ -41,6 +45,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "showWorkspaceApps"
|
||||
tags: ["workspace", "apps", "icons", "applications"]
|
||||
text: I18n.tr("Show Workspace Apps")
|
||||
description: I18n.tr("Display application icons in workspace indicators")
|
||||
checked: SettingsData.showWorkspaceApps
|
||||
@@ -89,6 +95,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "workspacesPerMonitor"
|
||||
tags: ["workspace", "per-monitor", "multi-monitor"]
|
||||
text: I18n.tr("Per-Monitor Workspaces")
|
||||
description: I18n.tr("Show only workspaces belonging to each specific monitor.")
|
||||
checked: SettingsData.workspacesPerMonitor
|
||||
@@ -96,6 +104,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "showOccupiedWorkspacesOnly"
|
||||
tags: ["workspace", "occupied", "active", "windows"]
|
||||
text: I18n.tr("Show Occupied Workspaces Only")
|
||||
description: I18n.tr("Display only workspaces that contain windows")
|
||||
checked: SettingsData.showOccupiedWorkspacesOnly
|
||||
@@ -104,6 +114,8 @@ Item {
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "dwlShowAllTags"
|
||||
tags: ["dwl", "tags", "workspace"]
|
||||
text: I18n.tr("Show All Tags")
|
||||
description: I18n.tr("Show all 9 tags instead of only occupied tags (DWL only)")
|
||||
checked: SettingsData.dwlShowAllTags
|
||||
|
||||
Reference in New Issue
Block a user