-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip font rendering is slightly garbled sometimes #766
Comments
Ok, weird. I enabled the GPU graph and adjusted the width of all my graphs to compensate, and now the network tooltip renders fine! It might have moved the consistent problem elsewhere though. for g in memory swap cpu gpu freq net disk thermal fan solar battery; do dconf write /org/gnome/shell/extensions/system-monitor/$g-graph-width 85; done |
I figured it out! The fact that it seemed related to width and that some of the garbling presented as blurriness led me to wonder if it was from a fractional x position. I added some logging to check this: diff --git a/[email protected]/extension.js b/[email protected]/extension.js
index 146e279..16355ba 100644
--- a/[email protected]/extension.js
+++ b/[email protected]/extension.js
@@ -792,6 +792,7 @@ const TipMenu = class SystemMonitor_TipMenu extends PopupMenu.PopupMenuBase {
let tipx = cx - width / 2;
tipx = Math.max(tipx, monitor.x);
tipx = Math.min(tipx, monitor.x + monitor.width - width);
+ console.log(`tipx orig: ${tipx}`);
let tipy = Math.floor(ym);
// Hacky condition to determine if the status bar is at the top or at the bottom of the screen
if (sourceTopLeftY / monitor.height > 0.3) { And yep - some tooltips have fractional x values, and it's exactly correlated to the garbling - see the below screen recording. The last one is harder to notice as it's just blurry with no artifacting - view the video at 100% scale to see it: right-click -> Open video in new tab. system-monitor.fractional.tooltip.x.values-2023-01-24_03.24.48.mp4A simple rounding of the x position fixed it 🙂 I'll submit a PR in a moment |
Sometimes it renders properly:
But most of the time, it looks like this:
When a tooltip appears, it's either garbled or not, and stays that way. Moving the cursor away, waiting a second, and hovering again, rolls the dice again on whether it'll be garbled.
Unlike the other tooltips, the network one seems to be always garbled. Of my graphs' refresh time settings, network and CPU have the shortest - 1000ms - but it doesn't affect the CPU tooltip to the same extent, strangely.
It's rather odd. It's been like this for a few years now.
The last graph is an addition from my fork, but the issue is unrelated to that.
The text was updated successfully, but these errors were encountered: