mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-09-19 18:19:02 +05:30
style: format qml files
This commit is contained in:
@@ -6,61 +6,61 @@ import Quickshell.Widgets
|
||||
import qs.config
|
||||
|
||||
WrapperItem {
|
||||
id: root
|
||||
id: root
|
||||
|
||||
property int corner
|
||||
property real radius: Appearance.radius
|
||||
property color color
|
||||
property int corner
|
||||
property real radius: Appearance.radius
|
||||
property color color
|
||||
|
||||
Component.onCompleted: {
|
||||
switch (corner) {
|
||||
case 0:
|
||||
anchors.left = parent.left;
|
||||
anchors.top = parent.top;
|
||||
break;
|
||||
case 1:
|
||||
anchors.top = parent.top;
|
||||
anchors.right = parent.right;
|
||||
rotation = 90;
|
||||
break;
|
||||
case 2:
|
||||
anchors.right = parent.right;
|
||||
anchors.bottom = parent.bottom;
|
||||
rotation = 180;
|
||||
break;
|
||||
case 3:
|
||||
anchors.left = parent.left;
|
||||
anchors.bottom = parent.bottom;
|
||||
rotation = -90;
|
||||
break;
|
||||
Component.onCompleted: {
|
||||
switch (corner) {
|
||||
case 0:
|
||||
anchors.left = parent.left;
|
||||
anchors.top = parent.top;
|
||||
break;
|
||||
case 1:
|
||||
anchors.top = parent.top;
|
||||
anchors.right = parent.right;
|
||||
rotation = 90;
|
||||
break;
|
||||
case 2:
|
||||
anchors.right = parent.right;
|
||||
anchors.bottom = parent.bottom;
|
||||
rotation = 180;
|
||||
break;
|
||||
case 3:
|
||||
anchors.left = parent.left;
|
||||
anchors.bottom = parent.bottom;
|
||||
rotation = -90;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Shape {
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
Shape {
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: 0
|
||||
fillColor: root.color
|
||||
startX: root.radius
|
||||
ShapePath {
|
||||
strokeWidth: 0
|
||||
fillColor: root.color
|
||||
startX: root.radius
|
||||
|
||||
PathArc {
|
||||
relativeX: -root.radius
|
||||
relativeY: root.radius
|
||||
radiusX: root.radius
|
||||
radiusY: radiusX
|
||||
direction: PathArc.Counterclockwise
|
||||
}
|
||||
PathArc {
|
||||
relativeX: -root.radius
|
||||
relativeY: root.radius
|
||||
radiusX: root.radius
|
||||
radiusY: radiusX
|
||||
direction: PathArc.Counterclockwise
|
||||
}
|
||||
|
||||
PathLine {
|
||||
relativeX: 0
|
||||
relativeY: -root.radius
|
||||
}
|
||||
PathLine {
|
||||
relativeX: 0
|
||||
relativeY: -root.radius
|
||||
}
|
||||
|
||||
PathLine {
|
||||
relativeX: root.radius
|
||||
relativeY: 0
|
||||
}
|
||||
PathLine {
|
||||
relativeX: root.radius
|
||||
relativeY: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user