[AGS] Bar: Add tooltips
This commit is contained in:
parent
d9777df0fb
commit
364b5cb0ef
@ -65,6 +65,7 @@ const NetworkWidget = () => {
|
||||
return "";
|
||||
}
|
||||
})}
|
||||
tooltipText={bind(network.wifi, 'ssid')}
|
||||
cssClasses={["network-widget", "quick-view-symbol"]}
|
||||
visible={bind(network.wifi, "state").as(
|
||||
state => state === STATE.ACTIVATED,
|
||||
@ -100,20 +101,17 @@ const BluetoothWidget = () => {
|
||||
{bind(bluetooth, "devices").as(devices => {
|
||||
return devices.map(device => {
|
||||
return (
|
||||
<box visible={bind(device, "connected").as(c => c)}>
|
||||
<image
|
||||
iconName={bind(device, "icon").as(
|
||||
icon => icon,
|
||||
)}
|
||||
></image>
|
||||
<label
|
||||
label={bind(device, "batteryPercentage").as(
|
||||
visible={bind(device, "connected")}
|
||||
tooltipText={bind(device, "batteryPercentage").as(
|
||||
n => {
|
||||
return n + "%";
|
||||
return device.get_name() + ': ' + n + "%";
|
||||
},
|
||||
)}
|
||||
></label>
|
||||
</box>
|
||||
></image>
|
||||
);
|
||||
});
|
||||
})}
|
||||
@ -129,6 +127,7 @@ const BatteryWidget = () => {
|
||||
<image
|
||||
iconName={bind(battery, "iconName").as(icon => icon)}
|
||||
cssClasses={["quick-view-symbol"]}
|
||||
tooltipText={bind(battery, 'percentage').as(p => `${Math.round(p * 100)}%`)}
|
||||
></image>
|
||||
);
|
||||
} else {
|
||||
@ -162,6 +161,7 @@ const Audio = () => {
|
||||
icon => icon,
|
||||
)}
|
||||
cssClasses={["quick-view-symbol"]}
|
||||
tooltipText={bind(wireplumber.defaultSpeaker, 'volume').as(v => Math.round(100 * v) + '%')}
|
||||
></image>
|
||||
<image
|
||||
iconName={bind(
|
||||
@ -169,6 +169,7 @@ const Audio = () => {
|
||||
"volumeIcon",
|
||||
).as(icon => icon)}
|
||||
cssClasses={["quick-view-symbol"]}
|
||||
tooltipText={bind(wireplumber.defaultMicrophone, 'volume').as(v => Math.round(100 * v) + '%')}
|
||||
></image>
|
||||
</box>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user