native-theme 0.6.1

Cross-platform native theme detection and loading for Rust GUI applications
Documentation
# macOS Sonoma live preset - geometry/metrics only (no colors, fonts, or icons)
# Used by the OS-first pipeline as merge base; OS reader provides colors/fonts.
#
# icon_theme is supplied at the Theme level so the live merge base carries
# the same default as the full `macos-sonoma` preset (see docs/archive/v0.5.7_gaps.md G4).
name = "macOS Sonoma"
icon_theme = "sf-symbols"

# === Light variant ===

[light.defaults]
disabled_opacity = 0.3
line_height = 1.19
focus_ring_width_px = 3.0
focus_ring_offset_px = -1.0


[light.defaults.border]
corner_radius_px = 5.0
corner_radius_lg_px = 10.0
line_width_px = 0.5
opacity = 0.2
shadow_enabled = true
[light.defaults.icon_sizes]
toolbar_px = 24.0
small_px = 16.0
large_px = 32.0
dialog_px = 22.0
panel_px = 20.0

[light.text_scale.caption]
size_pt =10.0
weight = 400

[light.text_scale.section_heading]
size_pt =13.0
weight = 700

[light.text_scale.dialog_title]
size_pt =22.0
weight = 400

[light.text_scale.display]
size_pt =26.0
weight = 400

[light.button]
min_width_px = 64.0
min_height_px = 22.0
icon_text_gap_px = 4.0


[light.button.border]
# platform-facts.md:1171-1172 (§2.3): NSButton ~8 (WebKit); 3 (measured)
padding_horizontal_px = 8.0
padding_vertical_px = 3.0
[light.input]
min_height_px = 22.0


[light.input.border]
# platform-facts.md:1196-1197 (§2.4): NSTextField 4; 3 (measured)
padding_horizontal_px = 4.0
padding_vertical_px = 3.0
[light.checkbox]
indicator_width_px = 14.0
label_gap_px = 4.0

[light.tooltip]
max_width_px = 300.0


[light.tooltip.border]
# platform-facts.md:1257-1258 (§2.7): NSToolTipManager 4; 4
padding_horizontal_px = 4.0
padding_vertical_px = 4.0
[light.scrollbar]
groove_width_px = 16.0
thumb_width_px = 7.0
overlay_mode = true
min_thumb_length_px = 40.0

[light.slider]
track_height_px = 5.0
thumb_diameter_px = 21.0
tick_mark_length_px = 8.0

[light.progress_bar]
track_height_px = 6.0
min_width_px = 100.0

[light.tab]
min_width_px = 64.0
min_height_px = 24.0


[light.tab.border]
# platform-facts.md:1318-1319 (§2.11): NSTabView 12; 4 (measured)
padding_horizontal_px = 12.0
padding_vertical_px = 4.0
[light.menu]
row_height_px = 22.0
icon_text_gap_px = 4.0


[light.menu.border]
# platform-facts.md:1235-1236 (§2.6): NSMenuItem 12; 3 (measured)
padding_horizontal_px = 12.0
padding_vertical_px = 3.0
[light.list]
row_height_px = 24.0


[light.list.border]
# platform-facts.md:1390-1391 (§2.15): NSTableView 4; 4 (measured)
padding_horizontal_px = 4.0
padding_vertical_px = 4.0
[light.toolbar]
# platform-facts.md:1351 (§2.13): NSToolbar 38
bar_height_px = 38.0
# platform-facts.md:1352 (§2.13): AppKit 8
item_gap_px = 8.0


[light.toolbar.border]
# platform-facts.md:1353-1354 (§2.13): NSToolbar 8 (measured); 0
padding_horizontal_px = 8.0
padding_vertical_px = 0.0

[light.splitter]
divider_width_px = 6.0

[light.switch]
track_width_px = 38.0
track_height_px = 22.0
thumb_diameter_px = 18.0
track_radius_px = 11.0

[light.dialog]
# button_order: provided by platform reader via resolve_platform_defaults
min_width_px = 320.0
max_width_px = 560.0
min_height_px = 140.0
max_height_px = 600.0
button_gap_px = 12.0
icon_size_px =64.0


[light.dialog.title_font]
# platform-facts.md:1496-1497 (§2.22): the emphasized system font, Bold.
# No size here: the pipeline merges this preset over the full macos-sonoma,
# whose title_font.size (13pt, the system font size) is the one that applies.
weight = 700


[light.dialog.border]
# platform-facts.md:1491-1492 (§2.22): ~20 (measured)
padding_horizontal_px = 20.0
padding_vertical_px = 20.0

[light.link]
underline_enabled = true

[light.spinner]
diameter_px = 32.0
min_diameter_px = 10.0
stroke_width_px = 2.0

[light.combo_box]
min_height_px = 21.0
min_width_px = 120.0
arrow_icon_size_px =17.0
# arrow_area_width not stated: platform-facts.md:1554 (§2.24), ~16–18px (measured) is a range


[light.combo_box.border]
# platform-facts.md:1552, :1557 (§2.24): ~3 (measured); horizontal ~8–10 is a range, not stated
padding_vertical_px = 3.0
[light.segmented_control]
segment_height_px = 24.0
separator_width_px = 1.0


[light.segmented_control.border]
# platform-facts.md:1571, :1576 (§2.25): ~3 (measured); horizontal ~8–10 is a range, not stated
padding_vertical_px = 3.0
[light.card]

[light.expander]
header_height_px = 40.0
arrow_icon_size_px =13.0
# platform-facts.md:1613 (§2.27): the HIG's disclosure triangle points in from the leading edge
arrow_side = "leading"

# === Dark variant ===

[dark.defaults]
disabled_opacity = 0.3
line_height = 1.19
focus_ring_width_px = 3.0
focus_ring_offset_px = -1.0


[dark.defaults.border]
corner_radius_px = 5.0
corner_radius_lg_px = 10.0
line_width_px = 0.5
opacity = 0.2
shadow_enabled = true
[dark.defaults.icon_sizes]
toolbar_px = 24.0
small_px = 16.0
large_px = 32.0
dialog_px = 22.0
panel_px = 20.0

[dark.text_scale.caption]
size_pt =10.0
weight = 400

[dark.text_scale.section_heading]
size_pt =13.0
weight = 700

[dark.text_scale.dialog_title]
size_pt =22.0
weight = 400

[dark.text_scale.display]
size_pt =26.0
weight = 400

[dark.button]
min_width_px = 64.0
min_height_px = 22.0
icon_text_gap_px = 4.0


[dark.button.border]
# platform-facts.md:1171-1172 (§2.3): NSButton ~8 (WebKit); 3 (measured)
padding_horizontal_px = 8.0
padding_vertical_px = 3.0
[dark.input]
min_height_px = 22.0


[dark.input.border]
# platform-facts.md:1196-1197 (§2.4): NSTextField 4; 3 (measured)
padding_horizontal_px = 4.0
padding_vertical_px = 3.0
[dark.checkbox]
indicator_width_px = 14.0
label_gap_px = 4.0

[dark.tooltip]
max_width_px = 300.0


[dark.tooltip.border]
# platform-facts.md:1257-1258 (§2.7): NSToolTipManager 4; 4
padding_horizontal_px = 4.0
padding_vertical_px = 4.0
[dark.scrollbar]
groove_width_px = 16.0
thumb_width_px = 7.0
overlay_mode = true
min_thumb_length_px = 40.0

[dark.slider]
track_height_px = 5.0
thumb_diameter_px = 21.0
tick_mark_length_px = 8.0

[dark.progress_bar]
track_height_px = 6.0
min_width_px = 100.0

[dark.tab]
min_width_px = 64.0
min_height_px = 24.0


[dark.tab.border]
# platform-facts.md:1318-1319 (§2.11): NSTabView 12; 4 (measured)
padding_horizontal_px = 12.0
padding_vertical_px = 4.0
[dark.menu]
row_height_px = 22.0
icon_text_gap_px = 4.0


[dark.menu.border]
# platform-facts.md:1235-1236 (§2.6): NSMenuItem 12; 3 (measured)
padding_horizontal_px = 12.0
padding_vertical_px = 3.0
[dark.list]
row_height_px = 24.0


[dark.list.border]
# platform-facts.md:1390-1391 (§2.15): NSTableView 4; 4 (measured)
padding_horizontal_px = 4.0
padding_vertical_px = 4.0
[dark.toolbar]
# platform-facts.md:1351 (§2.13): NSToolbar 38
bar_height_px = 38.0
# platform-facts.md:1352 (§2.13): AppKit 8
item_gap_px = 8.0


[dark.toolbar.border]
# platform-facts.md:1353-1354 (§2.13): NSToolbar 8 (measured); 0
padding_horizontal_px = 8.0
padding_vertical_px = 0.0

[dark.splitter]
divider_width_px = 6.0

[dark.switch]
track_width_px = 38.0
track_height_px = 22.0
thumb_diameter_px = 18.0
track_radius_px = 11.0

[dark.dialog]
# button_order: provided by platform reader via resolve_platform_defaults
min_width_px = 320.0
max_width_px = 560.0
min_height_px = 140.0
max_height_px = 600.0
button_gap_px = 12.0
icon_size_px =64.0


[dark.dialog.title_font]
# platform-facts.md:1496-1497 (§2.22): the emphasized system font, Bold.
# No size here: the pipeline merges this preset over the full macos-sonoma,
# whose title_font.size (13pt, the system font size) is the one that applies.
weight = 700


[dark.dialog.border]
# platform-facts.md:1491-1492 (§2.22): ~20 (measured)
padding_horizontal_px = 20.0
padding_vertical_px = 20.0

[dark.link]
underline_enabled = true

[dark.spinner]
diameter_px = 32.0
min_diameter_px = 10.0
stroke_width_px = 2.0

[dark.combo_box]
min_height_px = 21.0
min_width_px = 120.0
arrow_icon_size_px =17.0
# arrow_area_width not stated: platform-facts.md:1554 (§2.24), ~16–18px (measured) is a range


[dark.combo_box.border]
# platform-facts.md:1552, :1557 (§2.24): ~3 (measured); horizontal ~8–10 is a range, not stated
padding_vertical_px = 3.0
[dark.segmented_control]
segment_height_px = 24.0
separator_width_px = 1.0


[dark.segmented_control.border]
# platform-facts.md:1571, :1576 (§2.25): ~3 (measured); horizontal ~8–10 is a range, not stated
padding_vertical_px = 3.0
[dark.card]

[dark.expander]
header_height_px = 40.0
arrow_icon_size_px =13.0
# platform-facts.md:1613 (§2.27): the HIG's disclosure triangle points in from the leading edge
arrow_side = "leading"