Huge quickshell progress dump

Was requested
This commit is contained in:
outfoxxed 2024-06-17 00:49:34 -07:00
parent 57d9f9a72e
commit 945793973e
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
42 changed files with 2140 additions and 142 deletions

View file

@ -41,11 +41,8 @@ OverlayWidget {
Layout.fillWidth: true
implicitHeight: width
Behavior on implicitHeight {
SmoothedAnimation { velocity: 50 }
}
MouseArea {
ClickableIcon {
id: mouseArea
anchors {
top: parent.top
@ -54,31 +51,10 @@ OverlayWidget {
}
width: height
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
Image {
id: image
anchors.fill: parent
anchors.margins: mouseArea.pressed || targetMenuOpen ? 3 : 0
Behavior on anchors.margins { SmoothedAnimation { velocity: 30 } }
source: modelData.icon
sourceSize.width: width
sourceSize.height: height
cache: false
visible: false
}
MultiEffect {
anchors.fill: image
source: image
property real targetBrightness: mouseArea.pressed || targetMenuOpen ? -25 : mouseArea.containsMouse ? 75 : 0
Behavior on targetBrightness { SmoothedAnimation { velocity: 600 } }
brightness: targetBrightness / 1000
}
image: modelData.icon
showPressed: targetMenuOpen
onClicked: event => {
event.accepted = true;
@ -99,42 +75,30 @@ OverlayWidget {
}
property var tooltip: TooltipItem {
anchors.fill: parent
tooltip: bar.widgetSurface.tooltip
owner: image
tooltip: bar.tooltip
owner: mouseArea
show: mouseArea.containsMouse
implicitWidth: tooltipText.implicitWidth
implicitHeight: tooltipText.implicitHeight
Text {
id: tooltipText
anchors.fill: parent
text: modelData.tooltipTitle != "" ? modelData.tooltipTitle : modelData.id
color: "white"
}
}
property var rightclickMenu: TooltipItem {
anchors.fill: parent
tooltip: bar.widgetSurface.tooltip
owner: image
tooltip: bar.tooltip
owner: mouseArea
isMenu: true
show: targetMenuOpen && menu.showChildren
animateSize: !rightclickItems.animating
implicitHeight: rightclickItems.implicitHeight
implicitWidth: rightclickItems.implicitWidth
onVisibleChanged: {
if (!visible) targetMenuOpen = false;
}
onClose: targetMenuOpen = false;
MenuItemList {
id: rightclickItems
anchors.fill: parent
items: menu == null ? [] : menu.children
onClose: targetMenuOpen = false;
}