mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
Control Separator widths, and less clipping in ScrollArea (#2665)
* Add Separator::grow and Separator::shrink * Be more conservative with the clipping in ScrollArea:s * Add test of the growing separator * Improve test output * Update changelog * Add back a little bit more clipping * Make the minimum scroll handle length a bit longer * More clip rect tweaks
This commit is contained in:
@@ -85,6 +85,8 @@ fn lorem_ipsum(ui: &mut egui::Ui) {
|
||||
egui::Layout::top_down(egui::Align::LEFT).with_cross_justify(true),
|
||||
|ui| {
|
||||
ui.label(egui::RichText::new(crate::LOREM_IPSUM_LONG).small().weak());
|
||||
ui.add(egui::Separator::default().grow(8.0));
|
||||
ui.label(egui::RichText::new(crate::LOREM_IPSUM_LONG).small().weak());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,8 @@ fn test_egui_zero_window_size() {
|
||||
let clipped_primitives = ctx.tessellate(full_output.shapes);
|
||||
assert!(
|
||||
clipped_primitives.is_empty(),
|
||||
"There should be nothing to show"
|
||||
"There should be nothing to show, has at least one primitive with clip_rect: {:?}",
|
||||
clipped_primitives[0].clip_rect
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user