emilk / emilk/egui

Add tick marks to slider

Open
#3,258 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

**Is your feature request related to a problem? Please describe.**
I was designing an app that makes use of egui and found myself wanting tick marks on the slider widget. I know that you can show the current value, but I wanted a more aesthetically informative option.

**Describe the solution you'd like**
It would be nice to have an option to add tick marks to the slider widget like shown below:

![](https://help.syncfusion.com/flutter/slider/images/tick/minor-tick.png)

There could be major tick marks at specified locations that have a label. Preferably labels could be manually specified, i.e. the labels could be a vector of `WidgetText`s that get visualized at the specified spacing. This allows them to have custom text and formatting, e.g. instead of a 2 the label might be "Two" in red font of a specified size. In addition, there can be minor tick marks at specified locations. that are unlabeled.

**Describe alternatives you've considered**
I considered making a new widget of my own that implements more of the custom features I'm looking for in my app, but I thought the version described above might be universally helpful as part of the core egui.

**Additional context**
N/A

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing egui slider widget and reviewing its current API and rendering behavior. Define how major and minor tick positions, custom WidgetText labels, spacing, and formatting should work; done means the feature is integrated into the slider with appropriate coverage for the requested options.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.