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

Linux sliders are upside down #314

Open
kengruven opened this issue Oct 28, 2023 · 1 comment
Open

Linux sliders are upside down #314

kengruven opened this issue Oct 28, 2023 · 1 comment

Comments

@kengruven
Copy link
Contributor

On Linux, a vertical slider% has the lowest value at the top, and the highest value at the bottom, and it visualy 'fills' the slider from the top down. It gets this behavior from GTK's default.

This is backwards from how sliders work on macOS, Qt, Java, Firefox, Chrome, Safari, Edge, light switches on walls, lighting consoles, audio consoles, and every other vertical slider I've encountered. GTK is just weird here. Nobody pushes a slider up and expects a lower volume or less light.

Normally, I'm in favor of cross-platform toolkits following the local conventions, but in this case I don't see any rationale for GTK being the odd one out, and also I haven't found a single GTK application (even among the GTK demos) with a vertical slider, so I don't think there's any real convention to be beholden to. The racket/gui documentation doesn't say which orientation you get, so we wouldn't be breaking any promises to change it.

As with most toolkits, GTK does provide a property to flip the slider vertically (though their own documentation on it is self-contradictory!), but AFAICT it's not exposed by racket/gui so programmers can't use it.

I propose that slider% on GTK set the "inverted" property on vertical sliders so the highest value is on top, as it is everywhere else in the world. My second choice would be to expose such a property in racket/gui's slider% so that applications can choose either "platform native" or "cross-platform consistent".

@sorawee
Copy link
Contributor

sorawee commented Jul 6, 2024

@mflatt is this fixed? Can it be closed?

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

No branches or pull requests

2 participants