Start adding themed buttons.
This commit is contained in:
parent
dfbc87cb09
commit
942cc2539c
18 changed files with 781 additions and 173 deletions
72
src/ui/ui_elements/style/FontTokens.h
Normal file
72
src/ui/ui_elements/style/FontTokens.h
Normal file
|
@ -0,0 +1,72 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Theme
|
||||
{
|
||||
namespace Ref
|
||||
{
|
||||
namespace Typeface
|
||||
{
|
||||
enum class Font
|
||||
{
|
||||
Plain,
|
||||
Brand
|
||||
};
|
||||
|
||||
enum class Weight
|
||||
{
|
||||
Weight_Regular,
|
||||
Weight_Medium
|
||||
};
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace Theme
|
||||
{
|
||||
namespace Sys
|
||||
{
|
||||
enum class Typescale
|
||||
{
|
||||
Display_Large,
|
||||
Display_Medium,
|
||||
Display_Small,
|
||||
Headline_Large,
|
||||
Headline_Medium,
|
||||
Headline_Small,
|
||||
Title_Large,
|
||||
Title_Medium,
|
||||
Title_Small,
|
||||
Label_Large,
|
||||
Label_Medium,
|
||||
Label_Small,
|
||||
Body_Large,
|
||||
Body_Medium,
|
||||
Body_Small,
|
||||
Label_Large,
|
||||
Label_Medium,
|
||||
Label_Small
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class FontTokens
|
||||
{
|
||||
static std::string getFont(Theme::Ref::Typeface::Font font);
|
||||
|
||||
static Theme::Ref::Typeface::Font getFont(Theme::Sys::Typescale typescale);
|
||||
|
||||
static unsigned getLineHeight(Theme::Sys::Typescale typescale);
|
||||
|
||||
static unsigned getSize(Theme::Sys::Typescale typescale);
|
||||
|
||||
static unsigned getTracking(Theme::Sys::Typescale typescale);
|
||||
|
||||
static unsigned getWeight(Theme::Ref::Typeface::Font font);
|
||||
|
||||
static Theme::Ref::Typeface::Font getWeight(Theme::Sys::Typescale typescale);
|
||||
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue