Skip to content

feat: inline annotation-size -/+/reset buttons in the toolbar#548

Closed
FedotCompot wants to merge 1 commit into
Satty-org:mainfrom
FedotCompot:feat/tool-size-ui
Closed

feat: inline annotation-size -/+/reset buttons in the toolbar#548
FedotCompot wants to merge 1 commit into
Satty-org:mainfrom
FedotCompot:feat/tool-size-ui

Conversation

@FedotCompot

Copy link
Copy Markdown

Replace the separate annotation-size dialog with controls directly in the style toolbar: a minus and plus button (±0.1), a live value readout, and a reset button that restores the configured default. Scrolling over the value still fine-tunes by ±0.01; the scroll controller now uses DISCRETE so one wheel notch is exactly one step instead of jumping erratically with smooth scrolling.

The value still propagates via ToolbarEvent::AnnotationSizeChanged, so nothing downstream changes. Removes the AnnotationSizeDialog component, its input/output enums, the controller field, the show_annotation_dialog method, and the ShowAnnotationDialog/AnnotationDialogFinished messages.

Replace the separate annotation-size dialog with controls directly in the style
toolbar: a minus and plus button (±0.1), a live value readout, and a reset
button that restores the configured default. Scrolling over the value still
fine-tunes by ±0.01; the scroll controller now uses DISCRETE so one wheel notch
is exactly one step instead of jumping erratically with smooth scrolling.

The value still propagates via ToolbarEvent::AnnotationSizeChanged, so nothing
downstream changes. Removes the AnnotationSizeDialog component, its input/output
enums, the controller field, the show_annotation_dialog method, and the
ShowAnnotationDialog/AnnotationDialogFinished messages.

@RobertMueller2 RobertMueller2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@robertwidfen

Copy link
Copy Markdown
Collaborator

I took your idea - it is a good one, but I use the SpinButton from the dialog and this also allows direct editing. Unfortunately I had to touch a bit more code to handle focus and ...

screenrecording-2026-06-19_19-12-39.mp4

robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 19, 2026
See also PR Satty-org#548.

The dialog is now gone and editing is directly possible in the
toolbar. Step sizes are adjusted to 0.1 and 1.0 and minimum
to 0.1 and maximum to 10.

The GTK default bindings are:
 - left mouse button and up/down step size is 0.1
 - middle mouse button step size is 1.0
 - right mouse button jums minimum/maximum
 - mouse hwlle step size is 0.1

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.
@robertwidfen

Copy link
Copy Markdown
Collaborator

For the direct comparison ;-)

image

@FedotCompot

Copy link
Copy Markdown
Author

At this point remove the S M L buttons and just use the number as a scale factor directly, no?

@robertwidfen

Copy link
Copy Markdown
Collaborator

I am kind of uncertain - I like the S-M-L for quick switching between defined sizes.
But on the other hand I also would like to get the toolbar less crowded.

How do you use it?

robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 19, 2026
See also PR Satty-org#548.

The dialog is now gone and editing is directly possible in the
toolbar. Default step sizes are adjusted to 0.1 and 1.0 and 
minimum to 0.1 and maximum to 10.

The GTK default bindings are:
 - left mouse button, mouse wheel and up/down step size is 0.1
 - middle mouse button and page up/down step size is 1.0
 - right mouse button jumps to minimum/maximum
 - holding Shift will switch to 0.01 stepsize

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.
robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 19, 2026
See also PR Satty-org#548.

The dialog is now gone and editing is directly possible in the
toolbar. Default step sizes are adjusted to 0.1 and 1.0 and
minimum to 0.1 and maximum to 10.

The GTK default bindings are:
 - left mouse button, mouse wheel and up/down step size is 0.1
 - middle mouse button and page up/down step size is 1.0
 - right mouse button jumps to minimum/maximum
 - holding Shift will switch to 0.01 stepsize

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.

The internal type was changed from f32 to f64 as the SpinButton is
providing f64 and this can cause problems leading to change events
due to rounding and makes the app unresponsible.
@robertwidfen

Copy link
Copy Markdown
Collaborator

First of all, thank you for taking the time to work on this and submit a PR. Please don't take this the wrong way, but I have decided to move forward with #549 for this specific issue and its discussion. I will close this PR, but thank you again for your valuable idea! 🤗

robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 19, 2026
This was inspired by PR Satty-org#548 by FedotCompot.

The dialog is now gone and editing is directly possible in the
toolbar. Default step sizes are adjusted to 0.1 and 1.0 and
minimum to 0.1 and maximum to 10.

The GTK default bindings are:
 - left mouse button, mouse wheel and up/down step size is 0.1
 - middle mouse button and page up/down step size is 1.0
 - right mouse button jumps to minimum/maximum
 - holding Shift will switch to 0.01 stepsize

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.

The internal type was changed from f32 to f64 as the SpinButton is
providing f64 and this can cause problems leading to change events
due to rounding and makes the app unresponsible.
robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 19, 2026
This was inspired by PR Satty-org#548 by FedotCompot.

The dialog is now gone and editing is directly possible in the
toolbar. Default step sizes are adjusted to 0.1 and 1.0 and
minimum to 0.1 and maximum to 10.

The GTK default bindings are:
 - left mouse button, mouse wheel and up/down step size is 0.1
 - middle mouse button and page up/down step size is 1.0
 - right mouse button jumps to minimum/maximum
 - holding Shift will switch to 0.01 stepsize

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.

The internal type was changed from f32 to f64 as the SpinButton is
providing f64 and this can cause problems leading to change events
due to rounding and makes the app unresponsible.
robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 19, 2026
This was inspired by PR Satty-org#548 by FedotCompot.

The dialog is now gone and editing is directly possible in the
toolbar. Default step sizes are adjusted to 0.1 and 1.0 and
minimum to 0.01 and maximum to 99.99.

The GTK default bindings are:
 - left mouse button, mouse wheel and up/down step size is 0.1
 - middle mouse button and page up/down step size is 1.0
 - right mouse button jumps to minimum/maximum
 - holding Shift will switch to 0.01 stepsize

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.

The internal type was changed from f32 to f64 as the SpinButton is
providing f64 and this can cause problems leading to change events
due to rounding and makes the app unresponsible.
robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 19, 2026
This was inspired by PR Satty-org#548 by FedotCompot.

The dialog is now gone and editing is directly possible in the
toolbar. Default step sizes are adjusted to 0.1 and 1.0 and
minimum to 0.01 and maximum to 99.99.

The GTK default bindings are:
 - left mouse button, mouse wheel and up/down step size is 0.1
 - middle mouse button and page up/down step size is 1.0
 - right mouse button jumps to minimum/maximum
 - holding Shift will switch to 0.01 step size

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.

The internal type was changed from f32 to f64 as the SpinButton is
providing f64 and this can cause problems leading to change events
due to rounding and makes the app unresponsive.
robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 20, 2026
This was inspired by PR Satty-org#548 by FedotCompot.

The dialog is now gone and editing is directly possible in the
toolbar. Default step sizes are adjusted to 0.1 and 1.0 and
minimum to 0.01 and maximum to 99.99.

The GTK default bindings are:
 - left mouse button, mouse wheel and up/down step size is 0.1
 - middle mouse button and page up/down step size is 1.0
 - right mouse button jumps to minimum/maximum
 - holding Shift will switch to 0.01 step size

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.

The internal type was changed from f32 to f64 as the SpinButton is
providing f64 and this can cause problems leading to change events
due to rounding and makes the app unresponsive.
robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 20, 2026
This was inspired by PR Satty-org#548 by FedotCompot.

The dialog is now gone and editing is directly possible in the
toolbar. Default step sizes are adjusted to 0.1 and 1.0 and
minimum to 0.01 and maximum to 99.99.

The GTK default bindings are:
 - left mouse button, mouse wheel and up/down step size is 0.1
 - middle mouse button and page up/down step size is 1.0
 - right mouse button jumps to minimum/maximum
 - holding Shift will switch to 0.01 step size

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.
robertwidfen added a commit to robertwidfen/Satty that referenced this pull request Jun 20, 2026
This was inspired by PR Satty-org#548 by FedotCompot.

The dialog is now gone and editing is directly possible in the
toolbar. Default step sizes are adjusted to 0.1 and 1.0 and
minimum to 0.01 and maximum to 99.99.

The GTK default bindings are:
 - left mouse button, mouse wheel and up/down step size is 0.1
 - middle mouse button and page up/down step size is 1.0
 - right mouse button jumps to minimum/maximum
 - holding Shift will switch to 0.01 step size

Leave the input with Escape, Return or by clicking somewhere in the
screenshot.
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.

3 participants