maniacx / Bluetooth-Battery-Meter

A Gnome extension featuring indicator icons in system tray, serving as meter for Bluetooth device battery levels and providing detailed battery levels via icon/text in the Bluetooth quick settings menu.
https://extensions.gnome.org/extension/6670/bluetooth-battery-meter/
GNU General Public License v3.0
107 stars 11 forks source link

100% battery percent text not displayed properly #9

Closed ionutbortis closed 10 months ago

ionutbortis commented 10 months ago

Hi and thank you for this extension!

I recently started to use Battery Health Charging and one article about the Bluetooth Battery Meter extension popped the other days. I was previously using the Bluetooth Quick Connect extension, which kinda does the same thing, but yours is more up to date and will probably be maintained for a longer time.

It seems, at least on my side, that I have a display issue when the device's battery is 100%. This happens with/without the Large Text accessibility feature.

With Large Text on: Screenshot from 2024-01-14 12-43-26

With Large Text off: Screenshot from 2024-01-14 12-43-52

I changed the css width to 2.6em, and it seems to work, but not sure if that's the proper fix:

.bbm-label-percentage {
  width: 2.6em;
}

Maybe different distros use different UI fonts and this issue appears only on some of them... A general solution would be nice.

System Details Report


Report details

Hardware Information:

Software Information:

maniacx commented 10 months ago

I will look into it. Thanks

maniacx commented 10 months ago

Hello @ionutbortis I have made some changes. Can you try the updates version on Github. You may have to install gettext if the installer script error out with msgfmt error Test and Reply.

Also if accessebility large-text is changed, the popupmenu will rebuild avoiding ellipse or blank spaces. However if display resolution, scalling resolution, fonts or themes are changed. You may have to restart the extension to display text propertly.

ionutbortis commented 10 months ago

Tested again with the latest code from here (revision a767e50) and everything looks fine on my end: Screenshot from 2024-01-15 11-47-02

Tried out different resolutions, different scaling factors via Tweaks and different scales via Settings.

Thank you for fixing this!