make wallswitcher window now fugly
This commit is contained in:
parent
3525dcd2f1
commit
e18463c2ad
@ -1,6 +1,5 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import Quickshell
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import qs
|
import qs
|
||||||
import qs.settings
|
import qs.settings
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import qs.settings
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import qs
|
import qs
|
||||||
import qs.modules.bar
|
import qs.modules.bar
|
||||||
@ -59,6 +60,7 @@ Rectangle {
|
|||||||
|
|
||||||
CustomText {
|
CustomText {
|
||||||
text: notifyItem.modelData.body
|
text: notifyItem.modelData.body
|
||||||
|
font.pixelSize: Settings.config.fontSize - 2
|
||||||
maximumLineCount: 2
|
maximumLineCount: 2
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import qs.settings
|
import qs.settings
|
||||||
import QtQuick
|
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
import QtQuick
|
||||||
import qs.reusables
|
import qs.reusables
|
||||||
import Qt.labs.folderlistmodel 2.10
|
import Qt.labs.folderlistmodel 2.10
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
@ -16,13 +16,13 @@ FloatingWindow {
|
|||||||
implicitWidth: 900
|
implicitWidth: 900
|
||||||
title: "qs-wallswitcher"
|
title: "qs-wallswitcher"
|
||||||
visible: Settings.config.wallSwitcherShown
|
visible: Settings.config.wallSwitcherShown
|
||||||
color: Colors.background
|
color: Colors.surface
|
||||||
onClosed: {
|
onClosed: {
|
||||||
Settings.config.wallSwitcherShown = false;
|
Settings.config.wallSwitcherShown = false;
|
||||||
}
|
}
|
||||||
Process {
|
Process {
|
||||||
id: wallustRunner
|
id: wallustRunner
|
||||||
property string cmd: "matugen image " + Settings.config.currentWall
|
property string cmd: "matugen image " + Settings.config.currentWall + " -t scheme-neutral"
|
||||||
command: ["sh", "-c", cmd]
|
command: ["sh", "-c", cmd]
|
||||||
}
|
}
|
||||||
GlobalShortcut {
|
GlobalShortcut {
|
||||||
@ -45,7 +45,7 @@ FloatingWindow {
|
|||||||
Layout.bottomMargin: 0
|
Layout.bottomMargin: 0
|
||||||
radius: 14
|
radius: 14
|
||||||
implicitHeight: 30
|
implicitHeight: 30
|
||||||
color: Colors.color6
|
color: Colors.onPrimaryColor
|
||||||
CustomText {
|
CustomText {
|
||||||
id: titleText
|
id: titleText
|
||||||
anchors.centerIn: textWrapper
|
anchors.centerIn: textWrapper
|
||||||
@ -60,7 +60,7 @@ FloatingWindow {
|
|||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.margins: 10
|
Layout.margins: 10
|
||||||
radius: 14
|
radius: 14
|
||||||
color: Colors.color8
|
color: Colors.surfaceContainerLow
|
||||||
GridView {
|
GridView {
|
||||||
id: gridRoot
|
id: gridRoot
|
||||||
property var columns: Math.floor(gridRoot.width / cellWidth)
|
property var columns: Math.floor(gridRoot.width / cellWidth)
|
||||||
@ -72,13 +72,12 @@ FloatingWindow {
|
|||||||
clip: true
|
clip: true
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
snapMode: GridView.SnapToRow
|
snapMode: GridView.SnapToRow
|
||||||
cellWidth: 140
|
cellWidth: 130
|
||||||
cellHeight: 100
|
cellHeight: 90
|
||||||
anchors.fill: innerWindow
|
anchors.fill: innerWindow
|
||||||
anchors.centerIn: innerWindow
|
anchors.centerIn: innerWindow
|
||||||
leftMargin: emptySpace / 2
|
leftMargin: emptySpace / 2
|
||||||
rightMargin: emptySpace / 2
|
topMargin: 20
|
||||||
anchors.margins: 20
|
|
||||||
model: folderModel
|
model: folderModel
|
||||||
delegate: fileDelegate
|
delegate: fileDelegate
|
||||||
FolderListModel {
|
FolderListModel {
|
||||||
@ -89,24 +88,28 @@ FloatingWindow {
|
|||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: fileDelegate
|
id: fileDelegate
|
||||||
Image {
|
ClippingWrapperRectangle {
|
||||||
asynchronous: true
|
id: imageRounder
|
||||||
cache: true
|
implicitHeight: 80
|
||||||
|
implicitWidth: 120
|
||||||
required property string filePath
|
required property string filePath
|
||||||
source: filePath
|
radius: 12
|
||||||
width: 120
|
child: Image {
|
||||||
height: 80
|
id: wallPreview
|
||||||
sourceSize.width: 120
|
asynchronous: true
|
||||||
sourceSize.height: 80
|
source: imageRounder.filePath
|
||||||
MouseArea {
|
sourceSize.width: 120
|
||||||
id: wallpaperSetter
|
sourceSize.height: 80
|
||||||
acceptedButtons: Qt.LeftButton
|
MouseArea {
|
||||||
anchors.fill: parent
|
id: wallpaperSetter
|
||||||
cursorShape: Qt.PointingHandCursor
|
acceptedButtons: Qt.LeftButton
|
||||||
onClicked: {
|
anchors.fill: parent
|
||||||
Settings.config.currentWall = parent.filePath;
|
cursorShape: Qt.PointingHandCursor
|
||||||
if (Settings.config.generateScheme) {
|
onClicked: {
|
||||||
wallustRunner.startDetached();
|
Settings.config.currentWall = imageRounder.filePath;
|
||||||
|
if (Settings.config.generateScheme) {
|
||||||
|
wallustRunner.startDetached();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,2 +0,0 @@
|
|||||||
import qs
|
|
||||||
import qs.settings
|
|
||||||
Loading…
x
Reference in New Issue
Block a user