native-theme 0.6.1

Cross-platform native theme detection and loading for Rust GUI applications
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
# Adwaita 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 `adwaita` preset (see docs/archive/v0.5.7_gaps.md G4).
name = "Adwaita"
icon_theme = "Adwaita"

# === Light variant ===

[light.defaults]
disabled_opacity = 0.5
line_height = 1.21
focus_ring_width_px = 2.0
focus_ring_offset_px = -2.0


[light.defaults.border]
corner_radius_px = 9.0
corner_radius_lg_px = 15.0
line_width_px = 1.0
opacity = 0.15
shadow_enabled = true
[light.defaults.icon_sizes]
toolbar_px = 16.0
small_px = 16.0
large_px = 32.0
dialog_px = 22.0
panel_px = 20.0

[light.text_scale.caption]
size_pt =9.0

[light.text_scale.section_heading]
weight = 700

[light.text_scale.dialog_title]
size_pt =15.0
weight = 800

[light.text_scale.display]
size_pt =20.0
weight = 800

[light.button]
min_width_px = 64.0
min_height_px = 34.0
icon_text_gap_px = 8.0


[light.button.border]
# platform-facts.md:1171-1172 (§2.3): Adwaita CSS, a label-only button (.text-button, _buttons.scss:72-75) 17; 5
padding_horizontal_px = 17.0
padding_vertical_px = 5.0
[light.input]
min_height_px = 34.0


[light.input.border]
# platform-facts.md:1196-1197 (§2.4): Adwaita CSS 9; 0 (CSS sets no vertical padding)
padding_horizontal_px = 9.0
padding_vertical_px = 0.0
[light.text_area.border]
# platform-facts.md:1639-1640 (§2.29): textview sets no padding, GtkTextView's margins default to 0
padding_horizontal_px = 0.0
padding_vertical_px = 0.0
[light.checkbox]
# platform-facts.md:1212 (§2.5): min-width 14 plus padding 3 on each side
indicator_width_px = 20.0
# platform-facts.md:1220 (§2.5): bullet.svg, a circle of radius 4
radio_dot_diameter_px = 8.0
# platform-facts.md:1221 (§2.5): check.svg (libadwaita 1.10.0), a stroke 2 wide
check_mark_stroke_width_px = 2.0
label_gap_px = 8.0


[light.checkbox.border]
# platform-facts.md:1216-1217 (§2.5): Adwaita CSS check { padding: 3px }
padding_horizontal_px = 3.0
padding_vertical_px = 3.0

[light.tooltip]
max_width_px = 360.0


[light.tooltip.border]
# platform-facts.md:1257-1258 (§2.7): Adwaita CSS 10; 6
padding_horizontal_px = 10.0
padding_vertical_px = 6.0
[light.scrollbar]
groove_width_px = 12.0
thumb_width_px = 8.0
overlay_mode = false
min_thumb_length_px = 40.0

[light.slider]
track_height_px = 10.0
thumb_diameter_px = 20.0
tick_mark_length_px = 4.0

[light.progress_bar]
track_height_px = 8.0
min_width_px = 80.0

[light.tab]
min_width_px = 64.0
min_height_px = 30.0
# platform-facts.md:1326 (§2.11): GtkNotebook places each tab at the previous one's end (gtknotebook.c:5294)
item_gap_px = 0.0
# platform-facts.md:1328-1329 (§2.11): a checked notebook tab is inset 0 -4px, along its bottom edge (_notebook.scss:19)
active_indicator_width_px = 4.0
active_indicator_side = "bottom"


[light.tab.border]
# platform-facts.md:1318-1319 (§2.11): Adwaita CSS 12; 3
padding_horizontal_px = 12.0
padding_vertical_px = 3.0
[light.menu]
row_height_px = 32.0
icon_text_gap_px = 8.0


[light.menu.border]
# platform-facts.md:1235-1236 (§2.6): Adwaita CSS 12 ($menu_padding); 0
padding_horizontal_px = 12.0
padding_vertical_px = 0.0
[light.list]
# row_height not stated: platform-facts.md:1389 (§2.15), plain list context, no min-height


[light.list.border]
# platform-facts.md:1390-1391 (§2.15): Adwaita CSS plain list context, 2
padding_horizontal_px = 2.0
padding_vertical_px = 2.0
[light.toolbar]
# bar_height not stated: platform-facts.md:1351 (§2.13), .toolbar sets no min-height
# platform-facts.md:1352 (§2.13): Adwaita CSS .toolbar border-spacing 6
item_gap_px = 6.0


[light.toolbar.border]
# platform-facts.md:1353-1354 (§2.13): Adwaita CSS .toolbar { padding: 6px }
padding_horizontal_px = 6.0
padding_vertical_px = 6.0


[light.status_bar.border]
# platform-facts.md:1372-1373 (§2.14): Adwaita CSS statusbar { padding: 6px 10px }
padding_horizontal_px = 10.0
padding_vertical_px = 6.0


[light.popover.border]
# platform-facts.md:1412-1413 (§2.16): Adwaita CSS popover > contents { padding: 8px }
padding_horizontal_px = 8.0
padding_vertical_px = 8.0

[light.splitter]
divider_width_px = 1.0

[light.switch]
track_width_px = 46.0
track_height_px = 26.0
thumb_diameter_px = 20.0
track_radius_px = 14.0

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


[light.dialog.title_font]
# platform-facts.md:1496-1497 (§2.22): .title-2, ≈15pt ExtraBold
size_pt =15.0
weight = 800


[light.dialog.border]
corner_radius_px = 18.0
# platform-facts.md:1491-1492 (§2.22): 24; 32 top / 24 bottom
padding_horizontal_px = 24.0
padding_top_px = 32.0
padding_bottom_px = 24.0
[light.link]
underline_enabled = true

[light.spinner]
diameter_px = 16.0
min_diameter_px = 16.0
stroke_width_px = 2.0

[light.combo_box]
min_height_px = 34.0
min_width_px = 120.0
arrow_icon_size_px =16.0
# arrow_area_width not stated: platform-facts.md:1554 (§2.24), (none), inline icon


[light.combo_box.border]
# platform-facts.md:1552, :1557 (§2.24): Adwaita CSS base button rule, as the dropdown's button has a box child: 10; 5
padding_horizontal_px = 10.0
padding_vertical_px = 5.0
[light.segmented_control]
segment_height_px = 28.0
separator_width_px = 1.0


[light.segmented_control.border]
# platform-facts.md:1571, :1576 (§2.25): AdwToggleGroup text toggle, Adwaita CSS 11 − 3 = 8; 0 (no rule pads a toggle vertically)
padding_horizontal_px = 8.0
padding_vertical_px = 0.0


[light.card]


[light.card.border]
corner_radius_px = 12.0
[light.expander]
header_height_px = 50.0
arrow_icon_size_px =16.0
# platform-facts.md:1613-1616 (§2.27): AdwExpanderRow, the arrow at the row's end, 3 + 6 from
# the content before it, the nested list unindented, the whole a boxed-list card
arrow_side = "trailing"
arrow_gap_px = 9.0
content_indent_px = 0.0
frame_enabled = true

# === Dark variant ===


[light.expander.border]
corner_radius_px = 6.0
# platform-facts.md:1607-1608 (§2.27): AdwExpanderRow header, Adwaita CSS row 2 + header margin 12 = 14; row 2 + title margin 6 = 8
padding_horizontal_px = 14.0
padding_vertical_px = 8.0
[dark.defaults]
disabled_opacity = 0.5
line_height = 1.21
focus_ring_width_px = 2.0
focus_ring_offset_px = -2.0


[dark.defaults.border]
corner_radius_px = 9.0
corner_radius_lg_px = 15.0
line_width_px = 1.0
opacity = 0.15
shadow_enabled = true
[dark.defaults.icon_sizes]
toolbar_px = 16.0
small_px = 16.0
large_px = 32.0
dialog_px = 22.0
panel_px = 20.0

[dark.text_scale.caption]
size_pt =9.0

[dark.text_scale.section_heading]
weight = 700

[dark.text_scale.dialog_title]
size_pt =15.0
weight = 800

[dark.text_scale.display]
size_pt =20.0
weight = 800

[dark.button]
min_width_px = 64.0
min_height_px = 34.0
icon_text_gap_px = 8.0


[dark.button.border]
# platform-facts.md:1171-1172 (§2.3): Adwaita CSS, a label-only button (.text-button, _buttons.scss:72-75) 17; 5
padding_horizontal_px = 17.0
padding_vertical_px = 5.0
[dark.input]
min_height_px = 34.0


[dark.input.border]
# platform-facts.md:1196-1197 (§2.4): Adwaita CSS 9; 0 (CSS sets no vertical padding)
padding_horizontal_px = 9.0
padding_vertical_px = 0.0
[dark.text_area.border]
# platform-facts.md:1639-1640 (§2.29): textview sets no padding, GtkTextView's margins default to 0
padding_horizontal_px = 0.0
padding_vertical_px = 0.0
[dark.checkbox]
# platform-facts.md:1212 (§2.5): min-width 14 plus padding 3 on each side
indicator_width_px = 20.0
# platform-facts.md:1220 (§2.5): bullet.svg, a circle of radius 4
radio_dot_diameter_px = 8.0
# platform-facts.md:1221 (§2.5): check.svg (libadwaita 1.10.0), a stroke 2 wide
check_mark_stroke_width_px = 2.0
label_gap_px = 8.0


[dark.checkbox.border]
# platform-facts.md:1216-1217 (§2.5): Adwaita CSS check { padding: 3px }
padding_horizontal_px = 3.0
padding_vertical_px = 3.0

[dark.tooltip]
max_width_px = 360.0


[dark.tooltip.border]
# platform-facts.md:1257-1258 (§2.7): Adwaita CSS 10; 6
padding_horizontal_px = 10.0
padding_vertical_px = 6.0
[dark.scrollbar]
groove_width_px = 12.0
thumb_width_px = 8.0
overlay_mode = false
min_thumb_length_px = 40.0

[dark.slider]
track_height_px = 10.0
thumb_diameter_px = 20.0
tick_mark_length_px = 4.0

[dark.progress_bar]
track_height_px = 8.0
min_width_px = 80.0

[dark.tab]
min_width_px = 64.0
min_height_px = 30.0
# platform-facts.md:1326 (§2.11): GtkNotebook places each tab at the previous one's end (gtknotebook.c:5294)
item_gap_px = 0.0
# platform-facts.md:1328-1329 (§2.11): a checked notebook tab is inset 0 -4px, along its bottom edge (_notebook.scss:19)
active_indicator_width_px = 4.0
active_indicator_side = "bottom"


[dark.tab.border]
# platform-facts.md:1318-1319 (§2.11): Adwaita CSS 12; 3
padding_horizontal_px = 12.0
padding_vertical_px = 3.0
[dark.menu]
row_height_px = 32.0
icon_text_gap_px = 8.0


[dark.menu.border]
# platform-facts.md:1235-1236 (§2.6): Adwaita CSS 12 ($menu_padding); 0
padding_horizontal_px = 12.0
padding_vertical_px = 0.0
[dark.list]
# row_height not stated: platform-facts.md:1389 (§2.15), plain list context, no min-height


[dark.list.border]
# platform-facts.md:1390-1391 (§2.15): Adwaita CSS plain list context, 2
padding_horizontal_px = 2.0
padding_vertical_px = 2.0
[dark.toolbar]
# bar_height not stated: platform-facts.md:1351 (§2.13), .toolbar sets no min-height
# platform-facts.md:1352 (§2.13): Adwaita CSS .toolbar border-spacing 6
item_gap_px = 6.0


[dark.toolbar.border]
# platform-facts.md:1353-1354 (§2.13): Adwaita CSS .toolbar { padding: 6px }
padding_horizontal_px = 6.0
padding_vertical_px = 6.0


[dark.status_bar.border]
# platform-facts.md:1372-1373 (§2.14): Adwaita CSS statusbar { padding: 6px 10px }
padding_horizontal_px = 10.0
padding_vertical_px = 6.0


[dark.popover.border]
# platform-facts.md:1412-1413 (§2.16): Adwaita CSS popover > contents { padding: 8px }
padding_horizontal_px = 8.0
padding_vertical_px = 8.0

[dark.splitter]
divider_width_px = 1.0

[dark.switch]
track_width_px = 46.0
track_height_px = 26.0
thumb_diameter_px = 20.0
track_radius_px = 14.0

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


[dark.dialog.title_font]
# platform-facts.md:1496-1497 (§2.22): .title-2, ≈15pt ExtraBold
size_pt =15.0
weight = 800


[dark.dialog.border]
corner_radius_px = 18.0
# platform-facts.md:1491-1492 (§2.22): 24; 32 top / 24 bottom
padding_horizontal_px = 24.0
padding_top_px = 32.0
padding_bottom_px = 24.0
[dark.link]
underline_enabled = true

[dark.spinner]
diameter_px = 16.0
min_diameter_px = 16.0
stroke_width_px = 2.0

[dark.combo_box]
min_height_px = 34.0
min_width_px = 120.0
arrow_icon_size_px =16.0
# arrow_area_width not stated: platform-facts.md:1554 (§2.24), (none), inline icon


[dark.combo_box.border]
# platform-facts.md:1552, :1557 (§2.24): Adwaita CSS base button rule, as the dropdown's button has a box child: 10; 5
padding_horizontal_px = 10.0
padding_vertical_px = 5.0
[dark.segmented_control]
segment_height_px = 28.0
separator_width_px = 1.0


[dark.segmented_control.border]
# platform-facts.md:1571, :1576 (§2.25): AdwToggleGroup text toggle, Adwaita CSS 11 − 3 = 8; 0 (no rule pads a toggle vertically)
padding_horizontal_px = 8.0
padding_vertical_px = 0.0


[dark.card]


[dark.card.border]
corner_radius_px = 12.0
[dark.expander]
header_height_px = 50.0
arrow_icon_size_px =16.0
# platform-facts.md:1613-1616 (§2.27): AdwExpanderRow, the arrow at the row's end, 3 + 6 from
# the content before it, the nested list unindented, the whole a boxed-list card
arrow_side = "trailing"
arrow_gap_px = 9.0
content_indent_px = 0.0
frame_enabled = true


[dark.expander.border]
corner_radius_px = 6.0
# platform-facts.md:1607-1608 (§2.27): AdwExpanderRow header, Adwaita CSS row 2 + header margin 12 = 14; row 2 + title margin 6 = 8
padding_horizontal_px = 14.0
padding_vertical_px = 8.0