mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
Fix unpainted area in Button rendering.
This commit is contained in:
parent
783c64916b
commit
db0dbbd979
Notes:
sideshowbarker
2024-07-19 16:04:35 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/db0dbbd9799
1 changed files with 2 additions and 2 deletions
|
@ -38,14 +38,14 @@ void Button::paintEvent(PaintEvent&)
|
|||
|
||||
if (m_beingPressed) {
|
||||
// Base
|
||||
painter.fillRect({ 1, 1, width() - 2, height() - 2 }, buttonColor);
|
||||
painter.fillRect({ 1, 1, width() - 1, height() - 1 }, buttonColor);
|
||||
|
||||
// Sunken shadow
|
||||
painter.drawLine({ 1, 1 }, { width() - 2, 1 }, shadowColor);
|
||||
painter.drawLine({ 1, 2 }, {1, height() - 2 }, shadowColor);
|
||||
} else {
|
||||
// Base
|
||||
painter.fillRect({ 3, 3, width() - 6, height() - 6 }, buttonColor);
|
||||
painter.fillRect({ 3, 3, width() - 5, height() - 5 }, buttonColor);
|
||||
|
||||
// White highlight
|
||||
painter.drawLine({ 1, 1 }, { width() - 2, 1 }, highlightColor);
|
||||
|
|
Loading…
Add table
Reference in a new issue