8000 make annotation_size_factor configurable from UI by RobertMueller2 · Pull Request #154 · gabm/Satty · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

make annotation_size_factor configurable from UI #154

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

Merged
merged 2 commits into from
Apr 25, 2025

Conversation

RobertMueller2
Copy link
Collaborator
@RobertMueller2 RobertMueller2 commented Apr 6, 2025

Related to #106

satty-20250406-090844
(screenshot outdated, see #154 (comment))

  • adds UI element to adjust annotation_size_factor config setting, using GTK SpinButton control. This affects the sizes of all tools and allows for finer control of the annotation sizes ;)
    • the SpinButton control offers by GTK default
      • left click to increase/decrease
      • right click to go to min/max
      • middle click to increase/decrease by a bigger jump
  • adds reset button allowing to going back to the default/configured value

The original goal of the issue was to make the font/font size configurable. I think somebody can implement that later, for now this seemed like a much quicker win.

TODO Items:

  • make reset button more visible, not sure yet what the issue is, according to GTK_DEBUG=interactive it has the same color as the others. Edit: it was "edit-reset" vs "edit-reset-symbolic"
  • consider GTK drawer for the additional UI elements
  • allow focus of the text input box. i disabled this for now as it stole focus from the text annotation tool - no longer a concern because the control has been moved into a dialog

Also, I'm not really familiar with Relm. I couldn't say if all of this is the best possible way to implement it. It does work here and didn't seem to break anything. ;) I have tried adjusting the APP_CONFIG with write but that led to deadlocks (or WouldBlock with try_write) -- since nothing else writes except for intially command line parameters and config, this might not have been the way to go anyway.

@RobertMueller2
Copy link
Collaborator Author

Revealing/hiding the elements now looks like this:

satty-20250407-081608
satty-20250407-081657

@RobertMueller2 RobertMueller2 force-pushed the feat_annotation_size_ui branch from 5ba3ad3 to 92f7858 Compare April 7, 2025 07:48
@RobertMueller2
Copy link
Collaborator Author

dealing with the focus in a consistent way, considering tab, enter, potentially escape, cursor up/down and pgup/pgdown is trickier than I thought. Even using the hide button as a possible focus target doesn't make it much better.

Either the text box of the spin button remains unfocusable, or this needs to go in a dialog.

@RobertMueller2
Copy link
Collaborator Author

satty-20250412-142156

I think that's working better now.

@RobertMueller2 RobertMueller2 marked this pull request as ready for review April 12, 2025 12:25
@RobertMueller2 RobertMueller2 force-pushed the feat_annotation_size_ui branch from e582deb to 2223eb0 Compare April 12, 2025 12:26
@RobertMueller2
Copy link
Collaborator Author
RobertMueller2 commented Apr 12, 2025

Need to draft this again, this broke the color dialog. This is because of switch update -> update_with_view. I'm sure there's a solution for this specifically to update the gui, but i'll try to go back to update.

@RobertMueller2 RobertMueller2 marked this pull request as draft April 12, 2025 12:41
@RobertMueller2 RobertMueller2 marked this pull request as ready for review April 12, 2025 14:37
@gabm
Copy link
Owner
gabm commented Apr 25, 2025

thanks, looks great

Sorry, something went wrong.

@gabm gabm merged commit ca900ea into gabm:main Apr 25, 2025
3 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.

2 participants
0