Made the bar scaling relative and ia a config file
This commit is contained in:
@@ -3,13 +3,15 @@ import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Io
|
||||
import "../../../colors"
|
||||
import "../../../config"
|
||||
import "../states/Network" as Global
|
||||
|
||||
MouseArea {
|
||||
id: networkButton
|
||||
width: Math.max(networkText.width + parent.spacing*2, bar.height)
|
||||
|
||||
|
||||
width: Math.max(networkText.width + Config.spacing*2, bar.height)
|
||||
height: bar.height
|
||||
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
||||
@@ -21,8 +23,8 @@ MouseArea {
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: networkButton.containsMouse ? Colors.tertiary : Qt.alpha(Colors.tertiaryContainer, 0.25)
|
||||
radius: 6
|
||||
border.width: 2
|
||||
radius: Config.radius
|
||||
border.width: Config.border_width
|
||||
border.color: networkButton.containsMouse ? Colors.tertiaryContainer_fg
|
||||
: Colors.secondaryContainer_fg
|
||||
|
||||
@@ -30,8 +32,8 @@ MouseArea {
|
||||
id: networkText
|
||||
text: Global.NetworkState.status
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: 26
|
||||
font.family: "Nerd Font"
|
||||
font.pixelSize: Config.big_font_size(bar.height)
|
||||
font.family: Config.font
|
||||
color: networkButton.containsMouse ? Colors.tertiary_fg : networkText.text === " /" ? Colors.error : Colors.primary
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user