mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Paint panel separators ontop of everything
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user