HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Friends
v1::theme Class Reference

Public Member Functions

 theme (theme const &) noexcept=default
 
 theme (theme &&) noexcept=default
 
themeoperator= (theme const &) noexcept=default
 
themeoperator= (theme &&) noexcept=default
 
 theme (hi::font_book const &font_book, URL const &url)
 Open and parse a theme file.
 
theme transform (float dpi) const noexcept
 Create a transformed copy of the theme.
 
hi::color color (hi::semantic_color original_color, ssize_t nesting_level=0) const noexcept
 
hi::color color (hi::color original_color, ssize_t nesting_level=0) const noexcept
 
hi::text_style text_style (semantic_text_style theme_color) const noexcept
 
hi::text_style text_style (hi::text_style original_style) const noexcept
 

Data Fields

operating_system operating_system = operating_system::windows
 
float dpi = 72
 The DPI of the size values.
 
float scale = 1.0f
 The scale factor used to convert pt to physical pixel size.
 
float margin = 4.5f
 Distance between widgets and between widgets and the border of the container.
 
float border_width = 1.0f
 The line-width of a border.
 
float rounding_radius = 4.0f
 The rounding radius of boxes with rounded corners.
 
float size = 11.0f
 The size of small square widgets.
 
float large_size = 18.5f
 The size of large widgets.
 
float icon_size = 7.5f
 Size of icons inside a widget.
 
float large_icon_size = 22.5f
 Size of icons representing the length of am average word of a label's text.
 
float label_icon_size = 15.0f
 Size of icons being inline with a label's text.
 
float cap_height = 8.6f
 The height of capital letters of the default text-style.
 
std::string name
 
theme_mode mode = theme_mode::light
 

Friends

std::string to_string (theme const &rhs) noexcept
 
std::ostreamoperator<< (std::ostream &lhs, theme const &rhs)
 

Constructor & Destructor Documentation

◆ theme()

v1::theme::theme ( hi::font_book const & font_book,
URL const & url )

Open and parse a theme file.

Member Function Documentation

◆ transform()

theme v1::theme::transform ( float dpi) const
noexcept

Create a transformed copy of the theme.

This function is used by the window, to make a specific version of the theme scaled to the dpi of the window.

It can also create a different version when the window becomes active/inactive mostly this will desaturate the colors in the theme.

Parameters
dpiThe dpi of the window.

Field Documentation

◆ border_width

float v1::theme::border_width = 1.0f

The line-width of a border.

◆ cap_height

float v1::theme::cap_height = 8.6f

The height of capital letters of the default text-style.

◆ dpi

float v1::theme::dpi = 72

The DPI of the size values.

◆ icon_size

float v1::theme::icon_size = 7.5f

Size of icons inside a widget.

◆ label_icon_size

float v1::theme::label_icon_size = 15.0f

Size of icons being inline with a label's text.

◆ large_icon_size

float v1::theme::large_icon_size = 22.5f

Size of icons representing the length of am average word of a label's text.

◆ large_size

float v1::theme::large_size = 18.5f

The size of large widgets.

Such as the minimum scroll bar size.

◆ margin

float v1::theme::margin = 4.5f

Distance between widgets and between widgets and the border of the container.

◆ rounding_radius

float v1::theme::rounding_radius = 4.0f

The rounding radius of boxes with rounded corners.

◆ scale

float v1::theme::scale = 1.0f

The scale factor used to convert pt to physical pixel size.

◆ size

float v1::theme::size = 11.0f

The size of small square widgets.


The documentation for this class was generated from the following file: