@@ -46,6 +46,7 @@ pub enum TabAddAlign {
46
46
/// #
47
47
/// ```
48
48
#[ derive( Clone , Debug ) ]
49
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
49
50
#[ allow( missing_docs) ]
50
51
pub struct Style {
51
52
/// Sets padding to indent from the edges of the window. By `Default` it's `None`.
@@ -63,6 +64,7 @@ pub struct Style {
63
64
64
65
/// Specifies the look and feel of buttons.
65
66
#[ derive( Clone , Debug ) ]
67
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
66
68
pub struct ButtonsStyle {
67
69
/// Color of the close tab button.
68
70
pub close_tab_color : Color32 ,
@@ -91,6 +93,7 @@ pub struct ButtonsStyle {
91
93
92
94
/// Specifies the look and feel of node separators.
93
95
#[ derive( Clone , Debug ) ]
96
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
94
97
pub struct SeparatorStyle {
95
98
/// Width of the rectangle separator between nodes. By `Default` it's `1.0`.
96
99
pub width : f32 ,
@@ -115,6 +118,7 @@ pub struct SeparatorStyle {
115
118
116
119
/// Specifies the look and feel of tab bars.
117
120
#[ derive( Clone , Debug ) ]
121
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
118
122
pub struct TabBarStyle {
119
123
/// Background color of tab bar. By `Default` it's [`Color32::WHITE`].
120
124
pub bg_fill : Color32 ,
@@ -138,6 +142,7 @@ pub struct TabBarStyle {
138
142
139
143
/// Specifies the look and feel of an individual tab.
140
144
#[ derive( Clone , Debug ) ]
145
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
141
146
pub struct TabStyle {
142
147
/// Style of the tab when it is active.
143
148
pub active : TabInteractionStyle ,
@@ -177,6 +182,7 @@ pub struct TabStyle {
177
182
178
183
/// Specifies the look and feel of individual tabs while they are being interacted with.
179
184
#[ derive( Clone , Debug ) ]
185
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
180
186
pub struct TabInteractionStyle {
181
187
/// Color of the outline around tabs. By `Default` it's [`Color32::BLACK`].
182
188
pub outline_color : Color32 ,
@@ -193,6 +199,7 @@ pub struct TabInteractionStyle {
193
199
194
200
/// Specifies the look and feel of the tab body.
195
201
#[ derive( Clone , Debug ) ]
202
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
196
203
pub struct TabBodyStyle {
197
204
/// Inner margin of tab body. By `Default` it's `Margin::same(4.0)`.
198
205
pub inner_margin : Margin ,
@@ -209,6 +216,7 @@ pub struct TabBodyStyle {
209
216
210
217
/// Specifies the look and feel of the tab drop overlay.
211
218
#[ derive( Clone , Debug ) ]
219
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
212
220
pub struct OverlayStyle {
213
221
/// Sets selection color for the placing area of the tab where this tab targeted on it.
214
222
/// By `Default` it's `(0, 191, 255)` (light blue) with `0.5` capacity.
@@ -246,6 +254,7 @@ pub struct OverlayStyle {
246
254
247
255
/// Specifies the feel of the tab drop overlay, i.e anything non visual about the overlay.
248
256
#[ derive( Clone , Debug ) ]
257
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
249
258
pub struct OverlayFeel {
250
259
/// range is `0.0..=1.0`.
251
260
pub window_drop_coverage : f32 ,
@@ -265,6 +274,7 @@ pub struct OverlayFeel {
265
274
266
275
/// Specifies the type of overlay used.
267
276
#[ derive( Clone , Debug , PartialEq ) ]
277
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
268
278
pub enum OverlayType {
269
279
/// Shows highlighted areas predicting where a dropped tab would land were it to be dropped this frame.
270
280
///
@@ -279,6 +289,7 @@ pub enum OverlayType {
279
289
280
290
/// Highlighting on the currently hovered leaf.
281
291
#[ derive( Clone , Debug ) ]
292
+ #[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
282
293
pub struct LeafHighlighting {
283
294
/// Fill color.
284
295
pub color : Color32 ,
0 commit comments