mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
* [x] I have followed the instructions in the PR template This PR fixes an issue, where `DragValue` would expand when it enters editing state. There were 3 contributing problems: - A workaround introduced in #4276 caused the `DragValue` to report incorrect outer size. - The `DragValue` uses `TextEdit` internally and sets both `min_size` and `desired_width` to the same value - desired width is used **before** padding is applied - this is in contrast to `Button` (also used internally by `DragValue`), which only uses `min_size`. This caused the `DragValue` to expand horizontally by the size of button padding. - The height of the `TextEdit` is (among other things) determined by the height of the row, which was not present in `Button`. This caused a small vertical expansion, when the contents (including padding) were larger than the `min_size`.  Here the dimensions set in code are: - padding: 20 x 20 pt - interact size: 80 x 30 pt *Note: I do not know what's up with the tests. When I ran the check script, they were failing because of 3 UI missmatches, so I updated the snapshots. Now, the updated snapshots cause the same failure in CI, that appeared locally before the update. Now the locally run tests fail with `The platform you're compiling for is not supported by winit` and couple more following errors coming from the same source (`winit 0.30.7`).*