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 flamingo: "#f2cdcd"
|
||||
}
|
||||
readonly property QtObject volumeslider: QtObject {
|
||||
readonly property int width: 50
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ Item {
|
|||
Rectangle {
|
||||
id: rect
|
||||
|
||||
// Parent has a mask applied that cuts out all except the border and the bar.
|
||||
anchors.fill: parent
|
||||
color: Config.border.color
|
||||
visible: false
|
||||
|
|
|
@ -89,17 +89,16 @@ Variants {
|
|||
screen: scope.modelData
|
||||
}
|
||||
|
||||
VolumeSlider {
|
||||
id: volume
|
||||
isInRightPanel: hover.isInRightPanel
|
||||
screen: scope.modelData
|
||||
}
|
||||
// VolumeSlider {
|
||||
// id: volume
|
||||
// screen: scope.modelData
|
||||
// }
|
||||
|
||||
Hover {
|
||||
id: hover
|
||||
screen: scope.modelData
|
||||
bar: bar
|
||||
}
|
||||
// Hover {
|
||||
// id: hover
|
||||
// screen: scope.modelData
|
||||
// bar: bar
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,61 @@
|
|||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Services.Notifications
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Shapes
|
||||
|
||||
import "../../config"
|
||||
import "../../services"
|
||||
|
||||
Rectangle {
|
||||
Shape {
|
||||
id: root
|
||||
color: "transparent"
|
||||
required property Notification.Notif modelData
|
||||
anchors.top: parent.top
|
||||
// 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: 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
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Services.Notifications
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Shapes
|
||||
import "../../config"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
required property bool isInRightPanel
|
||||
required property ShellScreen screen
|
||||
property bool isVisible
|
||||
readonly property real rounding: Config.border.rounding
|
||||
color: "transparent"
|
||||
|
||||
property bool _: log()
|
||||
function log() {
|
||||
console.log(hover.hovered);
|
||||
return true
|
||||
}
|
||||
|
||||
anchors {
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
implicitWidth: 60
|
||||
implicitWidth: Config.volumeslider.width
|
||||
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 {
|
||||
id: hover
|
||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
color: "green"
|
||||
implicitWidth: hover.hovered | root.isInRightPanel ? 60 : 10
|
||||
Behavior on implicitWidth {
|
||||
NumberAnimation {
|
||||
duration: 400
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Shape {
|
||||
implicitWidth: hover.hovered ? Config.volumeslider.width : Config.border.thickness
|
||||
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