egui/crates/egui_demo_lib/tests/snapshots/demos
IaVashik e995c4c5b4
Fix sizing bug in `TextEdit::singleline` (#5640)
This PR reverts a change introduced in PR
https://github.com/emilk/egui/pull/3660 that caused a regression with
`TextEdit::singleline`. The original PR attempted to fix an issue with
the cursor in `TextEdit` inside `ScrollArea`, but it did so by adding
unnecessary size allocation to `TextEdit`, which breaks the layout when
`TextEdit::singleline` is used outside of `ScrollArea`.


![Image](https://github.com/user-attachments/assets/78fdf20a-0763-4b5f-b83b-64522f15b35b)

The regression introduced by #3660 is more severe, as it completely
breaks the layout of applications using `TextEdit::singleline`, as shown
in the following issues:

*   Closes https://github.com/emilk/egui/issues/5500
*   Closes https://github.com/emilk/egui/issues/5597

Furthermore, I was unable to reproduce the original bug from PR #3660 in
the current version of egui using the following code:

```rust
impl eframe::App for MyEguiApp {
    fn update(&mut self, ctx: &egui::Context, _: &mut eframe::Frame) {
        ctx.set_debug_on_hover(true);
        egui::CentralPanel::default().show(ctx, |ui| {
            ScrollArea::vertical().max_height(100.0).show(ui, |ui| {
                ui.add(TextEdit::multiline(&mut self.text).hint_text("Enter text here..."))
            });
        });
    }
}
```

This code attempts to recreate the layout shown in the video from PR
#3660, using a `ScrollArea` with limited height and a `TextEdit` inside.
However, the cursor hiding issue was not reproducible.

![Video_2025-01-26_17-54-24](https://github.com/user-attachments/assets/ca4750ea-8af8-4ab5-8c10-bdf73a090362)

Therefore, I believe the code added in PR #3660 is no longer necessary
and only creates more problems.

*   Closes https://github.com/emilk/egui/issues/5500
*   Closes https://github.com/emilk/egui/issues/5597
*   [x] I have followed the instructions in the PR template
2025-03-03 09:22:01 +01:00
..
Bézier Curve.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Code Editor.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Code Example.png Fix sizing bug in `TextEdit::singleline` (#5640) 2025-03-03 09:22:01 +01:00
Context Menus.png Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
Dancing Strings.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Drag and Drop.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Extra Viewport.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Font Book.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Frame.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Highlighting.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Interactive Container.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Misc Demos.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Modals.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Multi Touch.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Painting.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Pan Zoom.png Change `Harness::run` to run until no more repaints are requested (#5580) 2025-01-07 08:33:44 +01:00
Panels.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Popups.png Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
Scene.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Screenshot.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Scrolling.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Sliders.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Strip.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Table.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Text Layout.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
TextEdit.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Tooltips.png Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
Undo Redo.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Window Options.png Add `Ui::close` and `Response::should_close` (#5729) 2025-02-20 17:59:29 +01:00