Skip to content
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

make annotation_size_factor configurable from UI #154

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

RobertMueller2
Copy link
Contributor

@RobertMueller2 RobertMueller2 commented Apr 6, 2025

Related to #106

satty-20250406-090844

  • 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.

Still WIP:

  • 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 input box. i disabled this for now as it stole focus from the text annotation tool

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
Contributor 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
Contributor 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.

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.

1 participant