File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ class Theme : public QQuickAttachedPropertyPropagator
1111 Q_OBJECT
1212
1313 Q_PROPERTY (qreal defaultPadding READ defaultPadding CONSTANT)
14+
15+ Q_PROPERTY (qreal defaultXlPadding READ defaultXlPadding CONSTANT)
16+ Q_PROPERTY (qreal defaultBigPadding READ defaultBigPadding CONSTANT)
17+ Q_PROPERTY (qreal defaultHalfPadding READ defaultHalfPadding CONSTANT)
18+ Q_PROPERTY (qreal defaultSmallPadding READ defaultSmallPadding CONSTANT)
19+
1420 Q_PROPERTY (qreal padding READ padding WRITE setPadding
1521 RESET resetPadding NOTIFY paddingChanged)
1622 Q_PROPERTY (qreal xlPadding READ xlPadding NOTIFY paddingChanged)
@@ -64,6 +70,11 @@ class Theme : public QQuickAttachedPropertyPropagator
6470
6571 // paddings
6672 qreal defaultPadding () const ;
73+ qreal defaultXlPadding () const ;
74+ qreal defaultBigPadding () const ;
75+ qreal defaultHalfPadding () const ;
76+ qreal defaultSmallPadding () const ;
77+
6778 qreal padding () const ;
6879 qreal xlPadding () const ;
6980 qreal bigPadding () const ;
Original file line number Diff line number Diff line change @@ -33,6 +33,22 @@ qreal Theme::defaultPadding() const {
3333 return s_defaultPadding;
3434}
3535
36+ qreal Theme::defaultXlPadding () const {
37+ return s_defaultPadding * s_xlPaddingFactor;
38+ }
39+
40+ qreal Theme::defaultBigPadding () const {
41+ return s_defaultPadding * s_bigPaddingFactor;
42+ }
43+
44+ qreal Theme::defaultHalfPadding () const {
45+ return s_defaultPadding * s_halfPaddingFactor;
46+ }
47+
48+ qreal Theme::defaultSmallPadding () const {
49+ return s_defaultPadding * s_smallPaddingFactor;
50+ }
51+
3652qreal Theme::padding () const {
3753 return m_padding;
3854}
You can’t perform that action at this time.
0 commit comments