lakoliu / Furtherance

Track your time without being tracked
GNU General Public License v3.0
258 stars 23 forks source link

Clock padding #11

Closed mo8it closed 2 years ago

mo8it commented 2 years ago

Hello, thanks for your awesome project! I like it a lot!

I have got some improvements ideas that I will post in separate issues.

This issue is about adding a padding to the clock. The numbers at the edge look weird.

image

lakoliu commented 2 years ago

Thank you! That's very nice to hear. What distro and desktop environment are you using? It's interesting that there is no padding because if you look in the screenshots in the README there should be quite a bit of padding. I'm guessing you are using a DE other than GNOME?

mo8it commented 2 years ago

I am using Fedora 35 with Gnome 41. Maybe on the screenshots, the window was resized? What happens on your side if you resize the window to the minimum width?

lakoliu commented 2 years ago

Oh, wow, that's strange, that's what I originally wrote most of the code on and I didn't have that issue. The minimum width for me now is just how the app starts (same width and look as the screenshots). I'm running Gentoo with Gnome 41 currently, but I'll try running it in some VM's to debug it. Just for some more context, what is your current resolution in display settings and your screen's max resolution (i.e. 1080, 4K, etc.)? Also, what is your "Scale" set to?

mo8it commented 2 years ago

Ah, thanks for the helpful hint: Scaling.

I did debug it. If you use Gnome tweaks and set the font scaling higher than 1.0 (I have 1.25), then this problem can be seen.

On scale 1.0, the problem is gone on my side.

So I think that a padding is missing, but this is not noticed since the other elements are big enough. But if you scale the font up, the elements don't scale and the padding missing can be noticed.

Do you have a padding around the timer text element?

lakoliu commented 2 years ago

Okay, interesting. I know fractional scaling (i.e. 1.25) is not yet supported in Wayland and causes issues, so that's probably part of it. I don't believe I added any padding around the timer, so I'll get to work on that now to try to prevent this.

mo8it commented 2 years ago

You can activate fractional scaling on Wayland. I do have fractional scaling at 1.25 AND font scaling at 1.25. The two scales are different. One for everything and one only for font.

mo8it commented 2 years ago

Changing the fractional scaling is not the issue. I did test it.

lakoliu commented 2 years ago

You can activate fractional scaling on Wayland. I do have fractional scaling at 1.25 AND font scaling at 1.25. The two scales are different. One for everything and one only for font.

Yes, it is possible, but it's not supported yet, which is why most distros have it off by default. But good to know it's not the issue, I should be able to get this fixed quickly then. Thanks again for pointing it out.

mo8it commented 2 years ago

If you want me to test it on my side after the fix, just mention me here.

Is it just cargo run?

That is by the way another point: No contributing instructions.

But I did not learn Rust yet, so I can not help anyway :P

lakoliu commented 2 years ago

Okay, will do. It's actually built with meson and ninja (Gnome Builder) so it's a bit more complicated, but I could always just send you a flatpak to try out. Build/contribution instructions are definitely something I need to add! Thanks for the help!

mo8it commented 2 years ago

I did manage to build it with Gnome Builder ^^

lakoliu commented 2 years ago

I've added a margin with commit 9f2b3ce and this should now be fixed. I've tested it with text scaling on Gnome Tweaks and the timer no longer presses against the sides of the window. The change will be available in the next release (or now if you compile from source).