launcher: fix flatten anim
This commit is contained in:
parent
8212be0267
commit
e45083b2a8
3 changed files with 11 additions and 11 deletions
|
|
@ -7,10 +7,10 @@ Shape {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property real wrapperWidth
|
required property real wrapperWidth
|
||||||
required property real realWrapperHeight
|
required property real wrapperHeight
|
||||||
readonly property real rounding: BorderConfig.rounding
|
readonly property real rounding: BorderConfig.rounding
|
||||||
readonly property real roundingY: Math.min(rounding, realWrapperHeight / 2)
|
readonly property bool flatten: wrapperHeight < rounding * 2
|
||||||
readonly property real wrapperHeight: realWrapperHeight - 1 // Pixel issues :sob:
|
readonly property real roundingY: flatten ? wrapperHeight / 2 : rounding
|
||||||
|
|
||||||
preferredRendererType: Shape.CurveRenderer
|
preferredRendererType: Shape.CurveRenderer
|
||||||
opacity: Colours.transparency.enabled ? Colours.transparency.base : 1
|
opacity: Colours.transparency.enabled ? Colours.transparency.base : 1
|
||||||
|
|
@ -19,13 +19,13 @@ Shape {
|
||||||
strokeWidth: -1
|
strokeWidth: -1
|
||||||
fillColor: BorderConfig.colour
|
fillColor: BorderConfig.colour
|
||||||
|
|
||||||
startY: root.wrapperHeight
|
startY: root.wrapperHeight - 1
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
relativeX: root.rounding
|
relativeX: root.rounding
|
||||||
relativeY: -root.roundingY
|
relativeY: -root.roundingY
|
||||||
radiusX: root.rounding
|
radiusX: root.rounding
|
||||||
radiusY: root.roundingY
|
radiusY: Math.min(root.rounding, root.wrapperHeight)
|
||||||
direction: PathArc.Counterclockwise
|
direction: PathArc.Counterclockwise
|
||||||
}
|
}
|
||||||
PathLine {
|
PathLine {
|
||||||
|
|
@ -36,7 +36,7 @@ Shape {
|
||||||
relativeX: root.rounding
|
relativeX: root.rounding
|
||||||
relativeY: -root.roundingY
|
relativeY: -root.roundingY
|
||||||
radiusX: root.rounding
|
radiusX: root.rounding
|
||||||
radiusY: root.roundingY
|
radiusY: Math.min(root.rounding, root.wrapperHeight)
|
||||||
}
|
}
|
||||||
PathLine {
|
PathLine {
|
||||||
x: root.wrapperWidth - root.rounding * 2
|
x: root.wrapperWidth - root.rounding * 2
|
||||||
|
|
@ -45,17 +45,17 @@ Shape {
|
||||||
relativeX: root.rounding
|
relativeX: root.rounding
|
||||||
relativeY: root.roundingY
|
relativeY: root.roundingY
|
||||||
radiusX: root.rounding
|
radiusX: root.rounding
|
||||||
radiusY: root.roundingY
|
radiusY: Math.min(root.rounding, root.wrapperHeight)
|
||||||
}
|
}
|
||||||
PathLine {
|
PathLine {
|
||||||
relativeX: 0
|
relativeX: 0
|
||||||
y: root.wrapperHeight - root.roundingY
|
y: (root.flatten ? root.roundingY : root.wrapperHeight - root.rounding) - 1
|
||||||
}
|
}
|
||||||
PathArc {
|
PathArc {
|
||||||
relativeX: root.rounding
|
relativeX: root.rounding
|
||||||
relativeY: root.roundingY
|
relativeY: root.roundingY
|
||||||
radiusX: root.rounding
|
radiusX: root.rounding
|
||||||
radiusY: root.roundingY
|
radiusY: Math.min(root.rounding, root.wrapperHeight)
|
||||||
direction: PathArc.Counterclockwise
|
direction: PathArc.Counterclockwise
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ Scope {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
|
||||||
wrapperWidth: wrapper.width
|
wrapperWidth: wrapper.width
|
||||||
realWrapperHeight: Math.min(wrapper.height, content.height)
|
wrapperHeight: Math.min(wrapper.height, content.height)
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerShadow {
|
LayerShadow {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ Variants {
|
||||||
property bool osdVisible
|
property bool osdVisible
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
running: true
|
// running: true
|
||||||
repeat: true
|
repeat: true
|
||||||
interval: 2000
|
interval: 2000
|
||||||
onTriggered: root.osdVisible = !root.osdVisible
|
onTriggered: root.osdVisible = !root.osdVisible
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue