create bluetooth button

This commit is contained in:
Benjamin Palko 2025-07-26 13:39:24 -04:00
parent 1c034a3904
commit d7024f3d77
4 changed files with 42 additions and 0 deletions

View file

@ -13,6 +13,7 @@ Singleton {
property Clock clock: Clock {} property Clock clock: Clock {}
property Pipewire pipewire: Pipewire {} property Pipewire pipewire: Pipewire {}
property Network network: Network {} property Network network: Network {}
property Bluetooth bluetooth: Bluetooth {}
property Storage storage: Storage {} property Storage storage: Storage {}
property Memory memory: Memory {} property Memory memory: Memory {}
property Cpu cpu: Cpu {} property Cpu cpu: Cpu {}
@ -62,6 +63,13 @@ Singleton {
property int verticalPadding: 6 property int verticalPadding: 6
} }
component Bluetooth: QtObject {
property int fontSize: 16
property int height: 30
property int horizontalPadding: 8
property int verticalPadding: 6
}
component Storage: QtObject { component Storage: QtObject {
property int iconSize: 14 property int iconSize: 14
property int fontSize: 14 property int fontSize: 14

View file

@ -5,6 +5,7 @@ import Quickshell
Singleton { Singleton {
property string bell: "\u{E05d}" property string bell: "\u{E05d}"
property string bellRing: "\u{E224}" property string bellRing: "\u{E224}"
property string bluetooth: "\u{E060}"
property string brickWall: "\u{E586}" property string brickWall: "\u{E586}"
property string coffee: "\u{E09a}" property string coffee: "\u{E09a}"
property string cpu: "\u{E0ad}" property string cpu: "\u{E0ad}"

View file

@ -108,6 +108,10 @@ Scope {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
Bluetooth {
anchors.verticalCenter: parent.verticalCenter
}
Storage { Storage {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }

View file

@ -0,0 +1,29 @@
import "../../../config/"
import "../../../constants/"
import "../../../styled/"
Clickable {
id: clickable
implicitWidth: text.width
implicitHeight: Dimensions.bluetooth.height
onClicked: {}
StyledText {
id: text
font.family: Theme.lucide.font.family
font.pixelSize: Dimensions.bluetooth.fontSize
font.bold: true
text: Icons.bluetooth
color: clickable.containsMouse ? Theme.palette.base300 : Theme.palette.basecontent
anchors.verticalCenter: parent.verticalCenter
topPadding: Dimensions.bluetooth.verticalPadding
bottomPadding: Dimensions.bluetooth.verticalPadding
leftPadding: Dimensions.bluetooth.horizontalPadding
rightPadding: Dimensions.bluetooth.horizontalPadding
}
}