Utils: Add two fonts to StyleHelper::UIElement

Change-Id: I0b4ff271ef9fe91eb369c916ad886c7d39c2e060
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Alessandro Portale
2024-01-28 23:37:30 +01:00
parent 4d56f9b840
commit 03db2fd6c5
3 changed files with 6 additions and 0 deletions

View File

@@ -961,6 +961,8 @@ static const UiFontMetrics& uiFontMetrics(StyleHelper::UiElement element)
{StyleHelper::UiElementH6Capital, {12, 14, QFont::DemiBold}},
{StyleHelper::UiElementCaptionStrong, {10, 12, QFont::DemiBold}},
{StyleHelper::UiElementCaption, {10, 12, QFont::Normal}},
{StyleHelper::UIElementIconStandard, {12, 16, QFont::Normal}},
{StyleHelper::UIElementIconActive, {12, 16, QFont::DemiBold}},
};
QTC_ASSERT(metrics.count(element) > 0, return metrics.at(StyleHelper::UiElementCaptionStrong));
return metrics.at(element);

View File

@@ -84,6 +84,8 @@ enum UiElement {
UiElementH6Capital,
UiElementCaptionStrong,
UiElementCaption,
UIElementIconStandard,
UIElementIconActive,
};
// Height of the project explorer navigation bar

View File

@@ -27,6 +27,8 @@ int main(int argc, char *argv[])
{ StyleHelper::UiElementH6Capital, "H6 CAPITAL" },
{ StyleHelper::UiElementCaptionStrong, "Caption strong" },
{ StyleHelper::UiElementCaption, "Caption" },
{ StyleHelper::UIElementIconStandard, "Icon Standard" },
{ StyleHelper::UIElementIconActive, "Icon Active" },
};
static const QString textSample("AaBbCcXxYyZz123");