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

Fix sign error

This commit is contained in:
Emil Ernerfeldt
2025-11-16 12:21:32 +01:00
parent bf190d6a2d
commit 7a4dc35929

View File

@@ -664,12 +664,12 @@ impl Panel {
// TODO(emilk): draw line on top of all panels in this ui when https://github.com/emilk/egui/issues/1516 is done // TODO(emilk): draw line on top of all panels in this ui when https://github.com/emilk/egui/issues/1516 is done
match side { match side {
PanelSide::Vertical(side) => { PanelSide::Vertical(side) => {
let x = side.x_coord(rect) + 0.5 * side.sign() * stroke.width; let x = side.opposite().x_coord(rect) + 0.5 * side.sign() * stroke.width;
ui.painter() ui.painter()
.vline(x, panel_sizer.panel_rect.y_range(), stroke); .vline(x, panel_sizer.panel_rect.y_range(), stroke);
} }
PanelSide::Horizontal(side) => { PanelSide::Horizontal(side) => {
let y = side.y_coord(rect) + 0.5 * side.sign() * stroke.width; let y = side.opposite().y_coord(rect) + 0.5 * side.sign() * stroke.width;
ui.painter() ui.painter()
.hline(panel_sizer.panel_rect.x_range(), y, stroke); .hline(panel_sizer.panel_rect.x_range(), y, stroke);
} }