waffles: osd

This commit is contained in:
end-4
2025-11-23 11:39:11 +01:00
parent 6e986fa8b0
commit 3087e5da92
11 changed files with 337 additions and 10 deletions
@@ -17,7 +17,7 @@ Singleton {
property string iconsPath: `${Directories.assetsPath}/icons/fluent`
property bool dark: Appearance.m3colors.darkmode
property real backgroundTransparency: 0.11
property real backgroundTransparency: 0.18
property real panelBackgroundTransparency: 0.12
property real panelLayerTransparency: root.dark ? 0.9 : 0.7
property real contentTransparency: root.dark ? 0.9 : 0.5
@@ -83,7 +83,7 @@ Singleton {
}
colors: QtObject {
id: colors
property color shadow: ColorUtils.transparentize("#000000", 0.62)
property color shadow: ColorUtils.transparentize('#161616', 0.62)
property color ambientShadow: ColorUtils.transparentize("#000000", 0.75)
property color bgPanelFooterBase: ColorUtils.transparentize(root.dark ? root.darkColors.bgPanelFooter : root.lightColors.bgPanelFooter, root.panelBackgroundTransparency)
property color bgPanelFooter: ColorUtils.transparentize(root.dark ? root.darkColors.bgPanelFooter : root.lightColors.bgPanelFooter, root.panelLayerTransparency)
@@ -10,11 +10,13 @@ import qs.modules.waffle.looks
Item {
id: root
signal closed
signal closed()
property alias border: borderRect
default required property Item contentItem
property alias borderColor: borderRect.border.color
required property Item contentItem
property real visualMargin: 12
property int closeAnimDuration: 150
function close() {
closeAnim.start();
@@ -70,7 +72,7 @@ Item {
target: borderRect
property: "sourceEdgeMargin"
to: -(implicitHeight + root.visualMargin)
duration: 150
duration: root.closeAnimDuration
easing.type: Easing.BezierSpline
easing.bezierCurve: Looks.transition.easing.bezierCurve.easeOut
}
@@ -0,0 +1,49 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell.Widgets
import qs.modules.common
import qs.modules.common.widgets
import qs.modules.waffle.looks
ProgressBar {
id: root
Behavior on value {
SmoothedAnimation {
velocity: Looks.transition.velocity
}
}
implicitHeight: 4
background: null
contentItem: Item {
id: background
Rectangle {
id: trackTrough
anchors {
left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
}
radius: root.implicitHeight / 2
color: Looks.colors.controlBg
implicitHeight: root.implicitHeight
}
Rectangle {
id: trackHighlight
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
}
radius: root.implicitHeight / 2
color: Looks.colors.accent
implicitHeight: root.implicitHeight
width: background.width * root.value
}
}
}