From 6cc66d2db7e869ea47c18708d97dc168143768c8 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Sun, 28 Jan 2024 23:15:32 +0100 Subject: [PATCH] Utils: Add "Spacing tokens" to StyleHelper The spacing tokens are defined by the design team and used in the Figma design specifications. Change-Id: I9930d1471ac04ffe6826b900d8154f873c6710a3 Reviewed-by: Cristian Adam --- src/libs/utils/stylehelper.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/libs/utils/stylehelper.h b/src/libs/utils/stylehelper.h index d9b17255783..30920bf0ba6 100644 --- a/src/libs/utils/stylehelper.h +++ b/src/libs/utils/stylehelper.h @@ -41,6 +41,33 @@ constexpr char C_TOOLBAR_ACTIONWIDGET[] = "toolbar_actionWidget"; constexpr char C_QT_SCALE_FACTOR_ROUNDING_POLICY[] = "QT_SCALE_FACTOR_ROUNDING_POLICY"; +namespace SpacingTokens { + constexpr int VPaddingXXS = 4; // Top and bottom padding within the component + constexpr int HPaddingXXS = 4; // Left and right padding within the component + constexpr int VGapXXS = 4; // Vertical Space between TEXT LINE within the Component + constexpr int HGapXXS = 4; // Horizontal Space between elements within the Component + + constexpr int VPaddingXS = 8; + constexpr int HPaddingXS = 8; + constexpr int VGapXS = 4; + constexpr int HGapXS = 8; + + constexpr int VPaddingS = 8; + constexpr int HPaddingS = 16; + constexpr int VGapS = 4; + constexpr int HGapS = 8; + + constexpr int VPaddingM = 16; + constexpr int HPaddingM = 24; + constexpr int VGapM = 4; + constexpr int HGapM = 16; + + constexpr int VPaddingL = 12; + constexpr int HPaddingL = 24; + constexpr int VGapL = 8; + constexpr int HGapL = 16; +} + enum ToolbarStyle { ToolbarStyleCompact, ToolbarStyleRelaxed,