Fluid 1.3.0
Material Design for QtQuick and Qml
Loading...
Searching...
No Matches
measurementtokens.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// SPDX-License-Identifier: MPL-2.0
3
4#pragma once
5
6#include <QtCore/qobject.h>
7#include <QtQml/qqmlregistration.h>
8
9namespace Fluid {
10
11// The minimum interaction target follows AndroidX LocalMinimumInteractiveComponentSize:
12// https://raw.githubusercontent.com/androidx/androidx/androidx-main/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/InteractiveComponentSize.kt
13
26{
27 Q_GADGET
28 QML_ANONYMOUS
29
30 Q_PROPERTY(qreal minimumInteractiveSize READ minimumInteractiveSize CONSTANT FINAL)
31 Q_PROPERTY(qreal space0 READ space0 CONSTANT FINAL)
32 Q_PROPERTY(qreal space25 READ space25 CONSTANT FINAL)
33 Q_PROPERTY(qreal space50 READ space50 CONSTANT FINAL)
34 Q_PROPERTY(qreal space75 READ space75 CONSTANT FINAL)
35 Q_PROPERTY(qreal space100 READ space100 CONSTANT FINAL)
36 Q_PROPERTY(qreal space125 READ space125 CONSTANT FINAL)
37 Q_PROPERTY(qreal space150 READ space150 CONSTANT FINAL)
38 Q_PROPERTY(qreal space175 READ space175 CONSTANT FINAL)
39 Q_PROPERTY(qreal space200 READ space200 CONSTANT FINAL)
40 Q_PROPERTY(qreal space250 READ space250 CONSTANT FINAL)
41 Q_PROPERTY(qreal space300 READ space300 CONSTANT FINAL)
42 Q_PROPERTY(qreal space400 READ space400 CONSTANT FINAL)
43 Q_PROPERTY(qreal space450 READ space450 CONSTANT FINAL)
44 Q_PROPERTY(qreal space500 READ space500 CONSTANT FINAL)
45 Q_PROPERTY(qreal space600 READ space600 CONSTANT FINAL)
46 Q_PROPERTY(qreal space700 READ space700 CONSTANT FINAL)
47 Q_PROPERTY(qreal space800 READ space800 CONSTANT FINAL)
48 Q_PROPERTY(qreal space900 READ space900 CONSTANT FINAL)
49
50public:
52 constexpr qreal minimumInteractiveSize() const
53 {
54 return 48.0;
55 }
56 constexpr qreal space0() const
57 {
58 return space100() * 0.0;
59 }
60 constexpr qreal space25() const
61 {
62 return space100() * 0.25;
63 }
64 constexpr qreal space50() const
65 {
66 return space100() * 0.5;
67 }
68 constexpr qreal space75() const
69 {
70 return space100() * 0.75;
71 }
72 constexpr qreal space100() const
73 {
74 return 8.0;
75 }
76 constexpr qreal space125() const
77 {
78 return space100() * 1.25;
79 }
80 constexpr qreal space150() const
81 {
82 return space100() * 1.5;
83 }
84 constexpr qreal space175() const
85 {
86 return space100() * 1.75;
87 }
88 constexpr qreal space200() const
89 {
90 return space100() * 2.0;
91 }
92 constexpr qreal space250() const
93 {
94 return space100() * 2.5;
95 }
96 constexpr qreal space300() const
97 {
98 return space100() * 3.0;
99 }
100 constexpr qreal space400() const
101 {
102 return space100() * 4.0;
103 }
104 constexpr qreal space450() const
105 {
106 return space100() * 4.5;
107 }
108 constexpr qreal space500() const
109 {
110 return space100() * 5.0;
111 }
112 constexpr qreal space600() const
113 {
114 return space100() * 6.0;
115 }
116 constexpr qreal space700() const
117 {
118 return space100() * 7.0;
119 }
120 constexpr qreal space800() const
121 {
122 return space100() * 8.0;
123 }
124 constexpr qreal space900() const
125 {
126 return space100() * 9.0;
127 }
128};
129
130} // namespace Fluid
Material Design 3 system measurement tokens.
constexpr qreal space200() const
constexpr qreal space400() const
constexpr qreal space150() const
constexpr qreal space250() const
QML_ANONYMOUSqreal minimumInteractiveSize
constexpr qreal space450() const
constexpr qreal space125() const
constexpr qreal space800() const
constexpr qreal space25() const
constexpr qreal space900() const
constexpr qreal space600() const
constexpr qreal space75() const
constexpr qreal space50() const
constexpr qreal space700() const
constexpr qreal space500() const
constexpr qreal space100() const
constexpr qreal space300() const
constexpr qreal space175() const
constexpr qreal space0() const