diff options
Diffstat (limited to 'Userland/Libraries/LibGUI/Frame.h')
-rw-r--r-- | Userland/Libraries/LibGUI/Frame.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/Userland/Libraries/LibGUI/Frame.h b/Userland/Libraries/LibGUI/Frame.h index e1be22501b..c0dd9ef6f6 100644 --- a/Userland/Libraries/LibGUI/Frame.h +++ b/Userland/Libraries/LibGUI/Frame.h @@ -17,18 +17,14 @@ class Frame : public Widget { public: virtual ~Frame() override = default; - int frame_thickness() const { return m_thickness; } - void set_frame_thickness(int thickness); + int frame_thickness() const; virtual Margins content_margins() const override { return { frame_thickness() }; } - Gfx::FrameShadow frame_shadow() const { return m_shadow; } - void set_frame_shadow(Gfx::FrameShadow shadow) { m_shadow = shadow; } + Gfx::FrameStyle frame_style() const { return m_style; } + void set_frame_style(Gfx::FrameStyle); - Gfx::FrameShape frame_shape() const { return m_shape; } - void set_frame_shape(Gfx::FrameShape shape) { m_shape = shape; } - - Gfx::IntRect frame_inner_rect_for_size(Gfx::IntSize size) const { return { m_thickness, m_thickness, size.width() - m_thickness * 2, size.height() - m_thickness * 2 }; } + Gfx::IntRect frame_inner_rect_for_size(Gfx::IntSize size) const { return { frame_thickness(), frame_thickness(), size.width() - frame_thickness() * 2, size.height() - frame_thickness() * 2 }; } Gfx::IntRect frame_inner_rect() const { return frame_inner_rect_for_size(size()); } virtual Gfx::IntRect children_clip_rect() const override; @@ -38,9 +34,7 @@ protected: void paint_event(PaintEvent&) override; private: - int m_thickness { 0 }; - Gfx::FrameShadow m_shadow { Gfx::FrameShadow::Plain }; - Gfx::FrameShape m_shape { Gfx::FrameShape::NoFrame }; + Gfx::FrameStyle m_style { Gfx::FrameStyle::NoFrame }; }; } |