mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
24 lines
669 B
QML
24 lines
669 B
QML
import QtQuick.Layouts
|
|
import Quickshell
|
|
import qs.Commons
|
|
import qs.Services.Networking
|
|
import qs.Services.UI
|
|
import qs.Widgets
|
|
|
|
NIconButtonHot {
|
|
property ShellScreen screen
|
|
|
|
icon: !BluetoothService.enabled ? "bluetooth-off" : ((BluetoothService.connectedDevices && BluetoothService.connectedDevices.length > 0) ? "bluetooth-connected" : "bluetooth")
|
|
tooltipText: I18n.tr("common.bluetooth")
|
|
onClicked: {
|
|
var p = PanelService.getPanel("bluetoothPanel", screen);
|
|
if (p)
|
|
p.toggle(this);
|
|
}
|
|
onRightClicked: {
|
|
if (!Settings.data.network.airplaneModeEnabled) {
|
|
BluetoothService.setBluetoothEnabled(!BluetoothService.enabled);
|
|
}
|
|
}
|
|
}
|