1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

WindowServer: Align menu separators correctly

These were off by one vertically, oops!
This commit is contained in:
Andreas Kling 2019-08-26 20:53:33 +02:00
parent 11bb88f513
commit 0f48e3b007

View file

@ -164,8 +164,8 @@ void WSMenu::draw()
painter.draw_text(item.rect().translated(-right_padding(), 0), item.shortcut_text(), TextAlignment::CenterRight, text_color);
}
} else if (item.type() == WSMenuItem::Separator) {
Point p1(item.rect().translated(stripe_rect.width() + 4, 0).x(), item.rect().center().y());
Point p2(width - 7, item.rect().center().y());
Point p1(item.rect().translated(stripe_rect.width() + 4, 0).x(), item.rect().center().y() - 1);
Point p2(width - 7, item.rect().center().y() - 1);
painter.draw_line(p1, p2, Color::MidGray);
painter.draw_line(p1.translated(0, 1), p2.translated(0, 1), Color::White);
}