mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibHTML: Rename LayoutStyle => ComputedStyle.
This commit is contained in:
parent
c7cf6f00fc
commit
4b82ac3c8e
5 changed files with 17 additions and 17 deletions
47
LibHTML/Layout/ComputedStyle.h
Normal file
47
LibHTML/Layout/ComputedStyle.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibHTML/CSS/LengthBox.h>
|
||||
#include <SharedGraphics/Color.h>
|
||||
#include <SharedGraphics/Size.h>
|
||||
|
||||
enum FontStyle {
|
||||
Normal,
|
||||
Bold,
|
||||
};
|
||||
|
||||
class ComputedStyle {
|
||||
public:
|
||||
ComputedStyle();
|
||||
~ComputedStyle();
|
||||
|
||||
Color text_color() const { return m_text_color; }
|
||||
Color background_color() const { return m_background_color; }
|
||||
|
||||
LengthBox& offset() { return m_offset; }
|
||||
LengthBox& margin() { return m_margin; }
|
||||
LengthBox& padding() { return m_padding; }
|
||||
LengthBox& border() { return m_border; }
|
||||
|
||||
const LengthBox& offset() const { return m_offset; }
|
||||
const LengthBox& margin() const { return m_margin; }
|
||||
const LengthBox& padding() const { return m_padding; }
|
||||
const LengthBox& border() const { return m_border; }
|
||||
|
||||
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;
|
||||
|
||||
LengthBox m_offset;
|
||||
LengthBox m_margin;
|
||||
LengthBox m_padding;
|
||||
LengthBox m_border;
|
||||
|
||||
Size m_size;
|
||||
|
||||
FontStyle m_font_style { FontStyle::Normal };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue