emilk / emilk/egui

DatePickerButton does not scale well when text sizes are changed

Open
#3,922 0 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 12h
Merged PRs (30d)
67

Description

**Describe the bug**
It is not possible to use the DatePickerButton object with larger text font sizes, as the buttons and text become crushed. It is also not possible to override the spacing options since these are overridde within the draw function of the DatePickerPopup.

This is an issue from an accessibility perspective, as users who require a larger font cannot currently use the DatePicker effectively.

**To Reproduce**
Set Button and Text objects using `style.text_styles` and set the `button` and `body` fonts to be size 20.
create a DatePickerButton and view the result:

![image](https://github.com/emilk/egui/assets/53791523/e5fb85cf-19c0-4e65-97d9-d395da779178)

I believe the issue comes from https://github.com/emilk/egui/blob/527f4bfdf69f1ae2eb204258f872cfc2da20433f/crates/egui_extras/src/datepicker/popup.rs#L58

Tested on both web and native windows, issue is shared across all.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.