summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-08 21:07:25 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-08 21:07:25 +1000
commit8212be02678a156db13f2b804eaae1aae4c597ec (patch)
tree94873965006cc402f31241148f7af70bd45ba50b /modules
parentfeat: notification popup area (diff)
downloadcaelestia-shell-8212be02678a156db13f2b804eaae1aae4c597ec.tar.gz
caelestia-shell-8212be02678a156db13f2b804eaae1aae4c597ec.tar.bz2
caelestia-shell-8212be02678a156db13f2b804eaae1aae4c597ec.zip
osd: fix flatten anim
Diffstat (limited to 'modules')
-rw-r--r--modules/osd/Background.qml18
-rw-r--r--modules/osd/Osd.qml2
2 files changed, 10 insertions, 10 deletions
diff --git a/modules/osd/Background.qml b/modules/osd/Background.qml
index 57b1a86..4b4b92e 100644
--- a/modules/osd/Background.qml
+++ b/modules/osd/Background.qml
@@ -6,11 +6,11 @@ import QtQuick.Shapes
Shape {
id: root
- required property real realWrapperWidth
+ required property real wrapperWidth
required property real wrapperHeight
readonly property real rounding: BorderConfig.rounding
- readonly property real roundingX: Math.min(rounding, realWrapperWidth / 2)
- readonly property real wrapperWidth: realWrapperWidth - 1 // Pixel issues :sob:
+ readonly property bool flatten: wrapperWidth < rounding * 2
+ readonly property real roundingX: flatten ? wrapperWidth / 2 : rounding
preferredRendererType: Shape.CurveRenderer
opacity: Colours.transparency.enabled ? Colours.transparency.base : 1
@@ -19,12 +19,12 @@ Shape {
strokeWidth: -1
fillColor: BorderConfig.colour
- startX: root.wrapperWidth
+ startX: root.wrapperWidth - 1
PathArc {
relativeX: -root.roundingX
relativeY: root.rounding
- radiusX: root.roundingX
+ radiusX: Math.min(root.rounding, root.wrapperWidth)
radiusY: root.rounding
}
PathLine {
@@ -34,7 +34,7 @@ Shape {
PathArc {
relativeX: -root.roundingX
relativeY: root.rounding
- radiusX: root.roundingX
+ radiusX: Math.min(root.rounding, root.wrapperWidth)
radiusY: root.rounding
direction: PathArc.Counterclockwise
}
@@ -44,18 +44,18 @@ Shape {
PathArc {
relativeX: root.roundingX
relativeY: root.rounding
- radiusX: root.roundingX
+ radiusX: Math.min(root.rounding, root.wrapperWidth)
radiusY: root.rounding
direction: PathArc.Counterclockwise
}
PathLine {
- x: root.wrapperWidth - root.roundingX
+ x: (root.flatten ? root.roundingX : root.wrapperWidth - root.rounding) - 1
relativeY: 0
}
PathArc {
relativeX: root.roundingX
relativeY: root.rounding
- radiusX: root.roundingX
+ radiusX: Math.min(root.rounding, root.wrapperWidth)
radiusY: root.rounding
}
diff --git a/modules/osd/Osd.qml b/modules/osd/Osd.qml
index f16b396..18c53ee 100644
--- a/modules/osd/Osd.qml
+++ b/modules/osd/Osd.qml
@@ -88,8 +88,8 @@ Variants {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
+ wrapperWidth: Math.min(wrapper.width, content.width)
wrapperHeight: wrapper.height
- realWrapperWidth: Math.min(wrapper.width, content.width)
}
LayerShadow {