diff options
author | Alessandro Portale <[email protected]> | 2025-01-02 17:46:07 +0100 |
---|---|---|
committer | Alessandro Portale <[email protected]> | 2025-01-02 17:05:11 +0000 |
commit | 946dadfdb2a1b5273c6dcb276d3096dbd29538ed (patch) | |
tree | 0e61caefe5472b2ec245650ab41c4fe0ca425811 /src | |
parent | c8041374f2daa3cc52d8515af9ebac6595d9069c (diff) |
Core: Rename Button::Role::Medium* to Button::Role::Large*
The variations were renamed in Figma. Follow suit here in order to stay
aligned.
Change-Id: I797e00a3dfcdee4302e8b0b06d13392a1c0979bd
Reviewed-by: Cristian Adam <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/coreplugin/welcomepagehelper.cpp | 24 | ||||
-rw-r--r-- | src/plugins/coreplugin/welcomepagehelper.h | 6 | ||||
-rw-r--r-- | src/plugins/extensionmanager/extensionmanagerwidget.cpp | 2 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectwelcomepage.cpp | 2 | ||||
-rw-r--r-- | src/plugins/welcome/welcomeplugin.cpp | 4 |
5 files changed, 19 insertions, 19 deletions
diff --git a/src/plugins/coreplugin/welcomepagehelper.cpp b/src/plugins/coreplugin/welcomepagehelper.cpp index e569e8ca6e6..ead05cb3018 100644 --- a/src/plugins/coreplugin/welcomepagehelper.cpp +++ b/src/plugins/coreplugin/welcomepagehelper.cpp @@ -114,16 +114,16 @@ enum WidgetState { static const TextFormat &buttonTF(Button::Role role, WidgetState state) { using namespace WelcomePageHelpers; - static const TextFormat mediumPrimaryTF + static const TextFormat largePrimaryTF {Theme::Token_Basic_White, StyleHelper::UiElement::UiElementButtonMedium, Qt::AlignCenter | Qt::TextDontClip | Qt::TextShowMnemonic}; - static const TextFormat mediumSecondaryTF - {Theme::Token_Text_Default, mediumPrimaryTF.uiElement, mediumPrimaryTF.drawTextFlags}; + static const TextFormat largeSecondaryTF + {Theme::Token_Text_Default, largePrimaryTF.uiElement, largePrimaryTF.drawTextFlags}; static const TextFormat smallPrimaryTF - {mediumPrimaryTF.themeColor, StyleHelper::UiElement::UiElementButtonSmall, - mediumPrimaryTF.drawTextFlags}; + {largePrimaryTF.themeColor, StyleHelper::UiElement::UiElementButtonSmall, + largePrimaryTF.drawTextFlags}; static const TextFormat smallSecondaryTF - {mediumSecondaryTF.themeColor, smallPrimaryTF.uiElement, smallPrimaryTF.drawTextFlags}; + {largeSecondaryTF.themeColor, smallPrimaryTF.uiElement, smallPrimaryTF.drawTextFlags}; static const TextFormat smallListDefaultTF {Theme::Token_Text_Default, StyleHelper::UiElement::UiElementIconStandard, Qt::AlignLeft | Qt::AlignVCenter | Qt::TextDontClip | Qt::TextShowMnemonic}; @@ -140,8 +140,8 @@ static const TextFormat &buttonTF(Button::Role role, WidgetState state) {Theme::Token_Text_Default, tagDefaultTF.uiElement}; switch (role) { - case Button::MediumPrimary: return mediumPrimaryTF; - case Button::MediumSecondary: return mediumSecondaryTF; + case Button::LargePrimary: return largePrimaryTF; + case Button::LargeSecondary: return largeSecondaryTF; case Button::SmallPrimary: return smallPrimaryTF; case Button::SmallSecondary: return smallSecondaryTF; case Button::SmallList: return (state == WidgetStateDefault) ? smallListDefaultTF @@ -151,7 +151,7 @@ static const TextFormat &buttonTF(Button::Role role, WidgetState state) case Button::Tag: return (state == WidgetStateDefault) ? tagDefaultTF : tagHoverTF; } - return mediumPrimaryTF; + return largePrimaryTF; } Button::Button(const QString &text, Role role, QWidget *parent) @@ -215,7 +215,7 @@ void Button::paintEvent(QPaintEvent *event) const qreal brRectRounding = 3.75; switch (m_role) { - case MediumPrimary: + case LargePrimary: case SmallPrimary: { const Theme::Color color = isEnabled() ? (isDown() ? Theme::Token_Accent_Subtle @@ -226,7 +226,7 @@ void Button::paintEvent(QPaintEvent *event) drawCardBackground(&p, bgR, fill, QPen(Qt::NoPen), brRectRounding); break; } - case MediumSecondary: + case LargeSecondary: case SmallSecondary: { const Theme::Color color = isEnabled() ? Theme::Token_Stroke_Strong : Theme::Token_Stroke_Subtle; @@ -283,7 +283,7 @@ void Button::updateMargins() setContentsMargins(HPaddingXs, VPaddingXxs, HPaddingXs, VPaddingXxs); return; } - const bool tokenSizeS = m_role == MediumPrimary || m_role == MediumSecondary + const bool tokenSizeS = m_role == LargePrimary || m_role == LargeSecondary || m_role == SmallList || m_role == SmallLink; const int gap = tokenSizeS ? HGapS : HGapXs; const int hPaddingR = tokenSizeS ? HPaddingS : HPaddingXs; diff --git a/src/plugins/coreplugin/welcomepagehelper.h b/src/plugins/coreplugin/welcomepagehelper.h index 8ee3f50b371..60fad31910e 100644 --- a/src/plugins/coreplugin/welcomepagehelper.h +++ b/src/plugins/coreplugin/welcomepagehelper.h @@ -75,8 +75,8 @@ class CORE_EXPORT Button : public QAbstractButton { public: enum Role { - MediumPrimary, - MediumSecondary, + LargePrimary, + LargeSecondary, SmallPrimary, SmallSecondary, SmallList, @@ -96,7 +96,7 @@ protected: private: void updateMargins(); - const Role m_role = MediumPrimary; + const Role m_role = LargePrimary; QPixmap m_pixmap; }; diff --git a/src/plugins/extensionmanager/extensionmanagerwidget.cpp b/src/plugins/extensionmanager/extensionmanagerwidget.cpp index bd751148ee4..280cedacb63 100644 --- a/src/plugins/extensionmanager/extensionmanagerwidget.cpp +++ b/src/plugins/extensionmanager/extensionmanagerwidget.cpp @@ -150,7 +150,7 @@ public: m_dlCount->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); m_details = new ElidingLabel; applyTf(m_details, detailsTF); - installButton = new Button(Tr::tr("Install..."), Button::MediumPrimary); + installButton = new Button(Tr::tr("Install..."), Button::LargePrimary); installButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); installButton->hide(); diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp index 5a82d076e24..41c41b3f78e 100644 --- a/src/plugins/projectexplorer/projectwelcomepage.cpp +++ b/src/plugins/projectexplorer/projectwelcomepage.cpp @@ -827,7 +827,7 @@ public: auto sessions = new QWidget; { auto sessionsLabel = new Core::Label(Tr::tr("Sessions"), Core::Label::Primary); - auto manageSessionsButton = new Button(Tr::tr("Manage..."), Button::MediumSecondary); + auto manageSessionsButton = new Button(Tr::tr("Manage..."), Button::LargeSecondary); auto sessionsList = new TreeView(this, "Sessions"); sessionsList->setModel(projectWelcomePage->m_sessionModel); sessionsList->header()->setSectionHidden(1, true); // The "last modified" column. diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index d364519bd3a..1b2ef235f57 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -123,8 +123,8 @@ public: }; { - auto newButton = new Button(Tr::tr("Create Project..."), Button::MediumPrimary); - auto openButton = new Button(Tr::tr("Open Project..."), Button::MediumSecondary); + auto newButton = new Button(Tr::tr("Create Project..."), Button::LargePrimary); + auto openButton = new Button(Tr::tr("Open Project..."), Button::LargeSecondary); Column projectButtons { newButton, |