emilk / emilk/egui

Window title dictates window width even with fixed_size

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

Description

**Describe the bug**
I was trying to build a grid of windows, but I bump into an issue that title of `Window` dictates window length even if I use `fixed_size`. I know that the underlying machinery maybe don't want to decide how to trim the title in order to comply with `fixed_size` constraint, so I thought I can just cut the title name to some arbitrary amount of characters, but symbols also have a different length, and I ended having windows with different widths again. Is there any other way to force width on window? Also please let me know if it's an intended behavior for window and I should look into some other container to build functional panels into grids

**To Reproduce**
Here is a gist to reproduce:
https://gist.github.com/NPCRUS/b6b6c6fcc65af056bd644741b5d674bd

**Expected behavior**
I expect window to have fixed width, when using `fixed_size`

**Screenshots**
here you can see two windows with the titles consist of 30 symbols both
![image](https://user-images.githubusercontent.com/13519208/235506395-03c18d81-6fe4-41b7-a0c4-f5c21c707dc5.png)

**Desktop (please complete the following information):**
- OS: Windows

Contributor guide

Open the contributing guide

Research direction

Start with the linked gist and reproduce the two Window examples on Windows, comparing fixed_size behavior with titles containing symbols. Trace the Window sizing and title-layout entry points to determine why the title affects width; done means fixed_size consistently controls the window width while preserving the title behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.