Utils: Update Figma text tokens

This adds UiElementLabelMedium and UiElementLabelSmall.

Change-Id: I592f2bdf7a4d0a98e38ea69c33cf1b27040f7eea
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2024-06-05 13:50:19 +02:00
parent 152307a758
commit 0650fe14e5
4 changed files with 10 additions and 0 deletions

View File

@@ -950,6 +950,8 @@ static const UiFontMetrics& uiFontMetrics(StyleHelper::UiElement element)
{StyleHelper::UiElementBody2, {12, 20, QFont::Light}},
{StyleHelper::UiElementButtonMedium, {12, 16, QFont::Bold}},
{StyleHelper::UiElementButtonSmall, {10, 12, QFont::Bold}},
{StyleHelper::UiElementLabelMedium, {12, 16, QFont::DemiBold}},
{StyleHelper::UiElementLabelSmall, {10, 12, QFont::DemiBold}},
{StyleHelper::UiElementCaptionStrong, {10, 12, QFont::DemiBold}},
{StyleHelper::UiElementCaption, {10, 12, QFont::Normal}},
{StyleHelper::UiElementIconStandard, {12, 16, QFont::Medium}},

View File

@@ -79,6 +79,8 @@ enum ToolbarStyle {
};
constexpr ToolbarStyle defaultToolbarStyle = ToolbarStyleCompact;
// Keep in sync with:
// SyleHelper::uiFontMetrics, ICore::uiConfigInformation, tst_manual_widgets_uifonts::main
enum UiElement {
UiElementH1,
UiElementH2,
@@ -91,6 +93,8 @@ enum UiElement {
UiElementBody2,
UiElementButtonMedium,
UiElementButtonSmall,
UiElementLabelMedium,
UiElementLabelSmall,
UiElementCaptionStrong,
UiElementCaption,
UiElementIconStandard,

View File

@@ -1068,6 +1068,8 @@ QString uiConfigInformation()
QTC_ADD_UIELEMENT_FONT(Body2);
QTC_ADD_UIELEMENT_FONT(ButtonMedium);
QTC_ADD_UIELEMENT_FONT(ButtonSmall);
QTC_ADD_UIELEMENT_FONT(LabelMedium);
QTC_ADD_UIELEMENT_FONT(LabelSmall);
QTC_ADD_UIELEMENT_FONT(CaptionStrong);
QTC_ADD_UIELEMENT_FONT(Caption);
QTC_ADD_UIELEMENT_FONT(IconStandard);

View File

@@ -29,6 +29,8 @@ int main(int argc, char *argv[])
{ StyleHelper::UiElementBody2, "Body-02" },
{ StyleHelper::UiElementButtonMedium, "Button Medium" },
{ StyleHelper::UiElementButtonSmall, "Button Small" },
{ StyleHelper::UiElementLabelMedium, "Label Medium" },
{ StyleHelper::UiElementLabelSmall, "Label Small" },
{ StyleHelper::UiElementCaptionStrong, "Caption strong" },
{ StyleHelper::UiElementCaption, "Caption" },
{ StyleHelper::UiElementIconStandard, "Icon Standard" },