mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
LibHTML: Add a Frame class, start fleshing out recursive layout.
Layout is initiated from Frame::layout(). It makes the document's layout node as wide as the frame, and then we'll take it from there.
This commit is contained in:
parent
f49e5c6732
commit
0db2f3cbe6
9 changed files with 91 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <SharedGraphics/Color.h>
|
||||
#include <SharedGraphics/Size.h>
|
||||
|
||||
struct Box {
|
||||
int top { 0 };
|
||||
|
@ -32,6 +33,9 @@ public:
|
|||
|
||||
FontStyle font_style() const { return m_font_style; }
|
||||
|
||||
const Size& size() const { return m_size; }
|
||||
Size& size() { return m_size; }
|
||||
|
||||
private:
|
||||
Color m_text_color;
|
||||
Color m_background_color;
|
||||
|
@ -40,5 +44,7 @@ private:
|
|||
Box m_margin;
|
||||
Box m_padding;
|
||||
|
||||
Size m_size;
|
||||
|
||||
FontStyle m_font_style { FontStyle::Normal };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue