zsui 0.3.0-alpha.2

Rust-first feature-gated native UI framework for Win32, AppKit, and Linux.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
use super::*;

pub(super) const fn icon_role_size(role: crate::ZsIconRole) -> Dp {
    use crate::ZsIconRole::*;
    Dp::new(match role {
        Small | Navigation | Status => 16.0,
        Standard | Toolbar => 20.0,
        Large => 32.0,
        Disclosure => 12.0,
        TreeDisclosure => 8.0,
    })
}

pub(super) const fn profile() -> PlatformComponentProfile {
    PlatformComponentProfile {
        style: ZsPlatformStyle::Windows,
        style_tokens: PlatformStyleTokenProfile {
            radius: ZsuiRadiusTokens {
                small: Dp::new(4.0),
                medium: Dp::new(8.0),
                large: Dp::new(12.0),
                pill: Dp::new(999.0),
            },
            spacing: ZsuiSpacingTokens {
                xs: Dp::new(4.0),
                sm: Dp::new(8.0),
                md: Dp::new(12.0),
                lg: Dp::new(16.0),
                xl: Dp::new(24.0),
                content_gap: Dp::new(10.0),
                content_padding: Dp::new(12.0),
                page_padding: Dp::new(24.0),
            },
            controls: ZsuiControlMetrics {
                compact_height: Dp::new(28.0),
                standard_height: Dp::new(32.0),
                touch_target: Dp::new(40.0),
                navigation_row_height: Dp::new(36.0),
                small_icon: Dp::new(16.0),
                standard_icon: Dp::new(20.0),
            },
        },
        typography: PlatformTypographyProfile {
            body: ZsTypographyMetrics::new(14.0, 20.0, TextWeight::Regular),
            caption: ZsTypographyMetrics::new(12.0, 16.0, TextWeight::Regular),
            body_large: ZsTypographyMetrics::new(18.0, 24.0, TextWeight::Regular),
            subtitle: ZsTypographyMetrics::new(20.0, 28.0, TextWeight::Semibold),
            window_title: ZsTypographyMetrics::new(24.0, 32.0, TextWeight::Semibold),
            title: ZsTypographyMetrics::new(28.0, 36.0, TextWeight::Semibold),
            title_large: ZsTypographyMetrics::new(40.0, 52.0, TextWeight::Semibold),
            display: ZsTypographyMetrics::new(68.0, 92.0, TextWeight::Semibold),
            button: ZsTypographyMetrics::new(14.0, 20.0, TextWeight::Regular),
            icon: ZsTypographyMetrics::new(16.0, 20.0, TextWeight::Regular),
            monospace: ZsTypographyMetrics::new(13.0, 18.0, TextWeight::Regular),
            fallback: PlatformTypographyFallbackProfile {
                source: "windows_fluent_font_stack",
                ui_font_family: "Segoe UI Variable Text",
                small_font_family: "Segoe UI Variable Small",
                display_font_family: "Segoe UI Variable Display",
                monospace_font_family: "Consolas",
                icon_font_family: "Segoe Fluent Icons",
                rasterization: "zsui_rust_text_swash_win32_dib",
            },
        },
        focus_visuals: PlatformFocusVisualProfile {
            text_input_indicator_height: Some(Dp::new(2.0)),
            outline_inset: Dp::new(1.0),
            outline_width: Dp::new(2.0),
        },
        #[cfg(feature = "badge")]
        badge: PlatformBadgeProfile {
            dot_diameter: Dp::new(4.0),
            minimum_diameter: Dp::new(16.0),
            horizontal_padding: Dp::new(4.0),
            vertical_padding: Dp::new(0.0),
            icon_size: Dp::new(10.0),
            digit_width: Dp::new(6.0),
            text_line_height: Dp::new(16.0),
            text_role: TextRole::Caption,
            text_weight: TextWeight::Semibold,
        },
        #[cfg(feature = "split-view")]
        split_view: PlatformSplitViewProfile {
            preferred_pane_width: Dp::new(296.0),
            minimum_content_width: Dp::new(360.0),
            divider_width: Dp::new(1.0),
            scrim_alpha: 72,
            pane_color: ColorRole::SurfaceRaised,
            divider_color: ColorRole::Border,
        },
        base_control: PlatformBaseControlProfile {
            metrics: ZsBaseControlMetrics {
                body_line_height: Dp::new(20.0),
                average_character_width: Dp::new(7.2),
                button_minimum_width: Dp::new(120.0),
                button_height: Dp::new(32.0),
                button_radius: Dp::new(4.0),
                button_padding_left: Dp::new(11.0),
                button_padding_top: Dp::new(5.0),
                button_padding_right: Dp::new(11.0),
                button_padding_bottom: Dp::new(6.0),
                text_input_minimum_width: Dp::new(64.0),
                text_input_height: Dp::new(32.0),
                text_input_radius: Dp::new(4.0),
                text_input_padding_left: Dp::new(10.0),
                text_input_padding_top: Dp::new(5.0),
                text_input_padding_right: Dp::new(6.0),
                text_input_padding_bottom: Dp::new(6.0),
                check_minimum_width: Dp::new(120.0),
                check_height: Dp::new(32.0),
                check_indicator_size: Dp::new(20.0),
                toggle_width: Dp::new(48.0),
                toggle_height: Dp::new(32.0),
                toggle_track_width: Dp::new(40.0),
                toggle_track_height: Dp::new(20.0),
                toggle_knob_off_size: Dp::new(12.0),
                toggle_knob_on_size: Dp::new(14.0),
                slider_minimum_width: Dp::new(120.0),
                slider_height: Dp::new(32.0),
                slider_track_height: Dp::new(4.0),
                slider_thumb_size: Dp::new(18.0),
                radio_minimum_width: Dp::new(120.0),
                radio_height: Dp::new(32.0),
                radio_indicator_size: Dp::new(20.0),
                radio_dot_size: Dp::new(8.0),
                progress_slot_height: Dp::new(3.0),
                progress_track_height: Dp::new(1.0),
                progress_indicator_height: Dp::new(3.0),
                progress_indeterminate: crate::ZsProgressBarIndeterminateMetrics {
                    cycle_ms: 2_000,
                    frame_interval_ms: 16,
                    primary: crate::ZsProgressBarSegmentMetrics {
                        width_fraction: 0.4,
                        start_offset_fraction: -0.4,
                        end_offset_fraction: 1.2,
                        delay_ms: 0,
                        duration_ms: 1_500,
                    },
                    secondary: Some(crate::ZsProgressBarSegmentMetrics {
                        width_fraction: 0.6,
                        start_offset_fraction: -0.9,
                        end_offset_fraction: 0.996,
                        delay_ms: 750,
                        duration_ms: 1_250,
                    }),
                    easing: Some([0.4, 0.0, 0.6, 1.0]),
                },
                selection_minimum_width: Dp::new(120.0),
                selection_height: Dp::new(32.0),
                time_picker_minimum_width: Dp::new(242.0),
            },
        },
        #[cfg(feature = "label")]
        section: PlatformSectionProfile {
            composition: PlatformSectionComposition::FluentCard,
            heading_color: ColorRole::PrimaryText,
        },
        #[cfg(feature = "label")]
        navigation: PlatformNavigationProfile {
            composition: PlatformNavigationComposition::FluentPane,
            behavior: PlatformNavigationBehavior::FluentAdaptive,
            title_role: TextRole::Subtitle,
            preferred_pane_width: Dp::new(320.0),
            horizontal_inset: Dp::new(32.0),
            pane_color: ColorRole::SurfaceRaised,
            scrim_alpha: 42,
            toggle_icon_size: Dp::new(20.0),
        },
        #[cfg(feature = "button")]
        button: PlatformButtonProfile {
            fill: ColorRole::Control,
            stroke: Some(ColorRole::Border),
            navigation_item: PlatformNavigationItemProfile {
                composition: PlatformNavigationItemComposition::FluentPaneRow,
                metrics: ZsNavigationItemMetrics {
                    open_pane_width: Dp::new(320.0),
                    item_height: Dp::new(36.0),
                    icon_size: Dp::new(16.0),
                    icon_box_width: Dp::new(40.0),
                    text_leading_margin: Dp::new(4.0),
                    trailing_padding: Dp::new(8.0),
                    indicator_width: Dp::new(3.0),
                    indicator_height: Dp::new(16.0),
                    indicator_radius: Dp::new(2.0),
                    radius: Dp::new(4.0),
                },
            },
        },
        #[cfg(feature = "button")]
        command_bar: PlatformCommandBarProfile {
            bar_height: Dp::new(48.0),
            button_height: Dp::new(48.0),
            icon_size: Dp::new(20.0),
            content_gap: Dp::new(8.0),
            item_gap: Dp::new(8.0),
            label_role: TextRole::Caption,
        },
        #[cfg(feature = "accordion")]
        accordion: PlatformAccordionProfile {
            header_height: Dp::new(48.0),
            header_padding_left: Dp::new(16.0),
            chevron_gap: Dp::new(20.0),
            chevron_button_size: Dp::new(32.0),
            chevron_glyph_size: Dp::new(12.0),
            chevron_margin_right: Dp::new(8.0),
        },
        #[cfg(feature = "tabs")]
        tabs: PlatformTabProfile {
            composition: PlatformTabComposition::FluentUnderline,
            metrics: ZsTabViewMetrics {
                strip_height: Dp::new(40.0),
                header_top_padding: Dp::new(8.0),
                item_height: Dp::new(32.0),
                content_padding: Dp::new(12.0),
                outer_inset: Dp::new(0.0),
                item_gap: Dp::new(0.0),
                horizontal_padding: Dp::new(8.0),
                icon_size: Dp::new(16.0),
                icon_gap: Dp::new(10.0),
                minimum_item_width: Dp::new(100.0),
                maximum_item_width: Dp::new(240.0),
                radius: Dp::new(8.0),
                selection_indicator_height: Dp::new(2.0),
            },
            label_role: TextRole::Body,
            arrow_selects: false,
            supports_home_end_focus: false,
            cycle_shortcut: PlatformTabCycleShortcut::ControlTab,
        },
        #[cfg(feature = "dialog")]
        dialog: PlatformDialogProfile {
            composition: PlatformDialogComposition::FluentEqualActions,
            metrics: ZsContentDialogMetrics {
                minimum_width: Dp::new(320.0),
                maximum_width: Dp::new(548.0),
                minimum_height: Some(Dp::new(184.0)),
                maximum_height: Some(Dp::new(756.0)),
                viewport_margin: Dp::new(24.0),
                content_padding: Dp::new(24.0),
                title_gap: Dp::new(12.0),
                action_gap: Dp::new(24.0),
                button_gap: Dp::new(8.0),
                button_height: Dp::new(32.0),
                minimum_button_width: Dp::new(120.0),
                separator_thickness: Dp::new(1.0),
                surface_radius: Dp::new(8.0),
                button_radius: Dp::new(4.0),
            },
            scrim_alpha: 77,
            estimated_glyph_width: Dp::new(0.0),
            estimated_label_padding: Dp::new(0.0),
        },
        #[cfg(feature = "flyout")]
        flyout: PlatformFlyoutProfile {
            composition: PlatformFlyoutComposition::FluentFlyout,
            viewport_margin: Dp::new(12.0),
            content_padding: Dp::new(16.0),
            surface_radius: Dp::new(8.0),
            target_gap: Dp::new(4.0),
            tail_size: Dp::new(0.0),
            shadow_offset: Dp::new(2.0),
            shadow_alpha: 32,
            automatic_placement: crate::ZsFlyoutPlacement::Bottom,
        },
        #[cfg(feature = "menu-flyout")]
        menu_flyout: PlatformMenuFlyoutProfile {
            metrics: ZsMenuFlyoutMetrics {
                minimum_width: Dp::new(160.0),
                maximum_width: Dp::new(360.0),
                viewport_margin: Dp::new(8.0),
                target_gap: Dp::new(4.0),
                surface_padding: Dp::new(4.0),
                row_height: Dp::new(32.0),
                separator_height: Dp::new(9.0),
                horizontal_padding: Dp::new(8.0),
                indicator_width: Dp::new(24.0),
                accelerator_gap: Dp::new(24.0),
                submenu_width: Dp::new(20.0),
                icon_size: Dp::new(16.0),
                surface_radius: Dp::new(8.0),
                row_radius: Dp::new(4.0),
                shadow_offset: Dp::new(2.0),
                shadow_alpha: 34,
                submenu_open_delay_ms: 400,
            },
        },
        #[cfg(feature = "info-bar")]
        info_bar: PlatformInfoBarProfile {
            composition: PlatformInfoBarComposition::FluentStatus,
            metrics: ZsInfoBarMetrics {
                minimum_height: Dp::new(48.0),
                horizontal_padding: Dp::new(16.0),
                vertical_padding: Dp::new(10.0),
                content_gap: Dp::new(12.0),
                control_gap: Dp::new(8.0),
                control_height: Dp::new(32.0),
                icon_size: Dp::new(20.0),
                accent_width: Dp::new(4.0),
                surface_radius: Dp::new(4.0),
                control_radius: Dp::new(4.0),
                title_line_height: Dp::new(20.0),
                message_line_height: Dp::new(18.0),
                average_character_width: Dp::new(7.2),
            },
            surface_alpha: 24,
        },
        #[cfg(feature = "teaching-tip")]
        teaching_tip: PlatformTeachingTipProfile {
            composition: PlatformTeachingTipComposition::FluentTeachingTip,
            metrics: ZsTeachingTipMetrics {
                minimum_width: Dp::new(240.0),
                maximum_width: Dp::new(320.0),
                viewport_margin: Dp::new(12.0),
                horizontal_padding: Dp::new(16.0),
                vertical_padding: Dp::new(14.0),
                content_gap: Dp::new(8.0),
                control_gap: Dp::new(12.0),
                control_height: Dp::new(32.0),
                title_line_height: Dp::new(22.0),
                subtitle_height: Dp::new(40.0),
                average_character_width: Dp::new(7.2),
                surface_radius: Dp::new(8.0),
                control_radius: Dp::new(4.0),
                tail_size: Dp::new(12.0),
                target_gap: Dp::new(4.0),
            },
            shadow_alpha: 32,
        },
        #[cfg(feature = "toast")]
        toast: PlatformToastProfile {
            composition: PlatformToastComposition::FluentForeground,
            metrics: ZsToastMetrics {
                maximum_width: Dp::new(420.0),
                viewport_margin: Dp::new(24.0),
                bottom_margin: Dp::new(24.0),
                horizontal_padding: Dp::new(16.0),
                vertical_padding: Dp::new(12.0),
                control_gap: Dp::new(8.0),
                control_height: Dp::new(32.0),
                surface_radius: Dp::new(8.0),
                control_radius: Dp::new(4.0),
                line_height: Dp::new(20.0),
                average_character_width: Dp::new(7.2),
            },
            shadow_alpha: 30,
        },
        #[cfg(feature = "breadcrumb")]
        breadcrumb: PlatformBreadcrumbProfile {
            metrics: ZsBreadcrumbMetrics {
                control_height: Dp::new(32.0),
                horizontal_padding: Dp::new(8.0),
                minimum_item_width: Dp::new(32.0),
                separator_width: Dp::new(20.0),
                icon_size: Dp::new(16.0),
                radius: Dp::new(4.0),
                character_width: Dp::new(7.2),
                label_measurement_guard: Dp::new(10.0),
                popup_row_height: Dp::new(32.0),
                popup_padding: Dp::new(4.0),
            },
            collapse_behavior: PlatformBreadcrumbCollapseBehavior::CollapseLeadingAncestors,
        },
        #[cfg(feature = "toggle-button")]
        toggle_button: PlatformToggleButtonProfile {
            metrics: ZsToggleButtonMetrics {
                minimum_height: Dp::new(32.0),
                radius: Dp::new(4.0),
                horizontal_padding: Dp::new(12.0),
                selected_indicator_width: Dp::new(16.0),
                selected_indicator_height: Dp::new(2.0),
                checked_content_offset_y: Dp::new(0.0),
            },
        },
        #[cfg(feature = "number-box")]
        number_box: PlatformNumberBoxProfile {
            metrics: ZsNumberBoxMetrics {
                button_width: Dp::new(32.0),
                button_gap: Dp::new(0.0),
                text_inset: Dp::new(8.0),
                radius: Dp::new(4.0),
                horizontal_buttons: true,
            },
            button_icon_size: Dp::new(12.0),
            stepper_presentation: PlatformNumberBoxStepperPresentation::ChevronIcons,
        },
        #[cfg(feature = "password-box")]
        password_box: PlatformPasswordBoxProfile {
            metrics: ZsPasswordBoxMetrics {
                minimum_height: Dp::new(32.0),
                radius: Dp::new(4.0),
                text_inset: Dp::new(8.0),
                reveal_width: Dp::new(32.0),
                reveal_icon_size: Dp::new(16.0),
            },
            default_reveal_mode: ZsPasswordRevealMode::Peek,
        },
        #[cfg(feature = "tooltip")]
        tooltip: PlatformTooltipProfile {
            metrics: ZsTooltipMetrics {
                maximum_width: Dp::new(320.0),
                horizontal_padding: Dp::new(8.0),
                vertical_padding: Dp::new(6.0),
                gap: Dp::new(8.0),
                radius: Dp::new(4.0),
                line_height: Dp::new(16.0),
                average_character_width: Dp::new(6.5),
            },
        },
        #[cfg(feature = "progress-ring")]
        progress_ring: PlatformProgressRingProfile {
            small: PlatformProgressRingSizeProfile {
                diameter: Dp::new(20.0),
                stroke_width: Dp::new(2.0),
            },
            medium: PlatformProgressRingSizeProfile {
                diameter: Dp::new(32.0),
                stroke_width: Dp::new(3.0),
            },
            large: PlatformProgressRingSizeProfile {
                diameter: Dp::new(48.0),
                stroke_width: Dp::new(4.0),
            },
            indeterminate_sweep_degrees: 110,
            revolution_ms: 1_000,
            indicator_role: ColorRole::Accent,
            track_role: ColorRole::Control,
        },
        #[cfg(feature = "auto-suggest")]
        auto_suggest: PlatformAutoSuggestProfile {
            metrics: ZsAutoSuggestMetrics {
                control_height: Dp::new(32.0),
                row_height: Dp::new(36.0),
                text_padding: Dp::new(12.0),
                icon_column_width: Dp::new(32.0),
                icon_size: Dp::new(16.0),
                popup_gap: Dp::new(4.0),
                control_radius: Dp::new(4.0),
                overlay_radius: Dp::new(8.0),
                leading_search_icon: false,
            },
        },
        #[cfg(feature = "grid-view")]
        grid_view: PlatformGridViewProfile {
            metrics: ZsGridViewMetrics {
                minimum_item_width: Dp::new(132.0),
                item_height: Dp::new(112.0),
                item_gap: Dp::new(8.0),
                item_padding: Dp::new(10.0),
                media_height: Dp::new(58.0),
                icon_size: Dp::new(32.0),
                item_radius: Dp::new(4.0),
                media_radius: Dp::new(3.0),
                text_gap: Dp::new(2.0),
            },
            selection: PlatformCollectionSelectionProfile {
                fill_role: ColorRole::Accent,
                fill_alpha: Some(28),
                foreground: ColorRole::PrimaryText,
            },
        },
        #[cfg(feature = "tree")]
        tree_view: PlatformTreeViewProfile {
            metrics: ZsTreeViewMetrics {
                row_height: Dp::new(32.0),
                depth_indent: Dp::new(20.0),
                disclosure_column: Dp::new(24.0),
                disclosure_size: Dp::new(8.0),
                icon_size: Dp::new(16.0),
                leading_padding: Dp::new(6.0),
                content_gap: Dp::new(6.0),
                row_radius: Dp::new(4.0),
            },
            selection: PlatformCollectionSelectionProfile {
                fill_role: ColorRole::Accent,
                fill_alpha: Some(36),
                foreground: ColorRole::PrimaryText,
            },
        },
        #[cfg(feature = "table")]
        table: PlatformTableProfile {
            metrics: ZsTableMetrics {
                header_height: Dp::new(36.0),
                row_height: Dp::new(32.0),
                horizontal_padding: Dp::new(12.0),
                sort_icon_size: Dp::new(12.0),
                radius: Dp::new(4.0),
                separator_width: Dp::new(1.0),
            },
            selection: PlatformCollectionSelectionProfile {
                fill_role: ColorRole::Accent,
                fill_alpha: Some(36),
                foreground: ColorRole::PrimaryText,
            },
        },
        #[cfg(feature = "time-picker")]
        time_picker: PlatformTimePickerProfile {
            metrics: ZsTimePickerMetrics {
                popup_width: Dp::new(280.0),
                row_height: Dp::new(40.0),
                visible_rows: 5,
                text_padding: Dp::new(12.0),
                icon_column_width: Dp::new(32.0),
                popup_gap: Dp::new(4.0),
                control_radius: Dp::new(4.0),
                overlay_radius: Dp::new(8.0),
            },
            default_clock: ZsClockFormat::TwelveHour,
            header_fill: ColorRole::Control,
            selection: PlatformCollectionSelectionProfile {
                fill_role: ColorRole::Accent,
                fill_alpha: Some(48),
                foreground: ColorRole::PrimaryText,
            },
        },
        #[cfg(feature = "color-picker")]
        color_picker: PlatformColorPickerProfile {
            metrics: ZsColorPickerMetrics {
                popup_width: Dp::new(320.0),
                popup_padding: Dp::new(16.0),
                preview_size: Dp::new(48.0),
                preview_gap: Dp::new(10.0),
                // The 288-DP content width leaves a 256-DP square spectrum
                // when precision fields are absent.
                spectrum_height: Dp::new(256.0),
                spectrum_gap: Dp::new(8.0),
                hue_track_height: Dp::new(10.0),
                row_height: Dp::new(28.0),
                row_gap: Dp::new(4.0),
                label_width: Dp::new(24.0),
                value_width: Dp::new(42.0),
                track_height: Dp::new(8.0),
                thumb_width: Dp::new(12.0),
                popup_gap: Dp::new(4.0),
                control_radius: Dp::new(4.0),
                overlay_radius: Dp::new(8.0),
            },
            swatch_size: Dp::new(22.0),
            header_fill: ColorRole::Control,
            active_channel_alpha: 24,
        },
        #[cfg(feature = "command-palette")]
        command_palette: PlatformCommandPaletteProfile {
            metrics: ZsCommandPaletteMetrics {
                preferred_width: Dp::new(640.0),
                viewport_margin: Dp::new(24.0),
                top_offset: Dp::new(72.0),
                search_height: Dp::new(52.0),
                row_height: Dp::new(48.0),
                horizontal_padding: Dp::new(12.0),
                icon_size: Dp::new(20.0),
                icon_column_width: Dp::new(36.0),
                shortcut_width: Dp::new(112.0),
                surface_radius: Dp::new(8.0),
                search_radius: Dp::new(4.0),
                row_radius: Dp::new(4.0),
            },
            scrim_alpha: 56,
        },
        #[cfg(feature = "document-shell")]
        document_shell: PlatformDocumentShellProfile {
            tab_strip_height: Dp::new(48.0),
            command_bar_height: Dp::new(48.0),
            status_bar_height: Dp::new(32.0),
            surface_margin: Dp::new(12.0),
            editor_inset: Dp::new(8.0),
            editor_vertical_gap: Dp::new(4.0),
            compact_threshold: Dp::new(760.0),
            regular_tab_width: Dp::new(280.0),
            compact_tab_width: Dp::new(210.0),
            minimum_tab_width: Dp::new(140.0),
            reserved_tab_action_width: Dp::new(36.0),
            tab_top_inset: Dp::new(7.0),
            tab_height: Dp::new(38.0),
            tab_action_size: Dp::new(30.0),
            tab_action_inset: Dp::new(4.0),
            tab_action_gap: Dp::new(6.0),
            tab_radius: Dp::new(8.0),
            tab_icon_leading: Dp::new(12.0),
            tab_icon_size: Dp::new(16.0),
            tab_label_leading: Dp::new(36.0),
            clean_title_reserve: Dp::new(44.0),
            dirty_title_reserve: Dp::new(52.0),
            dirty_indicator_size: Dp::new(6.0),
            dirty_indicator_gap: Dp::new(10.0),
            command_height: Dp::new(32.0),
            command_gap: Dp::new(4.0),
            command_group_gap: Dp::new(12.0),
            command_radius: Dp::new(4.0),
            command_icon_size: Dp::new(16.0),
            command_icon_leading: Dp::new(10.0),
            command_label_gap: Dp::new(7.0),
            command_label_trailing: Dp::new(11.0),
            separator_vertical_inset: Dp::new(7.0),
            editor_radius: Dp::new(8.0),
            status_horizontal_inset: Dp::new(16.0),
        },
        #[cfg(feature = "calculator")]
        calculator_shell: PlatformCalculatorShellProfile {
            header_height: Dp::new(56.0),
            display_block_height: Dp::new(124.0),
            memory_row_height: Dp::new(36.0),
            surface_margin: Dp::new(8.0),
            button_gap: Dp::new(4.0),
            expression_top_gap: Dp::new(8.0),
            expression_height: Dp::new(24.0),
            display_bottom_gap: Dp::new(8.0),
            memory_indicator_width: Dp::new(20.0),
            header_action_size: Dp::new(36.0),
            header_icon_leading: Dp::new(14.0),
            header_icon_size: Dp::new(20.0),
            header_title_leading: Dp::new(44.0),
            header_title_trailing_reserve: Dp::new(96.0),
            history_clear_width: Dp::new(68.0),
            history_clear_height: Dp::new(30.0),
            history_clear_top_inset: Dp::new(10.0),
            history_clear_trailing_inset: Dp::new(10.0),
            history_radius: Dp::new(8.0),
            history_horizontal_inset: Dp::new(16.0),
            history_title_top_inset: Dp::new(8.0),
            history_title_height: Dp::new(36.0),
            history_title_trailing_reserve: Dp::new(108.0),
            history_empty_top_inset: Dp::new(72.0),
            history_empty_height: Dp::new(28.0),
            history_entries_top_inset: Dp::new(58.0),
            history_expression_height: Dp::new(22.0),
            history_result_height: Dp::new(30.0),
            history_entry_gap: Dp::new(12.0),
            button_radius: Dp::new(6.0),
            button_icon_size: Dp::new(18.0),
            number_fill: ColorRole::SurfaceRaised,
            function_fill: ColorRole::Control,
            operator_fill: ColorRole::Control,
            draw_neutral_button_border: true,
            title_weight: TextWeight::Semibold,
            display_weight: TextWeight::Semibold,
            accent_weight: TextWeight::Semibold,
        },

        shell: PlatformShellProfile {
            style: ZsPlatformStyle::Windows,
            navigation: PlatformShellNavigationComposition::FluentPane,
            sections: PlatformShellSectionComposition::FluentCards,
            preferred_navigation_width: Dp::new(236.0),
            top_height: Dp::new(84.0),
            navigation_start: Dp::new(80.0),
            content_gap: Dp::new(28.0),
            content_top_gap: Dp::new(16.0),
            viewport_mask_height: Dp::new(14.0),
            scrollbar_width: Dp::new(3.0),
            active_scrollbar_width: Dp::new(5.0),
            scrollbar_margin: Dp::new(3.0),
            section_header_height: Dp::new(52.0),
            section_row_height: Dp::new(32.0),
            section_row_gap: Dp::new(8.0),
            section_gap: Dp::new(12.0),
            section_horizontal_padding: Dp::new(18.0),
            section_height_extra: Dp::new(42.0),
            section_body_bottom_inset: Dp::new(18.0),
            navigation_item_height: Dp::new(36.0),
            navigation_item_stride: Dp::new(44.0),
            navigation_item_inset: Dp::new(10.0),
            navigation_item_radius: Dp::new(6.0),
            section_radius: Dp::new(8.0),
            title_x: Dp::new(36.0),
            title_y: Dp::new(32.0),
            title_width: Dp::new(324.0),
            title_height: Dp::new(30.0),
            menu_icon_x: Dp::new(22.0),
            menu_icon_y: Dp::new(18.0),
            menu_icon_size: Dp::new(28.0),
            show_menu_icon: true,
            app_title_x: Dp::new(56.0),
            app_title_y: Dp::new(18.0),
            app_title_width: Dp::new(164.0),
            app_title_height: Dp::new(32.0),
            action_margin: Dp::new(24.0),
            action_height: Dp::new(32.0),
            primary_action_width: Dp::new(72.0),
            secondary_action_width: Dp::new(64.0),
            action_gap: Dp::new(20.0),
            draw_row_separators: true,
        },
    }
}