mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
This commit is contained in:
parent
63814ffebf
commit
04b9dc2d30
328 changed files with 36 additions and 36 deletions
32
Libraries/LibGUI/GFrame.h
Normal file
32
Libraries/LibGUI/GFrame.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <SharedGraphics/StylePainter.h>
|
||||
|
||||
class GFrame : public GWidget {
|
||||
public:
|
||||
explicit GFrame(GWidget* parent = nullptr);
|
||||
virtual ~GFrame() override;
|
||||
|
||||
int frame_thickness() const { return m_thickness; }
|
||||
void set_frame_thickness(int thickness) { m_thickness = thickness; }
|
||||
|
||||
FrameShadow frame_shadow() const { return m_shadow; }
|
||||
void set_frame_shadow(FrameShadow shadow) { m_shadow = shadow; }
|
||||
|
||||
FrameShape frame_shape() const { return m_shape; }
|
||||
void set_frame_shape(FrameShape shape) { m_shape = shape; }
|
||||
|
||||
Rect frame_inner_rect_for_size(const Size& size) const { return { m_thickness, m_thickness, size.width() - m_thickness * 2, size.height() - m_thickness * 2 }; }
|
||||
Rect frame_inner_rect() const { return frame_inner_rect_for_size(size()); }
|
||||
|
||||
virtual const char* class_name() const override { return "GFrame"; }
|
||||
|
||||
protected:
|
||||
void paint_event(GPaintEvent&) override;
|
||||
|
||||
private:
|
||||
int m_thickness { 0 };
|
||||
FrameShadow m_shadow { FrameShadow::Plain };
|
||||
FrameShape m_shape { FrameShape::NoFrame };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue