refactor: annotation size factor editing into toolbar#549
Conversation
3779029 to
c322ba9
Compare
|
In PR #548 FedotCompot asked: At this point remove the S M L buttons and just use the number as a scale factor directly, no? I am kind of uncertain - I like the S-M-L for quick switching between defined sizes. For the moment I would keep S-M-L ( pub struct Style {
pub color: Color,
pub size: Size,
pub fill: bool,
pub annotation_size_factor: f32,
}
pub enum Size {
Small = 0,
#[default]
Medium = 1,
Large = 2,
}What do others think? |
|
Regarding reset: I don't think the reset button is needed. When I implemented the dialog, the setting was available as config parm and command line parm only, and it was the first time we exposed it via GUI. It felt right at the time, because it's a technical value and I wasn't sure if it was confusing, so I wanted to provide a way to go back to the value that was configured. It has been around for a bit more than a year and there haven't been many complaints about it. I think it's safe to say the reset button was overcautious. Regarding S/M/L: I think ONE setting for size would be good. But personally I'm not yet convinced the spin button on its own is intuitive enough. Let's get this merged for now, it's a big improvement as it is. In the long run, I'd like to pick up discussion again what might be an intuitive control, as has been discussed in #178. Maybe we can take that as a basis too, although it would need some heavy rebasing now, though., |
9b482fa to
1e7be55
Compare
|
It is not ready to merge, there is still a potential racing condition with updates. |
dd5d03c to
35e4e02
Compare
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.
35e4e02 to
f3199ce
Compare
|
IMHO it is now ready for another review and test by others. To fix the racing condition I removed the and The start value is set from config at creation. |
good catch, I guess that was needed for the interaction of the value with both the label and the dialog. |

This was inspired by PR #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:
Leave the input with Escape, Return or by clicking somewhere in the
screenshot.