Pinta icon indicating copy to clipboard operation
Pinta copied to clipboard

Prevent cursor position and selection size widget icons from jumping around when the coordinates update

Open ericksson opened this issue 6 months ago • 3 comments

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.

Pinta_coordinate_widgets

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.

ericksson avatar Jun 13 '25 20:06 ericksson

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

Screenshot 2025-06-14 at 12 19 10 PM Screenshot 2025-06-14 at 12 19 30 PM

cameronwhite avatar Jun 14 '25 16:06 cameronwhite

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 = 11 at least on my system. I think this is because the font isn't fixed-width, so it's not an exact measurement

cameronwhite avatar Jun 15 '25 03:06 cameronwhite

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 = 11 at 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.

ericksson avatar Jun 16 '25 05:06 ericksson

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.

image

ericksson avatar Jul 16 '25 05:07 ericksson

This is how the numbers would look with just one white space character padding image

And this is with no padding at all image

And with smaller values for the coordinates image

I think it looks best with no padding, basically this change image

ericksson avatar Jul 16 '25 05:07 ericksson

Thanks! Yeah I agree that looks good with no padding 👍

cameronwhite avatar Jul 18 '25 23:07 cameronwhite

I removed the padding now.

ericksson avatar Jul 30 '25 20:07 ericksson

Looks good, thank you!

cameronwhite avatar Jul 31 '25 04:07 cameronwhite