mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-23 00:19:18 +00:00
LibWeb: Merge StrokePathUsingPaintStyle and StrokePathUsingColor
Use `Variant<PaintStyle, Gfx::Color>` in new `StrokePath` instead of duplicating two almost identical display list items.
This commit is contained in:
parent
e41c85ec47
commit
5c11a541d3
Notes:
github-actions[bot]
2025-08-03 08:43:52 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 5c11a541d3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5685
Reviewed-by: https://github.com/gmta ✅
12 changed files with 37 additions and 114 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Painting/DisplayListRecorder.h>
|
||||
#include <LibWeb/Painting/MediaPaintable.h>
|
||||
#include <LibWeb/Painting/PaintStyle.h>
|
||||
#include <LibWeb/UIEvents/MouseButton.h>
|
||||
|
||||
namespace Web::Painting {
|
||||
|
@ -242,7 +243,7 @@ void MediaPaintable::paint_control_bar_speaker(DisplayListRecordingContext& cont
|
|||
.dash_array = {},
|
||||
.dash_offset = 0,
|
||||
.path = path,
|
||||
.color = speaker_button_color,
|
||||
.paint_style_or_color = speaker_button_color,
|
||||
.thickness = 1,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue