bluetoothdevices: fallback icon
This commit is contained in:
parent
0518ec4214
commit
10cb02793a
1 changed files with 7 additions and 2 deletions
|
|
@ -1,11 +1,16 @@
|
||||||
import { bind, Variable } from "astal";
|
import { bind, Variable } from "astal";
|
||||||
import { Gtk } from "astal/gtk3";
|
import { Astal, Gtk } from "astal/gtk3";
|
||||||
import AstalBluetooth from "gi://AstalBluetooth";
|
import AstalBluetooth from "gi://AstalBluetooth";
|
||||||
import PopdownWindow from "../../widgets/popdownwindow";
|
import PopdownWindow from "../../widgets/popdownwindow";
|
||||||
|
|
||||||
const BluetoothDevice = (device: AstalBluetooth.Device) => (
|
const BluetoothDevice = (device: AstalBluetooth.Device) => (
|
||||||
<box className="device">
|
<box className="device">
|
||||||
<icon className="icon" icon={bind(device, "icon").as(i => `${i}-symbolic`)} />
|
<icon
|
||||||
|
className="icon"
|
||||||
|
icon={bind(device, "icon").as(i =>
|
||||||
|
Astal.Icon.lookup_icon(`${i}-symbolic`) ? `${i}-symbolic` : "bluetooth-symbolic"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
<label
|
<label
|
||||||
truncate
|
truncate
|
||||||
xalign={0}
|
xalign={0}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue