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 {
|
Brightness {
|
||||||
id: widgetsBrightness
|
id: widgetsBrightness
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
Volume {
|
Volume {
|
||||||
id: widgetsVolume
|
id: widgetsVolume
|
||||||
shell: rootScope.shell
|
shell: rootScope.shell
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemTray {
|
SystemTray {
|
||||||
|
|
@ -117,7 +121,10 @@ Scope {
|
||||||
id: externalTrayMenu
|
id: externalTrayMenu
|
||||||
}
|
}
|
||||||
|
|
||||||
ClockWidget {}
|
ClockWidget {
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: 1
|
||||||
|
}
|
||||||
|
|
||||||
PanelPopup {
|
PanelPopup {
|
||||||
id: sidebarPopup
|
id: sidebarPopup
|
||||||
|
|
@ -125,6 +132,8 @@ Scope {
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
barBackground: barBackground
|
barBackground: barBackground
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: 1
|
||||||
screen: modelData
|
screen: modelData
|
||||||
sidebarPopup: sidebarPopup
|
sidebarPopup: sidebarPopup
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ Item {
|
||||||
if (ToplevelManager.activeToplevel?.appId) {
|
if (ToplevelManager.activeToplevel?.appId) {
|
||||||
activeWindowWrapper.shouldShow = true
|
activeWindowWrapper.shouldShow = true
|
||||||
visibilityTimer.restart()
|
visibilityTimer.restart()
|
||||||
|
} else {
|
||||||
|
activeWindowWrapper.shouldShow = false
|
||||||
|
visibilityTimer.stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,10 +89,12 @@ PopupWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
id: bg
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: mouseArea.containsMouse ? Theme.highlight : "transparent"
|
color: mouseArea.containsMouse ? Theme.highlight : "transparent"
|
||||||
radius: 6
|
radius: 6
|
||||||
visible: !(modelData?.isSeparator ?? false)
|
visible: !(modelData?.isSeparator ?? false)
|
||||||
|
property color hoverTextColor: mouseArea.containsMouse ? Theme.onAccent : Theme.textPrimary
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -102,7 +104,7 @@ PopupWindow {
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: (modelData?.enabled ?? true) ? Theme.textPrimary : Theme.textDisabled
|
color: (modelData?.enabled ?? true) ? bg.hoverTextColor : Theme.textDisabled
|
||||||
text: modelData?.text ?? ""
|
text: modelData?.text ?? ""
|
||||||
font.family: Theme.fontFamily
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ Singleton {
|
||||||
property var wallpaperList: []
|
property var wallpaperList: []
|
||||||
property string currentWallpaper: Settings.currentWallpaper
|
property string currentWallpaper: Settings.currentWallpaper
|
||||||
property bool scanning: false
|
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() {
|
function loadWallpapers() {
|
||||||
scanning = true;
|
scanning = true;
|
||||||
|
|
@ -40,6 +42,11 @@ Singleton {
|
||||||
Settings.saveSettings();
|
Settings.saveSettings();
|
||||||
}
|
}
|
||||||
if (Settings.useSWWW) {
|
if (Settings.useSWWW) {
|
||||||
|
if (Settings.transitionType === "random") {
|
||||||
|
transitionType = randomChoices[Math.floor(Math.random() * randomChoices.length)];
|
||||||
|
} else {
|
||||||
|
transitionType = Settings.transitionType;
|
||||||
|
}
|
||||||
changeWallpaperProcess.running = true;
|
changeWallpaperProcess.running = true;
|
||||||
}
|
}
|
||||||
generateTheme();
|
generateTheme();
|
||||||
|
|
@ -106,7 +113,7 @@ Singleton {
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: changeWallpaperProcess
|
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
|
running: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@
|
||||||
"error": "{{ color5 | darken(0.1) }}",
|
"error": "{{ color5 | darken(0.1) }}",
|
||||||
"warning": "{{ color5 | lighten(0.1) }}",
|
"warning": "{{ color5 | lighten(0.1) }}",
|
||||||
|
|
||||||
"highlight": "{{ color6 | lighten(0.2) }}",
|
"highlight": "{{ color4 | lighten(0.4) }}",
|
||||||
"rippleEffect": "{{ color6 | lighten(0.2) }}",
|
"rippleEffect": "{{ color4 | lighten(0.1) }}",
|
||||||
|
|
||||||
"onAccent": "{{ background }}",
|
"onAccent": "{{ background }}",
|
||||||
"outline": "{{ background | lighten(0.3) }}",
|
"outline": "{{ background | lighten(0.3) }}",
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 8
|
anchors.margins: 8
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
Item { width: 2 }
|
||||||
Text {
|
Text {
|
||||||
id: headerText
|
id: headerText
|
||||||
font.family: Theme.fontFamily
|
font.family: Theme.fontFamily
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import QtQuick.Layouts 1.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
import Quickshell.Widgets
|
||||||
import qs.Settings
|
import qs.Settings
|
||||||
import qs.Services
|
import qs.Services
|
||||||
|
|
||||||
|
|
@ -22,7 +23,7 @@ PanelWindow {
|
||||||
Connections {
|
Connections {
|
||||||
target: WallpaperManager
|
target: WallpaperManager
|
||||||
function onWallpaperListChanged() {
|
function onWallpaperListChanged() {
|
||||||
wallpapers = WallpaperManager.wallpaperList
|
wallpapers = WallpaperManager.wallpaperList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -53,7 +54,9 @@ PanelWindow {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: 36; height: 36; radius: 18
|
width: 36
|
||||||
|
height: 36
|
||||||
|
radius: 18
|
||||||
color: closeButtonArea.containsMouse ? Theme.accentPrimary : "transparent"
|
color: closeButtonArea.containsMouse ? Theme.accentPrimary : "transparent"
|
||||||
border.color: Theme.accentPrimary
|
border.color: Theme.accentPrimary
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
|
@ -109,7 +112,14 @@ PanelWindow {
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width: wallpaperGrid.cellWidth - 8
|
width: wallpaperGrid.cellWidth - 8
|
||||||
height: wallpaperGrid.cellHeight - 8
|
height: wallpaperGrid.cellHeight - 8
|
||||||
Rectangle {
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: {
|
||||||
|
WallpaperManager.changeWallpaper(modelData);
|
||||||
|
}
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
id: wallpaperItem
|
id: wallpaperItem
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 4
|
anchors.margins: 4
|
||||||
|
|
@ -120,7 +130,6 @@ PanelWindow {
|
||||||
Image {
|
Image {
|
||||||
id: wallpaperImage
|
id: wallpaperImage
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 4
|
|
||||||
source: modelData
|
source: modelData
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
@ -128,12 +137,6 @@ PanelWindow {
|
||||||
sourceSize.width: Math.min(width, 150)
|
sourceSize.width: Math.min(width, 150)
|
||||||
sourceSize.height: Math.min(height, 90)
|
sourceSize.height: Math.min(height, 90)
|
||||||
}
|
}
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked: {
|
|
||||||
WallpaperManager.changeWallpaper(modelData);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue