racket / racket/gui

Linux sliders are upside down

Open
#314 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
68
Forks
82
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The entry point named by the issue is slider% on GTK; locate its vertical-slider handling and inspect how GTK's inverted property is currently exposed or omitted. Verify that vertical sliders put the highest value at the top on Linux while preserving existing behavior elsewhere; done means the resulting behavior matches the proposed convention.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.