QmlMaterial
0.1.0
Loading...
Searching...
No Matches
include
qml_material
token
segmented_button.hpp
1
#pragma once
2
3
#include <QtQml/QQmlEngine>
4
#include "qml_material/core.hpp"
5
6
namespace
qml_material::token
7
{
8
15
struct
SegmentedButtonSizeItem
{
16
Q_GADGET
17
QML_ELEMENT
18
QML_VALUE_TYPE(segmented_button_size_item)
19
20
21
Q_PROPERTY(qreal
container_height
MEMBER
container_height
CONSTANT FINAL)
23
Q_PROPERTY(qreal
icon_size
MEMBER
icon_size
CONSTANT FINAL)
25
Q_PROPERTY(qreal
leading_space
MEMBER
leading_space
CONSTANT FINAL)
27
Q_PROPERTY(qreal
trailing_space
MEMBER
trailing_space
CONSTANT FINAL)
29
Q_PROPERTY(qreal
icon_label_space
MEMBER
icon_label_space
CONSTANT FINAL)
31
Q_PROPERTY(qreal
outline_width
MEMBER
outline_width
CONSTANT FINAL)
32
33
public:
34
qreal
container_height
;
35
qreal
icon_size
;
36
qreal
leading_space
;
37
qreal
trailing_space
;
38
qreal
icon_label_space
;
39
qreal
outline_width
;
40
};
41
45
struct
SegmentedButtonSize
{
46
Q_GADGET
47
QML_ELEMENT
48
QML_VALUE_TYPE(segmented_button_size)
49
50
Q_PROPERTY(
qml_material::token::SegmentedButtonSizeItem
xsmall MEMBER xsmall CONSTANT FINAL)
51
Q_PROPERTY(
qml_material::token::SegmentedButtonSizeItem
small MEMBER small CONSTANT FINAL)
52
Q_PROPERTY(
qml_material::token::SegmentedButtonSizeItem
medium MEMBER medium CONSTANT FINAL)
53
Q_PROPERTY(
qml_material::token::SegmentedButtonSizeItem
large MEMBER large CONSTANT FINAL)
54
Q_PROPERTY(
qml_material::token::SegmentedButtonSizeItem
xlarge MEMBER xlarge CONSTANT FINAL)
55
56
public
:
57
SegmentedButtonSizeItem
xsmall {
58
32.0,
// container_height
59
20.0,
// icon_size
60
12.0,
// leading_space
61
12.0,
// trailing_space
62
8.0,
// icon_label_space
63
1.0
// outline_width
64
};
65
SegmentedButtonSizeItem
small {
66
40.0,
// container_height
67
20.0,
// icon_size
68
16.0,
// leading_space
69
16.0,
// trailing_space
70
8.0,
// icon_label_space
71
1.0
// outline_width
72
};
73
SegmentedButtonSizeItem
medium {
74
56.0,
// container_height
75
24.0,
// icon_size
76
24.0,
// leading_space
77
24.0,
// trailing_space
78
8.0,
// icon_label_space
79
1.0
// outline_width
80
};
81
SegmentedButtonSizeItem
large {
82
96.0,
// container_height
83
32.0,
// icon_size
84
48.0,
// leading_space
85
48.0,
// trailing_space
86
12.0,
// icon_label_space
87
2.0
// outline_width
88
};
89
SegmentedButtonSizeItem
xlarge {
90
136.0,
// container_height
91
40.0,
// icon_size
92
64.0,
// leading_space
93
64.0,
// trailing_space
94
16.0,
// icon_label_space
95
3.0
// outline_width
96
};
97
};
98
99
}
// namespace qml_material::token
qml_material::token::SegmentedButtonSizeItem
Segmented button size tokens for a specific size class.
Definition
segmented_button.hpp:15
qml_material::token::SegmentedButtonSizeItem::leading_space
qreal leading_space
Leading space / padding-start (dp)
Definition
segmented_button.hpp:25
qml_material::token::SegmentedButtonSizeItem::icon_label_space
qreal icon_label_space
Spacing between icon and label (dp)
Definition
segmented_button.hpp:29
qml_material::token::SegmentedButtonSizeItem::trailing_space
qreal trailing_space
Trailing space / padding-end (dp)
Definition
segmented_button.hpp:27
qml_material::token::SegmentedButtonSizeItem::icon_size
qreal icon_size
Icon size (dp)
Definition
segmented_button.hpp:23
qml_material::token::SegmentedButtonSizeItem::outline_width
qreal outline_width
Outlined variant outline width (dp)
Definition
segmented_button.hpp:31
qml_material::token::SegmentedButtonSizeItem::container_height
qreal container_height
Segment container height (dp)
Definition
segmented_button.hpp:21
qml_material::token::SegmentedButtonSize
Collection of segmented button size tokens for different size classes.
Definition
segmented_button.hpp:45
Generated by
1.12.0