forked from Shinonome/dots-hyprland
sidebars: open by hovering (or clicking) corners
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user