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