fix: fix various misc minor issues

This commit is contained in:
ferreo 2025-07-13 16:32:28 +01:00
parent 14ecba35ae
commit d507c8f3a9
7 changed files with 55 additions and 30 deletions

View file

@ -99,11 +99,15 @@ Scope {
Brightness {
id: widgetsBrightness
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
}
Volume {
id: widgetsVolume
shell: rootScope.shell
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
}
SystemTray {
@ -117,7 +121,10 @@ Scope {
id: externalTrayMenu
}
ClockWidget {}
ClockWidget {
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
}
PanelPopup {
id: sidebarPopup
@ -125,6 +132,8 @@ Scope {
Button {
barBackground: barBackground
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
screen: modelData
sidebarPopup: sidebarPopup
}

View file

@ -26,6 +26,9 @@ Item {
if (ToplevelManager.activeToplevel?.appId) {
activeWindowWrapper.shouldShow = true
visibilityTimer.restart()
} else {
activeWindowWrapper.shouldShow = false
visibilityTimer.stop()
}
}
}

View file

@ -89,10 +89,12 @@ PopupWindow {
}
Rectangle {
id: bg
anchors.fill: parent
color: mouseArea.containsMouse ? Theme.highlight : "transparent"
radius: 6
visible: !(modelData?.isSeparator ?? false)
property color hoverTextColor: mouseArea.containsMouse ? Theme.onAccent : Theme.textPrimary
RowLayout {
anchors.fill: parent
@ -102,7 +104,7 @@ PopupWindow {
Text {
Layout.fillWidth: true
color: (modelData?.enabled ?? true) ? Theme.textPrimary : Theme.textDisabled
color: (modelData?.enabled ?? true) ? bg.hoverTextColor : Theme.textDisabled
text: modelData?.text ?? ""
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall

View file

@ -19,6 +19,8 @@ Singleton {
property var wallpaperList: []
property string currentWallpaper: Settings.currentWallpaper
property bool scanning: false
property string transitionType: Settings.transitionType
property var randomChoices: ["fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer"]
function loadWallpapers() {
scanning = true;
@ -40,6 +42,11 @@ Singleton {
Settings.saveSettings();
}
if (Settings.useSWWW) {
if (Settings.transitionType === "random") {
transitionType = randomChoices[Math.floor(Math.random() * randomChoices.length)];
} else {
transitionType = Settings.transitionType;
}
changeWallpaperProcess.running = true;
}
generateTheme();
@ -106,7 +113,7 @@ Singleton {
Process {
id: changeWallpaperProcess
command: ["swww", "img", "--resize", Settings.wallpaperResize, "--transition-fps", Settings.transitionFps.toString(), "--transition-type", Settings.transitionType, "--transition-duration", Settings.transitionDuration.toString(), currentWallpaper]
command: ["swww", "img", "--resize", Settings.wallpaperResize, "--transition-fps", Settings.transitionFps.toString(), "--transition-type", transitionType, "--transition-duration", Settings.transitionDuration.toString(), currentWallpaper]
running: false
}

View file

@ -17,8 +17,8 @@
"error": "{{ color5 | darken(0.1) }}",
"warning": "{{ color5 | lighten(0.1) }}",
"highlight": "{{ color6 | lighten(0.2) }}",
"rippleEffect": "{{ color6 | lighten(0.2) }}",
"highlight": "{{ color4 | lighten(0.4) }}",
"rippleEffect": "{{ color4 | lighten(0.1) }}",
"onAccent": "{{ background }}",
"outline": "{{ background | lighten(0.3) }}",

View file

@ -19,6 +19,7 @@ ColumnLayout {
anchors.fill: parent
anchors.margins: 8
spacing: 8
Item { width: 2 }
Text {
id: headerText
font.family: Theme.fontFamily

View file

@ -3,6 +3,7 @@ import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import Quickshell
import Quickshell.Io
import Quickshell.Widgets
import qs.Settings
import qs.Services
@ -22,7 +23,7 @@ PanelWindow {
Connections {
target: WallpaperManager
function onWallpaperListChanged() {
wallpapers = WallpaperManager.wallpaperList
wallpapers = WallpaperManager.wallpaperList;
}
}
@ -53,7 +54,9 @@ PanelWindow {
Layout.fillWidth: true
}
Rectangle {
width: 36; height: 36; radius: 18
width: 36
height: 36
radius: 18
color: closeButtonArea.containsMouse ? Theme.accentPrimary : "transparent"
border.color: Theme.accentPrimary
border.width: 1
@ -109,7 +112,14 @@ PanelWindow {
delegate: Item {
width: wallpaperGrid.cellWidth - 8
height: wallpaperGrid.cellHeight - 8
Rectangle {
MouseArea {
anchors.fill: parent
hoverEnabled: true
onClicked: {
WallpaperManager.changeWallpaper(modelData);
}
ClippingWrapperRectangle {
id: wallpaperItem
anchors.fill: parent
anchors.margins: 4
@ -120,7 +130,6 @@ PanelWindow {
Image {
id: wallpaperImage
anchors.fill: parent
anchors.margins: 4
source: modelData
fillMode: Image.PreserveAspectCrop
asynchronous: true
@ -128,12 +137,6 @@ PanelWindow {
sourceSize.width: Math.min(width, 150)
sourceSize.height: Math.min(height, 90)
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onClicked: {
WallpaperManager.changeWallpaper(modelData);
}
}
}
}