quickshell: progress dump
This commit is contained in:
parent
b9e02538aa
commit
1eaf307047
5 changed files with 124 additions and 36 deletions
|
@ -43,4 +43,8 @@ Singleton {
|
||||||
readonly property color mauve: "#cba6f7"
|
readonly property color mauve: "#cba6f7"
|
||||||
readonly property color flamingo: "#f2cdcd"
|
readonly property color flamingo: "#f2cdcd"
|
||||||
}
|
}
|
||||||
|
readonly property QtObject volumeslider: QtObject {
|
||||||
|
readonly property int width: 50
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rect
|
id: rect
|
||||||
|
|
||||||
|
// Parent has a mask applied that cuts out all except the border and the bar.
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: Config.border.color
|
color: Config.border.color
|
||||||
visible: false
|
visible: false
|
||||||
|
|
|
@ -89,17 +89,16 @@ Variants {
|
||||||
screen: scope.modelData
|
screen: scope.modelData
|
||||||
}
|
}
|
||||||
|
|
||||||
VolumeSlider {
|
// VolumeSlider {
|
||||||
id: volume
|
// id: volume
|
||||||
isInRightPanel: hover.isInRightPanel
|
// screen: scope.modelData
|
||||||
screen: scope.modelData
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
Hover {
|
// Hover {
|
||||||
id: hover
|
// id: hover
|
||||||
screen: scope.modelData
|
// screen: scope.modelData
|
||||||
bar: bar
|
// bar: bar
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,61 @@
|
||||||
import Quickshell
|
|
||||||
import Quickshell.Widgets
|
|
||||||
import Quickshell.Services.Notifications
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Shapes
|
||||||
|
|
||||||
import "../../config"
|
import "../../config"
|
||||||
import "../../services"
|
import "../../services"
|
||||||
|
|
||||||
Rectangle {
|
Shape {
|
||||||
id: root
|
id: root
|
||||||
color: "transparent"
|
anchors.top: parent.top
|
||||||
required property Notification.Notif modelData
|
// anchors.right: parent.right
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
|
readonly property real rounding: Config.border.rounding
|
||||||
|
|
||||||
|
implicitWidth: 1000
|
||||||
|
implicitHeight: 300
|
||||||
|
ShapePath {
|
||||||
|
fillColor: Config.catppuccin.base
|
||||||
|
strokeWidth: -1
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
relativeX: root.rounding
|
||||||
|
relativeY: root.rounding
|
||||||
|
radiusX: root.rounding
|
||||||
|
radiusY: root.rounding
|
||||||
|
}
|
||||||
|
PathLine {
|
||||||
|
relativeX: 0
|
||||||
|
relativeY: 100
|
||||||
|
}
|
||||||
|
PathLine {
|
||||||
|
relativeX: 300
|
||||||
|
relativeY: 0
|
||||||
|
}
|
||||||
|
PathLine {
|
||||||
|
relativeX: 0
|
||||||
|
relativeY: -100
|
||||||
|
}
|
||||||
|
PathArc {
|
||||||
|
relativeX: root.rounding
|
||||||
|
relativeY: -root.rounding
|
||||||
|
radiusX: root.rounding
|
||||||
|
radiusY: root.rounding
|
||||||
|
}
|
||||||
|
|
||||||
|
Behavior on fillColor {
|
||||||
|
ColorAnimation {
|
||||||
|
duration: 500
|
||||||
|
easing.type: Easing.BezierSpline
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: root.modelData.summary
|
anchors.centerIn: parent
|
||||||
|
text: "This is a test"
|
||||||
|
color: "white"
|
||||||
|
font.pointSize: 15
|
||||||
|
font.bold: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,41 +1,82 @@
|
||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Wayland
|
|
||||||
import Quickshell.Services.Notifications
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Effects
|
import QtQuick.Shapes
|
||||||
|
import "../../config"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
required property bool isInRightPanel
|
|
||||||
required property ShellScreen screen
|
required property ShellScreen screen
|
||||||
property bool isVisible
|
readonly property real rounding: Config.border.rounding
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
property bool _: log()
|
|
||||||
function log() {
|
|
||||||
console.log(hover.hovered);
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
implicitWidth: 60
|
implicitWidth: Config.volumeslider.width
|
||||||
implicitHeight: screen.height / 3
|
implicitHeight: screen.height / 3
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.right: parent.right
|
||||||
|
color: "green"
|
||||||
|
implicitWidth: hover.hovered ? Config.volumeslider.width : Config.border.thickness
|
||||||
|
|
||||||
|
implicitHeight: root.screen.height / 3
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
id: hover
|
id: hover
|
||||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Behavior on implicitWidth {
|
||||||
anchors.right: parent.right
|
NumberAnimation {
|
||||||
color: "green"
|
duration: 400
|
||||||
implicitWidth: hover.hovered | root.isInRightPanel ? 60 : 10
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Shape {
|
||||||
|
implicitWidth: hover.hovered ? Config.volumeslider.width : Config.border.thickness
|
||||||
implicitHeight: root.screen.height / 3
|
implicitHeight: root.screen.height / 3
|
||||||
|
ShapePath {
|
||||||
|
fillColor: Config.catppuccin.base
|
||||||
|
strokeWidth: -1
|
||||||
|
PathArc {
|
||||||
|
relativeX: -root.rounding
|
||||||
|
relativeY: root.rounding
|
||||||
|
radiusX: root.rounding
|
||||||
|
radiusY: root.rounding
|
||||||
|
direction: PathArc.Counterclockwise
|
||||||
|
}
|
||||||
|
PathLine {
|
||||||
|
relativeY: root.screen.height / 3
|
||||||
|
relativeX: 0
|
||||||
|
}
|
||||||
|
PathArc {
|
||||||
|
relativeX: root.rounding
|
||||||
|
// relativeX: 50
|
||||||
|
relativeY: -root.rounding
|
||||||
|
radiusX: root.rounding
|
||||||
|
radiusY: root.rounding
|
||||||
|
// direction: PathArc.Counterclockwise
|
||||||
|
// useLargeArc: true
|
||||||
|
}
|
||||||
|
PathLine {
|
||||||
|
relativeX: 50
|
||||||
|
relativeY: 0
|
||||||
|
}
|
||||||
|
PathLine {
|
||||||
|
relativeY: -root.screen.height / 3
|
||||||
|
relativeX: 0
|
||||||
|
}
|
||||||
|
PathLine {
|
||||||
|
relativeX: -50
|
||||||
|
relativeY: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue