change the way filled fonts work

This commit is contained in:
lucy 2026-02-01 16:07:44 +01:00
parent f2b941906d
commit 2147220cd7
2 changed files with 7 additions and 10 deletions

View File

@ -1,4 +1,3 @@
import Quickshell
import Quickshell.Io import Quickshell.Io
import QtQuick import QtQuick
import Quickshell.Services.Pipewire import Quickshell.Services.Pipewire
@ -43,8 +42,8 @@ Rectangle {
} }
Row { Row {
id: textRow id: textRow
anchors.verticalCenter: parent.verticalCenter anchors.centerIn: root
spacing: 0 spacing: 5
CustomText { CustomText {
id: volumeText id: volumeText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -56,6 +55,7 @@ Rectangle {
} }
CustomIcon { CustomIcon {
id: volumeIcon id: volumeIcon
anchors.verticalCenter: parent.verticalCenter
opacity: Pipewire.ready ? root.sink.audio.muted ? 0.5 : 1 : 0 opacity: Pipewire.ready ? root.sink.audio.muted ? 0.5 : 1 : 0
text: Pipewire.ready ? root.getVolumeIcon() : null text: Pipewire.ready ? root.getVolumeIcon() : null
} }
@ -66,7 +66,7 @@ Rectangle {
id: pavuLauncher id: pavuLauncher
command: ["sh", "-c", "pavucontrol"] command: ["sh", "-c", "pavucontrol"]
} }
anchors.fill: root anchors.fill: parent
onClicked: pavuLauncher.exec(pavuLauncher.command) onClicked: pavuLauncher.exec(pavuLauncher.command)
acceptedButtons: Qt.LeftButton acceptedButtons: Qt.LeftButton
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor

View File

@ -3,15 +3,12 @@ import qs.settings
import qs import qs
Text { Text {
property bool fill: false property bool fill: true
anchors.verticalCenter: parent.verticalCenter font.family: fill ? "Material Symbols Rounded Filled" : "Material Symbols Rounded"
font.family: "Material Symbols Rounded"
color: Colors.onSurfaceColor color: Colors.onSurfaceColor
font.pixelSize: Settings.config.fontSize + 4
font.variableAxes: ({ font.variableAxes: ({
FILL: fill,
GRAD: 100, GRAD: 100,
opsz: fill ? 48 : 20, opsz: fill ? 48 : 20,
wght: 400 wght: 700
}) })
} }