1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:47:35 +00:00

LibGUI: Move frame painting from GFrame to StylePainter.

This way it can be used by others who might not have a GFrame object.
This commit is contained in:
Andreas Kling 2019-04-10 03:43:46 +02:00
parent e61dd994df
commit 4ab0cd5d4c
16 changed files with 93 additions and 88 deletions

View file

@ -4,9 +4,12 @@ class Painter;
class Rect;
enum class ButtonStyle { Normal, CoolBar, OldNormal };
enum class FrameShadow { Plain, Raised, Sunken };
enum class FrameShape { NoFrame, Container, Panel, VerticalLine, HorizontalLine };
class StylePainter {
public:
static void paint_button(Painter&, const Rect&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false);
static void paint_surface(Painter&, const Rect&, bool paint_vertical_lines = true);
static void paint_frame(Painter&, const Rect&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false);
};