move bluetooth and create popup menu
This commit is contained in:
parent
d7024f3d77
commit
c0125912b1
3 changed files with 48 additions and 7 deletions
39
modules/bar/components/bluetooth/Bluetooth.qml
Normal file
39
modules/bar/components/bluetooth/Bluetooth.qml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import qs.config
|
||||
import qs.constants
|
||||
import qs.styled
|
||||
|
||||
Clickable {
|
||||
id: root
|
||||
|
||||
implicitWidth: text.width
|
||||
implicitHeight: Dimensions.bluetooth.height
|
||||
|
||||
onClicked: {
|
||||
popup.opened = !popup.opened;
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: text
|
||||
|
||||
font.family: Theme.lucide.font.family
|
||||
font.pixelSize: Dimensions.bluetooth.fontSize
|
||||
font.bold: true
|
||||
text: Icons.bluetooth
|
||||
|
||||
color: root.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
|
||||
}
|
||||
|
||||
BluetoothMenu {
|
||||
id: popup
|
||||
|
||||
anchor.item: root
|
||||
anchor.rect.x: root.width / 2 - width / 2
|
||||
anchor.rect.y: root.height + 8
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue