Settings rework...
This commit is contained in:
parent
74b233798d
commit
fb68300746
63 changed files with 7139 additions and 1026 deletions
|
|
@ -6,7 +6,7 @@ import qs.Components
|
|||
import qs.Settings
|
||||
|
||||
Item {
|
||||
// Test mode
|
||||
|
||||
property bool testMode: false
|
||||
property int testPercent: 49
|
||||
property bool testCharging: true
|
||||
|
|
@ -21,7 +21,7 @@ Item {
|
|||
height: row.height
|
||||
visible: testMode || (isReady && battery.isLaptopBattery)
|
||||
|
||||
// Choose icon based on charge and charging state
|
||||
|
||||
function batteryIcon() {
|
||||
if (!show)
|
||||
return "";
|
||||
|
|
@ -32,7 +32,7 @@ Item {
|
|||
if (percent >= 95)
|
||||
return "battery_android_full";
|
||||
|
||||
// Hardcoded battery symbols
|
||||
|
||||
if (percent >= 85)
|
||||
return "battery_android_6";
|
||||
if (percent >= 70)
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Effects
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Quickshell.Wayland
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Services.Pam
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import qs.Components
|
||||
import qs.Settings
|
||||
import qs.Services
|
||||
|
|
@ -32,7 +32,7 @@ WlSessionLock {
|
|||
Component.onCompleted: {
|
||||
Qt.callLater(function () {
|
||||
fetchWeatherData();
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function fetchWeatherData() {
|
||||
|
|
@ -135,8 +135,8 @@ WlSessionLock {
|
|||
fillMode: Image.PreserveAspectCrop
|
||||
source: WallpaperManager.currentWallpaper !== "" ? WallpaperManager.currentWallpaper : ""
|
||||
cache: true
|
||||
smooth: false
|
||||
visible: true // source for MultiEffect
|
||||
smooth: true
|
||||
mipmap: false
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
|
|
@ -146,6 +146,7 @@ WlSessionLock {
|
|||
blurEnabled: true
|
||||
blur: 0.48 // controls blur strength (0 to 1)
|
||||
blurMax: 128 // max blur radius in pixels
|
||||
// transparentBorder: true
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -160,39 +161,21 @@ WlSessionLock {
|
|||
radius: 40
|
||||
color: Theme.accentPrimary
|
||||
|
||||
Image {
|
||||
id: avatarImage
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
source: Settings.settings.profileImage
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
visible: false
|
||||
asynchronous: true
|
||||
}
|
||||
OpacityMask {
|
||||
anchors.fill: avatarImage
|
||||
source: avatarImage
|
||||
maskSource: Rectangle {
|
||||
width: avatarImage.width
|
||||
height: avatarImage.height
|
||||
radius: avatarImage.width / 2
|
||||
visible: false
|
||||
}
|
||||
visible: Settings.settings.profileImage !== ""
|
||||
}
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "person"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 32
|
||||
color: Theme.onAccent
|
||||
visible: Settings.settings.profileImage === ""
|
||||
color: "transparent"
|
||||
radius: 40
|
||||
border.color: Theme.accentPrimary
|
||||
border.width: 3
|
||||
z: 2
|
||||
}
|
||||
|
||||
Avatar {}
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: Glow {
|
||||
color: Theme.accentPrimary
|
||||
radius: 8
|
||||
samples: 16
|
||||
layer.effect: MultiEffect {
|
||||
shadowEnabled: true
|
||||
shadowColor: Theme.accentPrimary
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -257,7 +240,7 @@ WlSessionLock {
|
|||
width: parent.width * 0.8
|
||||
height: 44
|
||||
color: Theme.overlay
|
||||
radius: 22
|
||||
radius: 20
|
||||
visible: lock.errorMessage !== ""
|
||||
|
||||
Text {
|
||||
|
|
@ -275,7 +258,7 @@ WlSessionLock {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
width: 120
|
||||
height: 44
|
||||
radius: 22
|
||||
radius: 20
|
||||
opacity: unlockButtonArea.containsMouse ? 0.8 : 0.5
|
||||
color: unlockButtonArea.containsMouse ? Theme.accentPrimary : Theme.surface
|
||||
border.color: Theme.accentPrimary
|
||||
|
|
@ -328,7 +311,7 @@ WlSessionLock {
|
|||
position: "bottomright"
|
||||
size: 1.3
|
||||
fillColor: (Theme.backgroundPrimary !== undefined && Theme.backgroundPrimary !== null) ? Theme.backgroundPrimary : "#222"
|
||||
offsetX: - Screen.width / 2 - 38
|
||||
offsetX: -Screen.width / 2 - 38
|
||||
offsetY: 0
|
||||
anchors.top: parent.top
|
||||
visible: Settings.settings.showCorners
|
||||
|
|
@ -336,7 +319,7 @@ WlSessionLock {
|
|||
}
|
||||
|
||||
Rectangle {
|
||||
width: infoColumn.width + 16
|
||||
width: infoColumn.width + 32
|
||||
height: infoColumn.height + 8
|
||||
color: (Theme.backgroundPrimary !== undefined && Theme.backgroundPrimary !== null) ? Theme.backgroundPrimary : "#222"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
|
@ -404,7 +387,6 @@ WlSessionLock {
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -431,13 +413,11 @@ WlSessionLock {
|
|||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: 32
|
||||
spacing: 12
|
||||
spacing: 12
|
||||
|
||||
BatteryCharge {
|
||||
}
|
||||
BatteryCharge {}
|
||||
}
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue