Feat: LLM Chat #155
@@ -5,7 +5,9 @@ import Quickshell
|
|||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import ZShell.Models
|
import ZShell.Models
|
||||||
|
import ZShell.Internal
|
||||||
import ZShell.Config
|
import ZShell.Config
|
||||||
|
import qs.Components
|
||||||
import qs.Services
|
import qs.Services
|
||||||
import qs.Helpers
|
import qs.Helpers
|
||||||
import qs.Paths
|
import qs.Paths
|
||||||
@@ -140,4 +142,40 @@ Searcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WallpaperService {
|
||||||
|
id: wallpaper
|
||||||
|
|
||||||
|
path: root.current
|
||||||
|
}
|
||||||
|
|
||||||
|
Variants {
|
||||||
|
model: Quickshell.screens
|
||||||
|
|
||||||
|
WallpaperObject {
|
||||||
|
readonly property var crops: root.getCrop(modelData.name)
|
||||||
|
required property var modelData
|
||||||
|
|
||||||
|
cropHeight: crops?.height ?? 1.0
|
||||||
|
cropWidth: crops?.width ?? 1.0
|
||||||
|
cropX: crops?.x ?? 0.0
|
||||||
|
cropY: crops?.y ?? 0.0
|
||||||
|
screen: modelData.name
|
||||||
|
service: wallpaper
|
||||||
|
zoom: crops?.zoom ?? 1.0
|
||||||
|
|
||||||
|
Behavior on cropHeight {
|
||||||
|
Anim {}
|
||||||
|
}
|
||||||
|
Behavior on cropWidth {
|
||||||
|
Anim {}
|
||||||
|
}
|
||||||
|
Behavior on cropX {
|
||||||
|
Anim {}
|
||||||
|
}
|
||||||
|
Behavior on cropY {
|
||||||
|
Anim {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import Quickshell
|
import Quickshell
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import qs.Modules.Wallpaper
|
import qs.Helpers
|
||||||
|
|
||||||
Scope {
|
Scope {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Wallpaper;
|
Wallpapers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,11 +141,11 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
bottomLeftRadius: root.last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
bottomLeftRadius: root.last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
||||||
bottomRightRadius: root.last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
bottomRightRadius: root.last ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
||||||
topRightRadius: root.first ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
|
||||||
topLeftRadius: root.first ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
|
||||||
deformScale: 0
|
deformScale: 0
|
||||||
group: blobGroup
|
group: blobGroup
|
||||||
opacity: blobGroup.color.a * (root.enabled ? 1 : 0.5)
|
opacity: blobGroup.color.a * (root.enabled ? 1 : 0.5)
|
||||||
|
topLeftRadius: root.first ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
||||||
|
topRightRadius: root.first ? Tokens.rounding.largeIncreased : Tokens.rounding.extraSmall
|
||||||
}
|
}
|
||||||
|
|
||||||
RowButton {
|
RowButton {
|
||||||
@@ -154,11 +154,11 @@ Item {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
first: root.first
|
||||||
height: Math.min(implicitHeight, parent.height)
|
height: Math.min(implicitHeight, parent.height)
|
||||||
icon: root.icon
|
icon: root.icon
|
||||||
subtext: root.subtext
|
|
||||||
last: root.last
|
last: root.last
|
||||||
first: root.first
|
subtext: root.subtext
|
||||||
text: root.label
|
text: root.label
|
||||||
|
|
||||||
transform: Matrix4x4 {
|
transform: Matrix4x4 {
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
pragma Singleton
|
|
||||||
|
|
||||||
import Quickshell
|
|
||||||
import QtQuick
|
|
||||||
import ZShell.Internal
|
|
||||||
import qs.Components
|
|
||||||
import qs.Helpers
|
|
||||||
|
|
||||||
Singleton {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
WallpaperService {
|
|
||||||
id: wallpaper
|
|
||||||
|
|
||||||
path: Wallpapers.current
|
|
||||||
}
|
|
||||||
|
|
||||||
Variants {
|
|
||||||
model: Quickshell.screens
|
|
||||||
|
|
||||||
WallpaperObject {
|
|
||||||
readonly property var crops: Wallpapers.getCrop(modelData.name)
|
|
||||||
required property var modelData
|
|
||||||
|
|
||||||
cropHeight: crops?.height ?? 1.0
|
|
||||||
cropWidth: crops?.width ?? 1.0
|
|
||||||
cropX: crops?.x ?? 0.0
|
|
||||||
cropY: crops?.y ?? 0.0
|
|
||||||
screen: modelData.name
|
|
||||||
service: wallpaper
|
|
||||||
zoom: crops?.zoom ?? 1.0
|
|
||||||
|
|
||||||
Behavior on cropHeight {
|
|
||||||
Anim {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Behavior on cropWidth {
|
|
||||||
Anim {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Behavior on cropX {
|
|
||||||
Anim {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Behavior on cropY {
|
|
||||||
Anim {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -614,17 +614,11 @@ QRectF WallpaperService::sourceRect(
|
|||||||
const QVariantMap& crops, const QString& screen, const QSize& size) const {
|
const QVariantMap& crops, const QString& screen, const QSize& size) const {
|
||||||
QVariantMap crop = cropFor(crops, screen);
|
QVariantMap crop = cropFor(crops, screen);
|
||||||
|
|
||||||
qreal zoom = crop.value("zoom", 1.0).toDouble();
|
|
||||||
if (zoom <= 0.0)
|
|
||||||
zoom = 1.0;
|
|
||||||
else if (zoom > 5.0)
|
|
||||||
zoom = 5.0;
|
|
||||||
|
|
||||||
QRectF rect(
|
QRectF rect(
|
||||||
crop.value("x", 0.0).toDouble(),
|
crop.value("x", 0.0).toDouble(),
|
||||||
crop.value("y", 0.0).toDouble(),
|
crop.value("y", 0.0).toDouble(),
|
||||||
crop.value("width", 1.0).toDouble() / zoom,
|
crop.value("width", 1.0).toDouble(),
|
||||||
crop.value("height", 1.0).toDouble() / zoom);
|
crop.value("height", 1.0).toDouble());
|
||||||
|
|
||||||
if (size.isEmpty() || rect.isEmpty() || m_image.isNull()) return rect;
|
if (size.isEmpty() || rect.isEmpty() || m_image.isNull()) return rect;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Services.UPower
|
import Quickshell.Services.UPower
|
||||||
import qs.Modules
|
import qs.Modules
|
||||||
import qs.Modules.Wallpaper
|
|
||||||
import qs.Modules.Lock
|
import qs.Modules.Lock
|
||||||
import qs.Drawers
|
import qs.Drawers
|
||||||
import qs.Modules.Polkit
|
import qs.Modules.Polkit
|
||||||
|
|||||||
Reference in New Issue
Block a user