1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00:04 -04:00

Panel: never overflow available width, nor max_width (#8198)

* Closes https://github.com/emilk/egui/issues/8055
* Closes https://github.com/emilk/egui/pull/8056

This changes the behavior of `Panel` to NEVER overflow
`Panel::max_size`, nor the available space in the parent UI.

If you do overflow it, the content will be silently clipped.
This commit is contained in:
Emil Ernerfeldt
2026-05-26 10:54:38 +02:00
committed by GitHub
parent fc1b2a99fd
commit 0ce2b3699b
4 changed files with 171 additions and 30 deletions

View File

@@ -1,3 +1,6 @@
#![cfg(feature = "snapshot")]
#![cfg(feature = "wgpu")]
use egui::{Modifiers, ScrollArea, Vec2, include_image};
use egui_kittest::{Harness, SnapshotResults};
use kittest::Queryable as _;
@@ -122,6 +125,7 @@ fn test_scroll_harness() -> Harness<'static, bool> {
)
}
#[cfg(feature = "snapshot")]
#[test]
fn test_scroll_to_me() {
let mut harness = test_scroll_harness();