Made the bar scaling relative and ia a config file

This commit is contained in:
Hannes
2026-06-08 19:25:33 +02:00
parent bddebdb983
commit 57d0a2d6a5
11 changed files with 157 additions and 90 deletions
+6 -5
View File
@@ -3,18 +3,19 @@ import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
import "../../../colors"
import "../../../config"
MouseArea {
id: powerButton
width: powerText.width + 16
width: Math.max(powerText.width + Config.spacing, bar.height)
height: bar.height
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
Rectangle {
anchors.fill: parent
color: powerButton.containsMouse ? Colors.secondaryContainer_fg : Qt.alpha(Colors.secondary, 0.5)
radius: 6
color: powerButton.containsMouse ? Colors.secondaryContainer_fg : Qt.alpha(Colors.secondary, 0.75)
radius: Config.radius
Item {
anchors.fill: parent
@@ -41,8 +42,8 @@ MouseArea {
id: powerText
anchors.centerIn: parent
text: ""
font.pixelSize: 26
font.family: "Nerd Font"
font.pixelSize: Config.big_font_size(bar.height)
font.family: Config.font
color:powerButton.containsMouse ? Colors.secondaryContainer : Colors.secondary_fg
}
}