diff --git a/crates/egui/src/containers/panel.rs b/crates/egui/src/containers/panel.rs index 980ca5cb..a0644fcf 100644 --- a/crates/egui/src/containers/panel.rs +++ b/crates/egui/src/containers/panel.rs @@ -306,12 +306,12 @@ impl SidePanel { } else { Stroke::NONE }; - // TODO(emilk): draw line on top of all panels in this ui when https://github.com/emilk/egui/issues/1516 is done - // In the meantime: nudge the line so its inside the panel, so it won't be covered by neighboring panel - // (hence the shrink). - let resize_x = side.opposite().side_x(rect.shrink(1.0)); + let resize_x = side.opposite().side_x(rect); let resize_x = ui.painter().round_to_pixel(resize_x); - ui.painter().vline(resize_x, rect.y_range(), stroke); + ui.painter() + .clone() + .with_z(layers::ZOrder::ABOVE_ALL) + .vline(resize_x, rect.y_range(), stroke); } inner_response @@ -757,12 +757,12 @@ impl TopBottomPanel { } else { Stroke::NONE }; - // TODO(emilk): draw line on top of all panels in this ui when https://github.com/emilk/egui/issues/1516 is done - // In the meantime: nudge the line so its inside the panel, so it won't be covered by neighboring panel - // (hence the shrink). - let resize_y = side.opposite().side_y(rect.shrink(1.0)); + let resize_y = side.opposite().side_y(rect); let resize_y = ui.painter().round_to_pixel(resize_y); - ui.painter().hline(rect.x_range(), resize_y, stroke); + ui.painter() + .clone() + .with_z(layers::ZOrder::ABOVE_ALL) + .hline(rect.x_range(), resize_y, stroke); } inner_response