create bluetooth button
This commit is contained in:
parent
1c034a3904
commit
d7024f3d77
4 changed files with 42 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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}"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
29
modules/bar/components/Bluetooth.qml
Normal file
29
modules/bar/components/Bluetooth.qml
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue