mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
LibGfx+Userland: Merge FrameShape and FrameShadow into FrameStyle
Previously, Frames could set both these properties along with a thickness to confusing effect: Most shapes of the same shadowing only differentiated at a thickness >= 2, and some not at all. This led to a lot of creative but ultimately superfluous choices in the code. Instead let's streamline our options, automate thickness, and get the right look without so much guesswork. Plain shadowing has been consolidated into a single Plain style, and 0 thickness can be had by setting style to NoFrame.
This commit is contained in:
parent
4c9933bfb7
commit
f7e034d4b2
58 changed files with 148 additions and 208 deletions
|
@ -28,9 +28,9 @@ void StylePainter::paint_button(Painter& painter, IntRect const& rect, Palette c
|
|||
current().paint_button(painter, rect, palette, button_style, pressed, hovered, checked, enabled, focused, default_button);
|
||||
}
|
||||
|
||||
void StylePainter::paint_frame(Painter& painter, IntRect const& rect, Palette const& palette, FrameShape shape, FrameShadow shadow, int thickness, bool skip_vertical_lines)
|
||||
void StylePainter::paint_frame(Painter& painter, IntRect const& rect, Palette const& palette, FrameStyle style, bool skip_vertical_lines)
|
||||
{
|
||||
current().paint_frame(painter, rect, palette, shape, shadow, thickness, skip_vertical_lines);
|
||||
current().paint_frame(painter, rect, palette, style, skip_vertical_lines);
|
||||
}
|
||||
|
||||
void StylePainter::paint_window_frame(Painter& painter, IntRect const& rect, Palette const& palette)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue