mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
hefty: make overview bg work with bottom position
This commit is contained in:
Submodule dots/.config/quickshell/ii/modules/common/widgets/shapes updated: 5916b5ae6f...b62e4482af
@@ -17,29 +17,35 @@ HAbstractMorphedPanel {
|
||||
property real horizontalGap: (root.screenWidth - contentWidth) / 2
|
||||
|
||||
// Background
|
||||
backgroundPolygon: MaterialShapes.customPolygon([
|
||||
// bottom-middle
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth / 2, edgeGap + root.contentHeight), new CornerRounding.CornerRounding(0)),
|
||||
// bottom-left
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap + rounding, edgeGap + root.contentHeight), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap, edgeGap + root.contentHeight), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap, edgeGap + root.contentHeight - rounding), new CornerRounding.CornerRounding(rounding)),
|
||||
// top-left
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap, edgeGap + rounding), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap, edgeGap), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap + rounding, edgeGap), new CornerRounding.CornerRounding(rounding)),
|
||||
// top-middle
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth / 2, edgeGap), new CornerRounding.CornerRounding(0)),
|
||||
// top-right
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap - rounding, edgeGap), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap, edgeGap), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap, edgeGap + rounding), new CornerRounding.CornerRounding(rounding)),
|
||||
backgroundPolygon: {
|
||||
const bottom = Config.options.bar.bottom
|
||||
const topY = bottom ? (root.screenHeight - edgeGap - contentHeight) : edgeGap
|
||||
const bottomY = bottom ? (root.screenHeight - edgeGap) : (edgeGap + contentHeight)
|
||||
const points = [
|
||||
// bottom-middle
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth / 2, bottomY), new CornerRounding.CornerRounding(0)),
|
||||
// bottom-left
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap + rounding, bottomY), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap, bottomY), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap, bottomY - rounding), new CornerRounding.CornerRounding(rounding)),
|
||||
// top-left
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap, topY + rounding), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap, topY), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(horizontalGap + rounding, topY), new CornerRounding.CornerRounding(rounding)),
|
||||
// top-middle
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth / 2, topY), new CornerRounding.CornerRounding(0)),
|
||||
// top-right
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap - rounding, topY), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap, topY), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap, topY + rounding), new CornerRounding.CornerRounding(rounding)),
|
||||
|
||||
// bottom-right
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap, edgeGap + root.contentHeight - rounding), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap, edgeGap + root.contentHeight), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap - rounding, edgeGap + root.contentHeight), new CornerRounding.CornerRounding(rounding)),
|
||||
], 1, new Offset.Offset(root.screenWidth / 2, edgeGap + contentHeight / 2))
|
||||
// bottom-right
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap, bottomY - rounding), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap, bottomY), new CornerRounding.CornerRounding(rounding)),
|
||||
new MaterialShapes.PointNRound(new Offset.Offset(root.screenWidth - horizontalGap - rounding, bottomY), new CornerRounding.CornerRounding(rounding)),
|
||||
]
|
||||
return MaterialShapes.customPolygon(points, 1, new Offset.Offset(root.screenWidth / 2, edgeGap + contentHeight / 2))
|
||||
}
|
||||
|
||||
// Keybinds
|
||||
GlobalShortcut {
|
||||
|
||||
Reference in New Issue
Block a user