fix: fix weirdness

This commit is contained in:
ferreo 2025-07-18 16:57:11 +01:00
parent a498671ef1
commit d40709952b
7 changed files with 318 additions and 246 deletions

View file

@ -22,7 +22,7 @@ PanelWindow {
color: visible ? overlayColor : "transparent" color: visible ? overlayColor : "transparent"
visible: false visible: false
WlrLayershell.exclusionMode: ExclusionMode.Ignore WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
screen: (typeof modelData !== 'undefined' ? modelData : null) screen: (typeof modelData !== 'undefined' ? modelData : null)
anchors.top: true anchors.top: true
anchors.left: true anchors.left: true

View file

@ -71,7 +71,6 @@ Singleton {
if (Settings.settings.randomWallpaper) { if (Settings.settings.randomWallpaper) {
randomWallpaperTimer.stop(); randomWallpaperTimer.stop();
randomWallpaperTimer.start(); randomWallpaperTimer.start();
setRandomWallpaper();
} }
} }

View file

@ -7,7 +7,7 @@ import qs.Settings
Rectangle { Rectangle {
id: profileSettingsCard id: profileSettingsCard
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 340 Layout.preferredHeight: 500
color: Theme.surface color: Theme.surface
radius: 18 radius: 18
border.color: "transparent" border.color: "transparent"
@ -19,20 +19,20 @@ Rectangle {
anchors.margins: 18 anchors.margins: 18
spacing: 12 spacing: 12
// Profile Image Header
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: 12 spacing: 12
Text { Text {
text: "person" text: "settings"
font.family: "Material Symbols Outlined" font.family: "Material Symbols Outlined"
font.pixelSize: 20 font.pixelSize: 20
color: Theme.accentPrimary color: Theme.accentPrimary
} }
Text { Text {
text: "Profile Image" text: "System Settings"
font.family: Theme.fontFamily
font.pixelSize: 16 font.pixelSize: 16
font.bold: true font.bold: true
color: Theme.textPrimary color: Theme.textPrimary
@ -40,15 +40,27 @@ Rectangle {
} }
} }
// Profile Image Input Row // Profile Image Input Section
ColumnLayout {
spacing: 8
Layout.fillWidth: true
Text {
text: "Profile Image"
font.family: Theme.fontFamily
font.pixelSize: 13
font.bold: true
color: Theme.textPrimary
}
RowLayout { RowLayout {
spacing: 8 spacing: 8
Layout.fillWidth: true Layout.fillWidth: true
Rectangle { Rectangle {
width: 36 width: 40
height: 36 height: 40
radius: 18 radius: 20
color: Theme.surfaceVariant color: Theme.surfaceVariant
border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline
border.width: 1 border.width: 1
@ -82,16 +94,15 @@ Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
text: "person" text: "person"
font.family: "Material Symbols Outlined" font.family: "Material Symbols Outlined"
font.pixelSize: 18 font.pixelSize: 20
color: Theme.accentPrimary color: Theme.accentPrimary
visible: Settings.settings.profileImage === "" visible: Settings.settings.profileImage === ""
} }
} }
// Text input styled exactly like weather city
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 36 Layout.preferredHeight: 40
radius: 8 radius: 8
color: Theme.surfaceVariant color: Theme.surfaceVariant
border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline
@ -99,9 +110,16 @@ Rectangle {
TextInput { TextInput {
id: profileImageInput id: profileImageInput
anchors.fill: parent anchors.left: parent.left
anchors.margins: 12 anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.leftMargin: 12
anchors.rightMargin: 12
anchors.topMargin: 6
anchors.bottomMargin: 6
text: Settings.settings.profileImage text: Settings.settings.profileImage
font.family: Theme.fontFamily
font.pixelSize: 13 font.pixelSize: 13
color: Theme.textPrimary color: Theme.textPrimary
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
@ -122,14 +140,17 @@ Rectangle {
} }
} }
} }
}
// Show Active Window Icon Setting // Show Active Window Icon Setting
RowLayout { RowLayout {
spacing: 8 spacing: 8
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 8
Text { Text {
text: "Show Active Window Icon" text: "Show Active Window Icon"
font.family: Theme.fontFamily
font.pixelSize: 13 font.pixelSize: 13
font.bold: true font.bold: true
color: Theme.textPrimary color: Theme.textPrimary
@ -178,9 +199,11 @@ Rectangle {
RowLayout { RowLayout {
spacing: 8 spacing: 8
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 8
Text { Text {
text: "Show System Info In Bar" text: "Show System Info In Bar"
font.family: Theme.fontFamily
font.pixelSize: 13 font.pixelSize: 13
font.bold: true font.bold: true
color: Theme.textPrimary color: Theme.textPrimary
@ -230,9 +253,11 @@ Rectangle {
RowLayout { RowLayout {
spacing: 8 spacing: 8
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 8
Text { Text {
text: "Show Media In Bar" text: "Show Media In Bar"
font.family: Theme.fontFamily
font.pixelSize: 13 font.pixelSize: 13
font.bold: true font.bold: true
color: Theme.textPrimary color: Theme.textPrimary
@ -279,103 +304,118 @@ Rectangle {
} }
// Visualizer Type Selection // Visualizer Type Selection
RowLayout { ColumnLayout {
spacing: 8 spacing: 8
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 16
Text { Text {
text: "Visualizer Type" text: "Visualizer Type"
font.family: Theme.fontFamily
font.pixelSize: 13 font.pixelSize: 13
font.bold: true font.bold: true
color: Theme.textPrimary color: Theme.textPrimary
Layout.alignment: Qt.AlignVCenter
} }
Item { ComboBox {
id: visualizerTypeComboBox
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 40
model: ["radial", "fire", "diamond"]
currentIndex: model.indexOf(Settings.settings.visualizerType)
background: Rectangle {
implicitWidth: 120
implicitHeight: 40
color: Theme.surfaceVariant
border.color: visualizerTypeComboBox.activeFocus ? Theme.accentPrimary : Theme.outline
border.width: 1
radius: 8
} }
// Dropdown for visualizer type contentItem: Text {
Rectangle { leftPadding: 12
width: 120 rightPadding: visualizerTypeComboBox.indicator.width + visualizerTypeComboBox.spacing
height: 36 text: visualizerTypeComboBox.displayText.charAt(0).toUpperCase() + visualizerTypeComboBox.displayText.slice(1)
radius: 8 font.family: Theme.fontFamily
font.pixelSize: 13
color: Theme.textPrimary
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
indicator: Text {
x: visualizerTypeComboBox.width - width - 12
y: visualizerTypeComboBox.topPadding + (visualizerTypeComboBox.availableHeight - height) / 2
text: "arrow_drop_down"
font.family: "Material Symbols Outlined"
font.pixelSize: 24
color: Theme.textPrimary
}
popup: Popup {
y: visualizerTypeComboBox.height
width: visualizerTypeComboBox.width
implicitHeight: contentItem.implicitHeight
padding: 1
contentItem: ListView {
clip: true
implicitHeight: contentHeight
model: visualizerTypeComboBox.popup.visible ? visualizerTypeComboBox.delegateModel : null
currentIndex: visualizerTypeComboBox.highlightedIndex
ScrollIndicator.vertical: ScrollIndicator {}
}
background: Rectangle {
color: Theme.surfaceVariant color: Theme.surfaceVariant
border.color: Theme.outline border.color: Theme.outline
border.width: 1 border.width: 1
radius: 8
}
}
Text { delegate: ItemDelegate {
id: visualizerTypeText width: visualizerTypeComboBox.width
anchors.left: parent.left contentItem: Text {
anchors.leftMargin: 12 text: modelData.charAt(0).toUpperCase() + modelData.slice(1)
anchors.verticalCenter: parent.verticalCenter font.family: Theme.fontFamily
text: Settings.settings.visualizerType === "fire" ? "Fire" :
Settings.settings.visualizerType === "diamond" ? "Diamond" :
Settings.settings.visualizerType === "radial" ? "Radial" : "Radial"
font.pixelSize: 13 font.pixelSize: 13
color: Theme.textPrimary color: Theme.textPrimary
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
} }
highlighted: visualizerTypeComboBox.highlightedIndex === index
Text { background: Rectangle {
text: "arrow_drop_down" color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent"
font.family: "Material Symbols Outlined"
font.pixelSize: 20
color: Theme.textPrimary
anchors.right: parent.right
anchors.rightMargin: 8
anchors.verticalCenter: parent.verticalCenter
}
MouseArea {
anchors.fill: parent
onClicked: {
visualizerTypeMenu.open()
} }
} }
Menu { onActivated: {
id: visualizerTypeMenu Settings.settings.visualizerType = model[index];
width: 120
y: parent.height
MenuItem {
text: "Fire"
onTriggered: {
Settings.settings.visualizerType = "fire"
}
}
MenuItem {
text: "Diamond"
onTriggered: {
Settings.settings.visualizerType = "diamond"
}
}
MenuItem {
text: "Radial"
onTriggered: {
Settings.settings.visualizerType = "radial"
}
}
} }
} }
} }
// Video Path Input Row // Video Path Input Section
RowLayout { ColumnLayout {
spacing: 8 spacing: 8
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 8
Text { Text {
text: "Video Path" text: "Video Path"
font.family: Theme.fontFamily
font.pixelSize: 13 font.pixelSize: 13
font.bold: true font.bold: true
color: Theme.textPrimary color: Theme.textPrimary
Layout.alignment: Qt.AlignVCenter
} }
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 36 Layout.preferredHeight: 40
radius: 8 radius: 8
color: Theme.surfaceVariant color: Theme.surfaceVariant
border.color: videoPathInput.activeFocus ? Theme.accentPrimary : Theme.outline border.color: videoPathInput.activeFocus ? Theme.accentPrimary : Theme.outline
@ -383,9 +423,16 @@ Rectangle {
TextInput { TextInput {
id: videoPathInput id: videoPathInput
anchors.fill: parent anchors.left: parent.left
anchors.margins: 12 anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.leftMargin: 12
anchors.rightMargin: 12
anchors.topMargin: 6
anchors.bottomMargin: 6
text: Settings.settings.videoPath !== undefined ? Settings.settings.videoPath : "" text: Settings.settings.videoPath !== undefined ? Settings.settings.videoPath : ""
font.family: Theme.fontFamily
font.pixelSize: 13 font.pixelSize: 13
color: Theme.textPrimary color: Theme.textPrimary
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter

View file

@ -20,7 +20,7 @@ PanelWindow {
//z: 100 //z: 100
//border.color: Theme.outline //border.color: Theme.outline
//border.width: 1 //border.width: 1
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
@ -31,12 +31,17 @@ PanelWindow {
z: 0 z: 0
ColumnLayout { ColumnLayout {
id: content
anchors.fill: parent anchors.fill: parent
anchors.margins: 32 anchors.leftMargin: 32
anchors.rightMargin: 32
anchors.topMargin: 32
spacing: 24 spacing: 24
// Header // Header
ColumnLayout { ColumnLayout {
id: header
Layout.fillWidth: true Layout.fillWidth: true
spacing: 4 spacing: 4
RowLayout { RowLayout {
@ -99,7 +104,7 @@ PanelWindow {
// Scrollable settings area // Scrollable settings area
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 520 Layout.preferredHeight: content.height - settingsTabs.height - header.height - 128
color: "transparent" color: "transparent"
border.width: 0 border.width: 0
radius: 20 radius: 20

View file

@ -6,11 +6,10 @@ import qs.Settings
Rectangle { Rectangle {
id: wallpaperSettingsCard id: wallpaperSettingsCard
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 680 Layout.preferredHeight: 720
color: Theme.surface color: Theme.surface
radius: 18 radius: 18
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
anchors.margins: 18 anchors.margins: 18
@ -27,7 +26,7 @@ Rectangle {
color: Theme.accentPrimary color: Theme.accentPrimary
} }
Text { Text {
text: "Wallpaper Folder" text: "Wallpaper Settings"
font.family: Theme.fontFamily font.family: Theme.fontFamily
font.pixelSize: 16 font.pixelSize: 16
font.bold: true font.bold: true
@ -36,6 +35,18 @@ Rectangle {
} }
} }
ColumnLayout {
spacing: 8
Layout.fillWidth: true
Text {
text: "Wallpaper Path"
font.family: Theme.fontFamily
font.pixelSize: 13
font.bold: true
color: Theme.textPrimary
}
// Folder Path Input // Folder Path Input
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
@ -64,7 +75,7 @@ Rectangle {
activeFocusOnTab: true activeFocusOnTab: true
inputMethodHints: Qt.ImhUrlCharactersOnly inputMethodHints: Qt.ImhUrlCharactersOnly
onTextChanged: { onTextChanged: {
Settings.settings.wallpaperFolder = text Settings.settings.wallpaperFolder = text;
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -72,6 +83,7 @@ Rectangle {
} }
} }
} }
}
// Use SWWW Setting // Use SWWW Setting
RowLayout { RowLayout {
@ -112,14 +124,17 @@ Rectangle {
x: Settings.settings.useSWWW ? swwwSwitch.width - width - 2 : 2 x: Settings.settings.useSWWW ? swwwSwitch.width - width - 2 : 2
Behavior on x { Behavior on x {
NumberAnimation { duration: 200; easing.type: Easing.OutCubic } NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
} }
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
Settings.settings.useSWWW = !Settings.settings.useSWWW Settings.settings.useSWWW = !Settings.settings.useSWWW;
} }
} }
} }
@ -164,14 +179,17 @@ Rectangle {
x: Settings.settings.randomWallpaper ? randomWallpaperSwitch.width - width - 2 : 2 x: Settings.settings.randomWallpaper ? randomWallpaperSwitch.width - width - 2 : 2
Behavior on x { Behavior on x {
NumberAnimation { duration: 200; easing.type: Easing.OutCubic } NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
} }
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
Settings.settings.randomWallpaper = !Settings.settings.randomWallpaper Settings.settings.randomWallpaper = !Settings.settings.randomWallpaper;
} }
} }
} }
@ -216,14 +234,17 @@ Rectangle {
x: Settings.settings.useWallpaperTheme ? wallpaperThemeSwitch.width - width - 2 : 2 x: Settings.settings.useWallpaperTheme ? wallpaperThemeSwitch.width - width - 2 : 2
Behavior on x { Behavior on x {
NumberAnimation { duration: 200; easing.type: Easing.OutCubic } NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
} }
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
Settings.settings.useWallpaperTheme = !Settings.settings.useWallpaperTheme Settings.settings.useWallpaperTheme = !Settings.settings.useWallpaperTheme;
} }
} }
} }
@ -294,7 +315,7 @@ Rectangle {
} }
onMoved: { onMoved: {
Settings.settings.wallpaperInterval = Math.round(value) Settings.settings.wallpaperInterval = Math.round(value);
} }
} }
} }
@ -389,7 +410,7 @@ Rectangle {
} }
onActivated: { onActivated: {
Settings.settings.wallpaperResize = model[index] Settings.settings.wallpaperResize = model[index];
} }
} }
} }
@ -484,7 +505,7 @@ Rectangle {
} }
onActivated: { onActivated: {
Settings.settings.transitionType = model[index] Settings.settings.transitionType = model[index];
} }
} }
} }
@ -554,7 +575,7 @@ Rectangle {
} }
onMoved: { onMoved: {
Settings.settings.transitionFps = Math.round(value) Settings.settings.transitionFps = Math.round(value);
} }
} }
} }
@ -624,7 +645,7 @@ Rectangle {
} }
onMoved: { onMoved: {
Settings.settings.transitionDuration = value Settings.settings.transitionDuration = value;
} }
} }
} }

View file

@ -80,7 +80,7 @@ Item {
anchors.right: true anchors.right: true
margins.right: 0 margins.right: 0
margins.top: 0 margins.top: 0
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
onVisibleChanged: { onVisibleChanged: {
if (!visible && Bluetooth.defaultAdapter && Bluetooth.defaultAdapter.discovering) if (!visible && Bluetooth.defaultAdapter && Bluetooth.defaultAdapter.discovering)

View file

@ -342,7 +342,7 @@ Item {
anchors.right: true anchors.right: true
margins.right: 0 margins.right: 0
margins.top: 0 margins.top: 0
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
Component.onCompleted: { Component.onCompleted: {
wifiLogic.refreshNetworks() wifiLogic.refreshNetworks()
} }