Merge pull request #8 from ferrreo/random-fixes
fix: fix various misc minor issues
This commit is contained in:
commit
de0aa60dd3
7 changed files with 55 additions and 30 deletions
11
Bar/Bar.qml
11
Bar/Bar.qml
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ Item {
|
|||
if (ToplevelManager.activeToplevel?.appId) {
|
||||
activeWindowWrapper.shouldShow = true
|
||||
visibilityTimer.restart()
|
||||
} else {
|
||||
activeWindowWrapper.shouldShow = false
|
||||
visibilityTimer.stop()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) }}",
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ ColumnLayout {
|
|||
anchors.fill: parent
|
||||
anchors.margins: 8
|
||||
spacing: 8
|
||||
Item { width: 2 }
|
||||
Text {
|
||||
id: headerText
|
||||
font.family: Theme.fontFamily
|
||||
|
|
|
|||
|
|
@ -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,30 +112,30 @@ PanelWindow {
|
|||
delegate: Item {
|
||||
width: wallpaperGrid.cellWidth - 8
|
||||
height: wallpaperGrid.cellHeight - 8
|
||||
Rectangle {
|
||||
id: wallpaperItem
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
color: Qt.darker(Theme.backgroundPrimary, 1.1)
|
||||
radius: 12
|
||||
border.color: Settings.currentWallpaper === modelData ? Theme.accentPrimary : Theme.outline
|
||||
border.width: Settings.currentWallpaper === modelData ? 3 : 1
|
||||
Image {
|
||||
id: wallpaperImage
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
WallpaperManager.changeWallpaper(modelData);
|
||||
}
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
id: wallpaperItem
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
source: modelData
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
cache: true
|
||||
sourceSize.width: Math.min(width, 150)
|
||||
sourceSize.height: Math.min(height, 90)
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
WallpaperManager.changeWallpaper(modelData);
|
||||
color: Qt.darker(Theme.backgroundPrimary, 1.1)
|
||||
radius: 12
|
||||
border.color: Settings.currentWallpaper === modelData ? Theme.accentPrimary : Theme.outline
|
||||
border.width: Settings.currentWallpaper === modelData ? 3 : 1
|
||||
Image {
|
||||
id: wallpaperImage
|
||||
anchors.fill: parent
|
||||
source: modelData
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
cache: true
|
||||
sourceSize.width: Math.min(width, 150)
|
||||
sourceSize.height: Math.min(height, 90)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue