Autoformatting
This commit is contained in:
parent
8b6c7632af
commit
af0f4818d8
8 changed files with 309 additions and 325 deletions
|
|
@ -21,15 +21,13 @@ Rectangle {
|
||||||
readonly property bool isVertical: barPosition === "left" || barPosition === "right"
|
readonly property bool isVertical: barPosition === "left" || barPosition === "right"
|
||||||
|
|
||||||
function onLoaded() {
|
function onLoaded() {
|
||||||
// When the widget is fully initialized with its props
|
// When the widget is fully initialized with its props set the screen for the trayMenu
|
||||||
// set the screen for the trayMenu
|
|
||||||
if (trayMenu.item) {
|
if (trayMenu.item) {
|
||||||
trayMenu.item.screen = screen
|
trayMenu.item.screen = screen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visible: SystemTray.items.values.length > 0
|
visible: SystemTray.items.values.length > 0
|
||||||
// Changed: The binding now refers to 'trayFlow'
|
|
||||||
implicitWidth: isVertical ? Math.round(Style.capsuleHeight * scaling) : (trayFlow.implicitWidth + Style.marginS * scaling * 2)
|
implicitWidth: isVertical ? Math.round(Style.capsuleHeight * scaling) : (trayFlow.implicitWidth + Style.marginS * scaling * 2)
|
||||||
implicitHeight: isVertical ? (trayFlow.implicitHeight + Style.marginS * scaling * 2) : Math.round(Style.capsuleHeight * scaling)
|
implicitHeight: isVertical ? (trayFlow.implicitHeight + Style.marginS * scaling * 2) : Math.round(Style.capsuleHeight * scaling)
|
||||||
radius: Math.round(Style.radiusM * scaling)
|
radius: Math.round(Style.radiusM * scaling)
|
||||||
|
|
@ -41,8 +39,6 @@ Rectangle {
|
||||||
id: trayFlow
|
id: trayFlow
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.marginS * scaling
|
spacing: Style.marginS * scaling
|
||||||
|
|
||||||
// The key change: Dynamically set the flow direction
|
|
||||||
flow: isVertical ? Flow.TopToBottom : Flow.LeftToRight
|
flow: isVertical ? Flow.TopToBottom : Flow.LeftToRight
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|
@ -185,4 +181,4 @@ Rectangle {
|
||||||
source: "../Extras/TrayMenu.qml"
|
source: "../Extras/TrayMenu.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,101 +23,99 @@ ColumnLayout {
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
|
|
||||||
|
|
||||||
// Versions
|
// Versions
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: 2
|
columns: 2
|
||||||
rowSpacing: Style.marginXS * scaling
|
rowSpacing: Style.marginXS * scaling
|
||||||
columnSpacing: Style.marginS * scaling
|
columnSpacing: Style.marginS * scaling
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: "Latest Version:"
|
text: "Latest Version:"
|
||||||
color: Color.mOnSurface
|
color: Color.mOnSurface
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: root.latestVersion
|
|
||||||
color: Color.mOnSurface
|
|
||||||
font.weight: Style.fontWeightBold
|
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: "Installed Version:"
|
|
||||||
color: Color.mOnSurface
|
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: root.currentVersion
|
|
||||||
color: Color.mOnSurface
|
|
||||||
font.weight: Style.fontWeightBold
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update button
|
|
||||||
Rectangle {
|
|
||||||
Layout.alignment: Qt.alignmentRight
|
|
||||||
Layout.preferredWidth: Math.round(updateRow.implicitWidth + (Style.marginL * scaling * 2))
|
|
||||||
Layout.preferredHeight: Math.round(Style.barHeight * scaling)
|
|
||||||
radius: Style.radiusL * scaling
|
|
||||||
color: updateArea.containsMouse ? Color.mPrimary : Color.transparent
|
|
||||||
border.color: Color.mPrimary
|
|
||||||
border.width: Math.max(1, Style.borderS * scaling)
|
|
||||||
visible: {
|
|
||||||
if (root.latestVersion === "Unknown")
|
|
||||||
return false
|
|
||||||
|
|
||||||
const latest = root.latestVersion.replace("v", "").split(".")
|
|
||||||
const current = root.currentVersion.replace("v", "").split(".")
|
|
||||||
for (var i = 0; i < Math.max(latest.length, current.length); i++) {
|
|
||||||
const l = parseInt(latest[i] || "0")
|
|
||||||
const c = parseInt(current[i] || "0")
|
|
||||||
if (l > c)
|
|
||||||
return true
|
|
||||||
|
|
||||||
if (l < c)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: updateRow
|
|
||||||
anchors.centerIn: parent
|
|
||||||
spacing: Style.marginS * scaling
|
|
||||||
|
|
||||||
NIcon {
|
|
||||||
icon: "download"
|
|
||||||
font.pointSize: Style.fontSizeXXL * scaling
|
|
||||||
color: updateArea.containsMouse ? Color.mSurface : Color.mPrimary
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
id: updateText
|
text: root.latestVersion
|
||||||
text: "Download latest release"
|
color: Color.mOnSurface
|
||||||
font.pointSize: Style.fontSizeL * scaling
|
font.weight: Style.fontWeightBold
|
||||||
color: updateArea.containsMouse ? Color.mSurface : Color.mPrimary
|
}
|
||||||
|
|
||||||
|
NText {
|
||||||
|
text: "Installed Version:"
|
||||||
|
color: Color.mOnSurface
|
||||||
|
}
|
||||||
|
|
||||||
|
NText {
|
||||||
|
text: root.currentVersion
|
||||||
|
color: Color.mOnSurface
|
||||||
|
font.weight: Style.fontWeightBold
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
Item {
|
||||||
id: updateArea
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
anchors.fill: parent
|
// Update button
|
||||||
hoverEnabled: true
|
Rectangle {
|
||||||
cursorShape: Qt.PointingHandCursor
|
Layout.alignment: Qt.alignmentRight
|
||||||
onClicked: {
|
Layout.preferredWidth: Math.round(updateRow.implicitWidth + (Style.marginL * scaling * 2))
|
||||||
Quickshell.execDetached(["xdg-open", "https://github.com/Ly-sec/Noctalia/releases/latest"])
|
Layout.preferredHeight: Math.round(Style.barHeight * scaling)
|
||||||
|
radius: Style.radiusL * scaling
|
||||||
|
color: updateArea.containsMouse ? Color.mPrimary : Color.transparent
|
||||||
|
border.color: Color.mPrimary
|
||||||
|
border.width: Math.max(1, Style.borderS * scaling)
|
||||||
|
visible: {
|
||||||
|
if (root.latestVersion === "Unknown")
|
||||||
|
return false
|
||||||
|
|
||||||
|
const latest = root.latestVersion.replace("v", "").split(".")
|
||||||
|
const current = root.currentVersion.replace("v", "").split(".")
|
||||||
|
for (var i = 0; i < Math.max(latest.length, current.length); i++) {
|
||||||
|
const l = parseInt(latest[i] || "0")
|
||||||
|
const c = parseInt(current[i] || "0")
|
||||||
|
if (l > c)
|
||||||
|
return true
|
||||||
|
|
||||||
|
if (l < c)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: updateRow
|
||||||
|
anchors.centerIn: parent
|
||||||
|
spacing: Style.marginS * scaling
|
||||||
|
|
||||||
|
NIcon {
|
||||||
|
icon: "download"
|
||||||
|
font.pointSize: Style.fontSizeXXL * scaling
|
||||||
|
color: updateArea.containsMouse ? Color.mSurface : Color.mPrimary
|
||||||
|
}
|
||||||
|
|
||||||
|
NText {
|
||||||
|
id: updateText
|
||||||
|
text: "Download latest release"
|
||||||
|
font.pointSize: Style.fontSizeL * scaling
|
||||||
|
color: updateArea.containsMouse ? Color.mSurface : Color.mPrimary
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: updateArea
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
Quickshell.execDetached(["xdg-open", "https://github.com/Ly-sec/Noctalia/releases/latest"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.marginXL * scaling
|
Layout.topMargin: Style.marginXL * scaling
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
|
|
||||||
|
|
||||||
// Helper functions to update arrays immutably
|
// Helper functions to update arrays immutably
|
||||||
function addMonitor(list, name) {
|
function addMonitor(list, name) {
|
||||||
const arr = (list || []).slice()
|
const arr = (list || []).slice()
|
||||||
|
|
@ -40,156 +39,154 @@ ColumnLayout {
|
||||||
panel.enableBackgroundClick()
|
panel.enableBackgroundClick()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NHeader {
|
NHeader {
|
||||||
label: "Appearance"
|
label: "Appearance"
|
||||||
description: "Configure bar appearance and positioning."
|
description: "Configure bar appearance and positioning."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
NComboBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
label: "Bar Position"
|
||||||
|
description: "Choose where to place the bar on the screen."
|
||||||
|
model: ListModel {
|
||||||
|
ListElement {
|
||||||
|
key: "top"
|
||||||
|
name: "Top"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
key: "bottom"
|
||||||
|
name: "Bottom"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
key: "left"
|
||||||
|
name: "Left"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
key: "right"
|
||||||
|
name: "Right"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
currentKey: Settings.data.bar.position
|
||||||
|
onSelected: key => Settings.data.bar.position = key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: Style.marginXXS * scaling
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
NLabel {
|
||||||
|
label: "Background Opacity"
|
||||||
|
description: "Adjust the background opacity of the bar."
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
NComboBox {
|
NSlider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
label: "Bar Position"
|
from: 0
|
||||||
description: "Choose where to place the bar on the screen."
|
to: 1
|
||||||
model: ListModel {
|
stepSize: 0.01
|
||||||
ListElement {
|
value: Settings.data.bar.backgroundOpacity
|
||||||
key: "top"
|
onMoved: Settings.data.bar.backgroundOpacity = value
|
||||||
name: "Top"
|
cutoutColor: Color.mSurface
|
||||||
}
|
}
|
||||||
ListElement {
|
|
||||||
key: "bottom"
|
NText {
|
||||||
name: "Bottom"
|
text: Math.floor(Settings.data.bar.backgroundOpacity * 100) + "%"
|
||||||
}
|
Layout.alignment: Qt.AlignVCenter
|
||||||
ListElement {
|
Layout.leftMargin: Style.marginS * scaling
|
||||||
key: "left"
|
color: Color.mOnSurface
|
||||||
name: "Left"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
key: "right"
|
|
||||||
name: "Right"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
currentKey: Settings.data.bar.position
|
|
||||||
onSelected: key => Settings.data.bar.position = key
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
NToggle {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
label: "Floating Bar"
|
||||||
|
description: "Make the bar float with rounded corners and margins. This will hide screen corners."
|
||||||
|
checked: Settings.data.bar.floating
|
||||||
|
onToggled: checked => Settings.data.bar.floating = checked
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
// Floating bar options - only show when floating is enabled
|
||||||
spacing: Style.marginXXS * scaling
|
ColumnLayout {
|
||||||
|
visible: Settings.data.bar.floating
|
||||||
|
spacing: Style.marginS * scaling
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
NLabel {
|
||||||
|
label: "Margins"
|
||||||
|
description: "Adjust the margins around the floating bar."
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
spacing: Style.marginL * scaling
|
||||||
|
|
||||||
NLabel {
|
ColumnLayout {
|
||||||
label: "Background Opacity"
|
spacing: Style.marginXXS * scaling
|
||||||
description: "Adjust the background opacity of the bar."
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
NSlider {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
from: 0
|
|
||||||
to: 1
|
|
||||||
stepSize: 0.01
|
|
||||||
value: Settings.data.bar.backgroundOpacity
|
|
||||||
onMoved: Settings.data.bar.backgroundOpacity = value
|
|
||||||
cutoutColor: Color.mSurface
|
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: Math.floor(Settings.data.bar.backgroundOpacity * 100) + "%"
|
text: "Vertical"
|
||||||
Layout.alignment: Qt.AlignVCenter
|
font.pointSize: Style.fontSizeXS * scaling
|
||||||
Layout.leftMargin: Style.marginS * scaling
|
color: Color.mOnSurfaceVariant
|
||||||
color: Color.mOnSurface
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
NToggle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
label: "Floating Bar"
|
|
||||||
description: "Make the bar float with rounded corners and margins. This will hide screen corners."
|
|
||||||
checked: Settings.data.bar.floating
|
|
||||||
onToggled: checked => Settings.data.bar.floating = checked
|
|
||||||
}
|
|
||||||
|
|
||||||
// Floating bar options - only show when floating is enabled
|
RowLayout {
|
||||||
ColumnLayout {
|
NSlider {
|
||||||
visible: Settings.data.bar.floating
|
Layout.fillWidth: true
|
||||||
spacing: Style.marginS * scaling
|
from: 0
|
||||||
Layout.fillWidth: true
|
to: 1
|
||||||
|
stepSize: 0.01
|
||||||
NLabel {
|
value: Settings.data.bar.marginVertical
|
||||||
label: "Margins"
|
onMoved: Settings.data.bar.marginVertical = value
|
||||||
description: "Adjust the margins around the floating bar."
|
cutoutColor: Color.mSurface
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
spacing: Style.marginL * scaling
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: Style.marginXXS * scaling
|
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: "Vertical"
|
text: Math.round(Settings.data.bar.marginVertical * 100) + "%"
|
||||||
font.pointSize: Style.fontSizeXS * scaling
|
Layout.alignment: Qt.AlignVCenter
|
||||||
color: Color.mOnSurfaceVariant
|
Layout.leftMargin: Style.marginXS * scaling
|
||||||
}
|
Layout.preferredWidth: 50
|
||||||
|
horizontalAlignment: Text.AlignRight
|
||||||
RowLayout {
|
color: Color.mOnSurface
|
||||||
NSlider {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
from: 0
|
|
||||||
to: 1
|
|
||||||
stepSize: 0.01
|
|
||||||
value: Settings.data.bar.marginVertical
|
|
||||||
onMoved: Settings.data.bar.marginVertical = value
|
|
||||||
cutoutColor: Color.mSurface
|
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: Math.round(Settings.data.bar.marginVertical * 100) + "%"
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
Layout.leftMargin: Style.marginXS * scaling
|
|
||||||
Layout.preferredWidth: 50
|
|
||||||
horizontalAlignment: Text.AlignRight
|
|
||||||
color: Color.mOnSurface
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: Style.marginXXS * scaling
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: "Horizontal"
|
text: "Horizontal"
|
||||||
font.pointSize: Style.fontSizeXS * scaling
|
font.pointSize: Style.fontSizeXS * scaling
|
||||||
color: Color.mOnSurfaceVariant
|
color: Color.mOnSurfaceVariant
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
NSlider {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
from: 0
|
||||||
|
to: 1
|
||||||
|
stepSize: 0.01
|
||||||
|
value: Settings.data.bar.marginHorizontal
|
||||||
|
onMoved: Settings.data.bar.marginHorizontal = value
|
||||||
|
cutoutColor: Color.mSurface
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
NText {
|
||||||
NSlider {
|
text: Math.round(Settings.data.bar.marginHorizontal * 100) + "%"
|
||||||
Layout.fillWidth: true
|
Layout.alignment: Qt.AlignVCenter
|
||||||
from: 0
|
Layout.leftMargin: Style.marginXS * scaling
|
||||||
to: 1
|
Layout.preferredWidth: 50
|
||||||
stepSize: 0.01
|
horizontalAlignment: Text.AlignRight
|
||||||
value: Settings.data.bar.marginHorizontal
|
color: Color.mOnSurface
|
||||||
onMoved: Settings.data.bar.marginHorizontal = value
|
|
||||||
cutoutColor: Color.mSurface
|
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: Math.round(Settings.data.bar.marginHorizontal * 100) + "%"
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
Layout.leftMargin: Style.marginXS * scaling
|
|
||||||
Layout.preferredWidth: 50
|
|
||||||
horizontalAlignment: Text.AlignRight
|
|
||||||
color: Color.mOnSurface
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@ ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Cache for scheme JSON (can be flat or {dark, light})
|
// Cache for scheme JSON (can be flat or {dark, light})
|
||||||
property var schemeColorsCache: ({})
|
property var schemeColorsCache: ({})
|
||||||
|
|
||||||
|
|
@ -106,43 +104,41 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Main Toggles - Dark Mode / Matugen
|
// Main Toggles - Dark Mode / Matugen
|
||||||
NHeader {
|
NHeader {
|
||||||
label: "Behavior"
|
label: "Behavior"
|
||||||
description: "Main settings for Noctalia's colors."
|
description: "Main settings for Noctalia's colors."
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dark Mode Toggle (affects both Matugen and predefined schemes that provide variants)
|
// Dark Mode Toggle (affects both Matugen and predefined schemes that provide variants)
|
||||||
NToggle {
|
NToggle {
|
||||||
label: "Dark Mode"
|
label: "Dark Mode"
|
||||||
description: Settings.data.colorSchemes.useWallpaperColors ? "Generate dark theme colors when using Matugen." : "Use a dark variant if available."
|
description: Settings.data.colorSchemes.useWallpaperColors ? "Generate dark theme colors when using Matugen." : "Use a dark variant if available."
|
||||||
checked: Settings.data.colorSchemes.darkMode
|
checked: Settings.data.colorSchemes.darkMode
|
||||||
enabled: true
|
enabled: true
|
||||||
onToggled: checked => Settings.data.colorSchemes.darkMode = checked
|
onToggled: checked => Settings.data.colorSchemes.darkMode = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use Matugen
|
// Use Matugen
|
||||||
NToggle {
|
NToggle {
|
||||||
label: "Enable Matugen"
|
label: "Enable Matugen"
|
||||||
description: "Automatically generate colors based on your active wallpaper."
|
description: "Automatically generate colors based on your active wallpaper."
|
||||||
checked: Settings.data.colorSchemes.useWallpaperColors
|
checked: Settings.data.colorSchemes.useWallpaperColors
|
||||||
onToggled: checked => {
|
onToggled: checked => {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
// Check if matugen is installed
|
// Check if matugen is installed
|
||||||
matugenCheck.running = true
|
matugenCheck.running = true
|
||||||
} else {
|
} else {
|
||||||
Settings.data.colorSchemes.useWallpaperColors = false
|
Settings.data.colorSchemes.useWallpaperColors = false
|
||||||
ToastService.showNotice("Matugen", "Disabled")
|
ToastService.showNotice("Matugen", "Disabled")
|
||||||
|
|
||||||
if (Settings.data.colorSchemes.predefinedScheme) {
|
if (Settings.data.colorSchemes.predefinedScheme) {
|
||||||
|
|
||||||
ColorSchemeService.applyScheme(Settings.data.colorSchemes.predefinedScheme)
|
ColorSchemeService.applyScheme(Settings.data.colorSchemes.predefinedScheme)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@ ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Helper functions to update arrays immutably
|
// Helper functions to update arrays immutably
|
||||||
function addMonitor(list, name) {
|
function addMonitor(list, name) {
|
||||||
const arr = (list || []).slice()
|
const arr = (list || []).slice()
|
||||||
|
|
|
||||||
|
|
@ -14,101 +14,100 @@ ColumnLayout {
|
||||||
description: "Configure the launcher behavior and appearance."
|
description: "Configure the launcher behavior and appearance."
|
||||||
}
|
}
|
||||||
|
|
||||||
NComboBox {
|
NComboBox {
|
||||||
id: launcherPosition
|
id: launcherPosition
|
||||||
label: "Position"
|
label: "Position"
|
||||||
description: "Choose where the Launcher panel appears."
|
description: "Choose where the Launcher panel appears."
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
model: ListModel {
|
model: ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
key: "center"
|
key: "center"
|
||||||
name: "Center (default)"
|
name: "Center (default)"
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
key: "top_left"
|
|
||||||
name: "Top Left"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
key: "top_right"
|
|
||||||
name: "Top Right"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
key: "bottom_left"
|
|
||||||
name: "Bottom Left"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
key: "bottom_right"
|
|
||||||
name: "Bottom Right"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
key: "bottom_center"
|
|
||||||
name: "Bottom Center"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
key: "top_center"
|
|
||||||
name: "Top Center"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
currentKey: Settings.data.appLauncher.position
|
ListElement {
|
||||||
onSelected: function (key) {
|
key: "top_left"
|
||||||
Settings.data.appLauncher.position = key
|
name: "Top Left"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
key: "top_right"
|
||||||
|
name: "Top Right"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
key: "bottom_left"
|
||||||
|
name: "Bottom Left"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
key: "bottom_right"
|
||||||
|
name: "Bottom Right"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
key: "bottom_center"
|
||||||
|
name: "Bottom Center"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
key: "top_center"
|
||||||
|
name: "Top Center"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
currentKey: Settings.data.appLauncher.position
|
||||||
|
onSelected: function (key) {
|
||||||
|
Settings.data.appLauncher.position = key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: Style.marginXXS * scaling
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
NText {
|
||||||
|
text: "Background Opacity"
|
||||||
|
font.pointSize: Style.fontSizeL * scaling
|
||||||
|
font.weight: Style.fontWeightBold
|
||||||
|
color: Color.mOnSurface
|
||||||
|
}
|
||||||
|
|
||||||
|
NText {
|
||||||
|
text: "Adjust the background opacity of the launcher."
|
||||||
|
font.pointSize: Style.fontSizeXS * scaling
|
||||||
|
color: Color.mOnSurfaceVariant
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
NSlider {
|
||||||
|
id: launcherBgOpacity
|
||||||
|
Layout.fillWidth: true
|
||||||
|
from: 0.0
|
||||||
|
to: 1.0
|
||||||
|
stepSize: 0.01
|
||||||
|
value: Settings.data.appLauncher.backgroundOpacity
|
||||||
|
onMoved: Settings.data.appLauncher.backgroundOpacity = value
|
||||||
|
cutoutColor: Color.mSurface
|
||||||
|
}
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: "Background Opacity"
|
text: Math.floor(Settings.data.appLauncher.backgroundOpacity * 100) + "%"
|
||||||
font.pointSize: Style.fontSizeL * scaling
|
Layout.alignment: Qt.AlignVCenter
|
||||||
font.weight: Style.fontWeightBold
|
Layout.leftMargin: Style.marginS * scaling
|
||||||
color: Color.mOnSurface
|
color: Color.mOnSurface
|
||||||
}
|
}
|
||||||
|
|
||||||
NText {
|
|
||||||
text: "Adjust the background opacity of the launcher."
|
|
||||||
font.pointSize: Style.fontSizeXS * scaling
|
|
||||||
color: Color.mOnSurfaceVariant
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
NSlider {
|
|
||||||
id: launcherBgOpacity
|
|
||||||
Layout.fillWidth: true
|
|
||||||
from: 0.0
|
|
||||||
to: 1.0
|
|
||||||
stepSize: 0.01
|
|
||||||
value: Settings.data.appLauncher.backgroundOpacity
|
|
||||||
onMoved: Settings.data.appLauncher.backgroundOpacity = value
|
|
||||||
cutoutColor: Color.mSurface
|
|
||||||
}
|
|
||||||
|
|
||||||
NText {
|
|
||||||
text: Math.floor(Settings.data.appLauncher.backgroundOpacity * 100) + "%"
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
Layout.leftMargin: Style.marginS * scaling
|
|
||||||
color: Color.mOnSurface
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NToggle {
|
NToggle {
|
||||||
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 => Settings.data.appLauncher.enableClipboardHistory = checked
|
onToggled: checked => Settings.data.appLauncher.enableClipboardHistory = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
NToggle {
|
NToggle {
|
||||||
label: "Use App2Unit for Launching"
|
label: "Use App2Unit for Launching"
|
||||||
description: "Use app2unit -- 'desktop-entry' when launching applications for better systemd integration."
|
description: "Use app2unit -- 'desktop-entry' when launching applications for better systemd integration."
|
||||||
checked: Settings.data.appLauncher.useApp2Unit
|
checked: Settings.data.appLauncher.useApp2Unit
|
||||||
onToggled: checked => Settings.data.appLauncher.useApp2Unit = checked
|
onToggled: checked => Settings.data.appLauncher.useApp2Unit = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ ColumnLayout {
|
||||||
visible: Settings.data.wallpaper.enabled
|
visible: Settings.data.wallpaper.enabled
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
NTextInput {
|
NTextInput {
|
||||||
label: "Wallpaper Directory"
|
label: "Wallpaper Directory"
|
||||||
description: "Path to your common wallpaper directory."
|
description: "Path to your common wallpaper directory."
|
||||||
|
|
|
||||||
|
|
@ -110,4 +110,4 @@ Variants {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue