Added floaty bar mode, made sidebar texts and Crypto.qml module bold
This commit is contained in:
36
shell.qml
36
shell.qml
@@ -39,7 +39,7 @@ ShellRoot {
|
||||
|
||||
// ── Spacing Gap: Top / Bottom ────────────────────────────────────────
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
model: Cfg.Config.frameVariant === "bar" ? [] : Quickshell.screens
|
||||
PanelWindow {
|
||||
required property var modelData
|
||||
screen: modelData
|
||||
@@ -59,7 +59,7 @@ ShellRoot {
|
||||
|
||||
// ── Spacing Gap: Left ────────────────────────────────────────────────
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
model: Cfg.Config.frameVariant === "bar" ? [] : Quickshell.screens
|
||||
PanelWindow {
|
||||
required property var modelData
|
||||
screen: modelData
|
||||
@@ -74,7 +74,7 @@ ShellRoot {
|
||||
|
||||
// ── Spacing Gap: Right ───────────────────────────────────────────────
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
model: Cfg.Config.frameVariant === "bar" ? [] : Quickshell.screens
|
||||
PanelWindow {
|
||||
required property var modelData
|
||||
screen: modelData
|
||||
@@ -161,6 +161,36 @@ ShellRoot {
|
||||
var ctx = getContext("2d")
|
||||
ctx.clearRect(0, 0, width, height)
|
||||
|
||||
if (Cfg.Config.frameVariant === "bar") {
|
||||
var barW = width - Cfg.Config.margin * 2
|
||||
var barH = Cfg.Config.barHeight
|
||||
var barX = Cfg.Config.margin
|
||||
var barY = root.isTop ? Cfg.Config.frameBarPadTop : height - Cfg.Config.frameBarPadBottom - barH
|
||||
var r = Math.min(Cfg.Config.radius, barH / 2)
|
||||
|
||||
ctx.fillStyle = root.frameBackground
|
||||
|
||||
ctx.beginPath()
|
||||
ctx.moveTo(barX + r, barY)
|
||||
ctx.lineTo(barX + barW - r, barY)
|
||||
ctx.arcTo(barX + barW, barY, barX + barW, barY + r, r)
|
||||
ctx.lineTo(barX + barW, barY + barH - r)
|
||||
ctx.arcTo(barX + barW, barY + barH, barX + barW - r, barY + barH, r)
|
||||
ctx.lineTo(barX + r, barY + barH)
|
||||
ctx.arcTo(barX, barY + barH, barX, barY + barH - r, r)
|
||||
ctx.lineTo(barX, barY + r)
|
||||
ctx.arcTo(barX, barY, barX + r, barY, r)
|
||||
ctx.closePath()
|
||||
ctx.fill()
|
||||
|
||||
if (Cfg.Config.frameBorderWidth > 0) {
|
||||
ctx.lineWidth = Cfg.Config.frameBorderWidth
|
||||
ctx.strokeStyle = root.frameBorderColor
|
||||
ctx.stroke()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var mT = root.isTop ? Cfg.Config.barHeight : Cfg.Config.margin
|
||||
var mB = root.isTop ? Cfg.Config.margin : Cfg.Config.barHeight
|
||||
var r = Cfg.Config.radius
|
||||
|
||||
Reference in New Issue
Block a user