QmlMaterial 0.1.0
Loading...
Searching...
No Matches
segmented_button.hpp
1#pragma once
2
3#include <QtQml/QQmlEngine>
4#include "qml_material/core.hpp"
5
6namespace qml_material::token
7{
8
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
33public:
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
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
56public:
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 };
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 };
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 };
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 };
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
Segmented button size tokens for a specific size class.
Definition segmented_button.hpp:15
qreal leading_space
Leading space / padding-start (dp)
Definition segmented_button.hpp:25
qreal icon_label_space
Spacing between icon and label (dp)
Definition segmented_button.hpp:29
qreal trailing_space
Trailing space / padding-end (dp)
Definition segmented_button.hpp:27
qreal icon_size
Icon size (dp)
Definition segmented_button.hpp:23
qreal outline_width
Outlined variant outline width (dp)
Definition segmented_button.hpp:31
qreal container_height
Segment container height (dp)
Definition segmented_button.hpp:21
Collection of segmented button size tokens for different size classes.
Definition segmented_button.hpp:45