Prevent cursor position and selection size widget icons from jumping around when the coordinates update
Fixes https://github.com/PintaProject/Pinta/issues/1429
Both cursor position and selection rectangle size widgets and labels are now left aligned with enough space for 12 characters so that coordinates in the tens of thousands can be displayed.
The widgets can still overlap the color palette if the application window has a very narrow size, but that feels like a separate issue to address (maybe by imposing a minimum width for the application window) and it's not so bad now that the icons aren't jumping around anymore.
Thanks for working on this! I think the approach here looks good
Testing on macOS, I was seeing somewhat more padding than in your screenshot, so perhaps there's an extra margin coming from somewhere. I'll poke around in the GTK inspector to see if there's anything obvious
Looking into the layout with the GTK inspector, the main things I saw were just:
- we probably don't need the two Gtk.Separator widgets (one in between the size labels, and before the zoom widgets)
- I was able to get away with
WidthChars = 11at least on my system. I think this is because the font isn't fixed-width, so it's not an exact measurement
Looking into the layout with the GTK inspector, the main things I saw were just:
- we probably don't need the two Gtk.Separator widgets (one in between the size labels, and before the zoom widgets)
- I was able to get away with
WidthChars = 11at least on my system. I think this is because the font isn't fixed-width, so it's not an exact measurement
Thanks for the feedback. It makes sense! I will look to push a few more tweaks based on this as soon as I get the chance.
Sorry for the delay here. I've been doing some traveling over the summer.
I pushed the suggested changes from your comments and it still looks good in my testing. A little more tight than before when the character width was 12, but it looks better, I think.
I would maybe even reduce the padding between the icon and the numbers to one character. Currently it's set to two empty spaces.
This is how the numbers would look with just one white space character padding
And this is with no padding at all
And with smaller values for the coordinates
I think it looks best with no padding, basically this change
Thanks! Yeah I agree that looks good with no padding 👍
I removed the padding now.
Looks good, thank you!