8000 S,M,L connected to SpinButton by fabienjuif · Pull Request #178 · gabm/Satty · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

S,M,L connected to SpinButton #178

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

fabienjuif
Copy link
Collaborator
@fabienjuif fabienjuif commented May 8, 2025

related to #171

image

Idea is to simplify the UX a bit.

  • The sizes are percentages
  • We could add back button with a "size" that translate this way (this is what's exposed in the screenshot)
    • S(mall) => 33%
    • M(edium) => 100%
    • L(arge) => 300%

For now the PR breaks things, like

  • Text inputs
    • Because the focus in always in the SpinButton atm

I find it more intuitive like this but this is maybe me?
WDYT?

@fabienjuif
Copy link
Collaborator Author

image

@fabienjuif
Copy link
Collaborator Author

related #51

@fabienjuif
Copy link
Collaborator Author

WDYT @gabm @RobertMueller2 ?

I think it way more usable like this but I am biased ofc

@RobertMueller2
Copy link
Collaborator
RobertMueller2 commented May 9, 2025

Personally, I kinda like the S,M,L buttons. But I agree, they have some overlap with the annotation size factor, and now that that is exposed, maybe it is too complicated now.

Maybe we can use the S/M/L buttons to set certain (configurable?) values for the annotation size? EDIT: I think, maybe relative to the image size, although that could be tricky for different aspect ratios.

Let's discuss this a bit more :)

@fabienjuif
Copy link
Collaborator Author
fabienjuif commented May 9, 2025

I think this is what I suggest here (or at least try)

We could add back button with a "size" that translate this way (this is what's exposed in the screenshot)

S(mall) => 33%
M(edium) => 100%
L(arge) => 300%

There are not random values, this is values I tried in this PR and showed in the first screenshot.

Edit: and then we remove the x, the buttons are just a way to change the percentages with pre-defined values

@RobertMueller2
Copy link
Collaborator

ok, sorry, I suppose I got confused. Does indeed sound like the same thought.

@fabienjuif
Copy link
Collaborator Author
fabienjuif commented May 9, 2025

image

With latest commit
I am unsure how to update the toolbar model on the action event yet

@fabienjuif fabienjuif changed the title remove S|M|L and expose percentage S,M,L connected to SpinButton May 9, 2025
Size::Medium => (54.0 * size_factor) as i32,
Size::Large => (96.0 * size_factor) as i32,
}
pub fn to_text_size(self) -> f32 {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

At one point it should be resolved to each tools maybe

@fabienjuif
Copy link
Collaborator Author

At this stage I have s,m,l group buttons that modify the spin value.
Before opening the PR, what I'd like is when I change the spin value for something <> than the s,m,l no button is toggled on

@gabm
Copy link
Owner
gabm commented May 13, 2025

hmm gnome guidelines say:

Only use a spin button when the exact numeric value is meaningful or useful. If this isn’t the case, a slider might be a better choice.

https://developer.gnome.org/hig/patterns/controls/spin-buttons.html

maybe that's a better choice?!

@fabienjuif
Copy link
Collaborator Author

Maybe

adjusting the value relative to its current value is more important than choosing an absolute value

@RobertMueller2
Copy link
Collaborator

slider would also match #51 better. so there's that ;) but I didn't think that far when dealing with annotation size value.

@fabienjuif
Copy link
Collaborator Author

Ok so we are going closer to the first version I've made without the S/M/L buttons.
And we could replace the spin with a slider.

If you feel this is worth a try I'll dig into that

@RobertMueller2
Copy link
Collaborator

Ok so we are going closer to the first version I've made without the S/M/L buttons. And we could replace the spin with a slider.

If you feel this is worth a try I'll dig into that

I think so.

  • S/M/L provides something that isn't too technical, disadvantage: lacks fine control
  • Spin Button provides more control, but adds technicality

The solution on main does indeed solve the issue of lacking control, but it also combines the disadvantages of both.

I think the slider is perfect here, really, fine control if done right, doesn't expose the technical stuff.

@gabm
Copy link
Owner
gabm commented May 15, 2025

here are some ideas. I am unsure what GTK offers, Ill check...

https://www.justinmind.com/web-design/slider

(number 8 looks suitable)

EDIT: GTK Scale has marks .. https://docs.gtk.org/gtk4/class.Scale.html

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
0