[AGS] Bar: Add tooltips
This commit is contained in:
		| @@ -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( | ||||
|                                         n => { | ||||
|                                             return n + "%"; | ||||
|                                         }, | ||||
|                                     )} | ||||
|                                 ></label> | ||||
|                             </box> | ||||
|                             <image | ||||
|                                 iconName={bind(device, "icon").as( | ||||
|                                     icon => icon, | ||||
|                                 )} | ||||
|                                 visible={bind(device, "connected")} | ||||
|                                 tooltipText={bind(device, "batteryPercentage").as( | ||||
|                                     n => { | ||||
|                                         return device.get_name() + ': ' + n + "%"; | ||||
|                                     }, | ||||
|                                 )} | ||||
|                             ></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> | ||||
|         ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user