Paint panel separators ontop of everything
This commit is contained in:
parent
ac6344c104
commit
cb051425ff
1 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue