sidebars: open by hovering (or clicking) corners

This commit is contained in:
end-4
2025-08-26 10:51:40 +07:00
parent 63b7a3a36c
commit e7ffd2455a
4 changed files with 123 additions and 10 deletions
@@ -293,6 +293,13 @@ Singleton {
property string username: "[unset]"
}
}
property JsonObject cornerOpen: JsonObject {
property bool enable: true
property bool clickless: true
property real cornerRegionWidth: 30
property real cornerRegionHeight: 2
property bool visualize: false
}
}
property JsonObject time: JsonObject {
@@ -13,8 +13,18 @@ Item {
implicitWidth: implicitSize
implicitHeight: implicitSize
property bool isTopLeft: corner === RoundCorner.CornerEnum.TopLeft
property bool isBottomLeft: corner === RoundCorner.CornerEnum.BottomLeft
property bool isTopRight: corner === RoundCorner.CornerEnum.TopRight
property bool isBottomRight: corner === RoundCorner.CornerEnum.BottomRight
Shape {
anchors.fill: parent
anchors {
top: (isTopLeft || isTopRight) ? parent.top : undefined
bottom: (isBottomLeft || isBottomRight) ? parent.bottom : undefined
left: (isTopLeft || isBottomLeft) ? parent.left : undefined
right: (isTopRight || isBottomRight) ? parent.right : undefined
}
layer.enabled: true
layer.smooth: true
preferredRendererType: Shape.CurveRenderer