1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

Minor GUI API things + make Button corners properly transparent.

This commit is contained in:
Andreas Kling 2019-01-13 06:25:30 +01:00
parent f7261d7b26
commit 1d914cbd84
5 changed files with 10 additions and 14 deletions

View file

@ -4,6 +4,7 @@
Button::Button(Widget* parent)
: Widget(parent)
{
setFillWithBackgroundColor(false);
}
Button::~Button()
@ -26,11 +27,6 @@ void Button::paintEvent(PaintEvent&)
Painter painter(*this);
painter.set_pixel({ 0, 0 }, backgroundColor());
painter.set_pixel({ width() - 1, 0 }, backgroundColor());
painter.set_pixel({ 0, height() - 1 }, backgroundColor());
painter.set_pixel({ width() - 1, height() - 1 }, backgroundColor());
painter.draw_line({ 1, 0 }, { width() - 2, 0 }, Color::Black);
painter.draw_line({ 1, height() - 1 }, { width() - 2, height() - 1}, Color::Black);
painter.draw_line({ 0, 1 }, { 0, height() - 2 }, Color::Black);