Skip to content

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

Merged
cameronwhite merged 6 commits into
PintaProject:masterfrom
ericksson:pointer-fixed-icon-location
Jul 31, 2025
Merged

Prevent cursor position and selection size widget icons from jumping around when the coordinates update#1540
cameronwhite merged 6 commits into
PintaProject:masterfrom
ericksson:pointer-fixed-icon-location

Conversation

@ericksson
Copy link
Copy Markdown
Contributor

Fixes #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.

@cameronwhite
Copy link
Copy Markdown
Member

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
Copy link
Copy Markdown
Member

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

@ericksson
Copy link
Copy Markdown
Contributor Author

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
Copy link
Copy Markdown
Contributor Author

ericksson commented Jul 16, 2025

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
Copy link
Copy Markdown
Contributor Author

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

@cameronwhite
Copy link
Copy Markdown
Member

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

@ericksson
Copy link
Copy Markdown
Contributor Author

I removed the padding now.

@cameronwhite
Copy link
Copy Markdown
Member

Looks good, thank you!

@cameronwhite cameronwhite merged commit 0204fed into PintaProject:master Jul 31, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] Pointer location icon changes position when moving cursor

2 participants