Nutrient Main Toolbar Defaults
Defaults for NutrientMainToolbar, one per parameter, so a host overrides one value and inherits the rest — the TopAppBarDefaults shape. The Floating… values are the matching set for a toolbar composed as a pill over the document rather than docked to the window edge.
The toolbar has no width parameter: it is as wide as its content, and grows when a piece of that content fills the width (the default search bar does, with Modifier.fillMaxWidth()). A caller's width modifier wins over both, so Modifier.fillMaxWidth() is the full-bleed bar and Modifier.width(240.dp) is a fixed one.
Properties
The show animation: sliding down from past the top edge, matching the View toolbar.
The hide animation: sliding up past the top edge, matching the View toolbar.
A floating toolbar's clearance from the edge it is anchored to, as Modifier.padding.
A floating toolbar's shadow elevation, higher than the docked bar's.
The shape of a floating toolbar — a 28dp pill.
How the items indicate press, hover and selection — ToolbarItemIndication.Default.
No insets at all — for a toolbar whose container already consumed the window insets (a windowInsetsPadding on the Box that positions a floating pill, say), so the strip is never reserved twice.
The docked bar's shadow elevation, from the pspdf__toolbar_elevation dimension.
NutrientMainToolbarTitle's text style: the ambient text style at the View toolbar's 20sp.
Functions
The toolbar's colors from the ambient com.pspdfkit.compose.theme.NutrientTheme — the XML theme's action-bar colors unless the host supplied a scheme. Override one with copy: NutrientMainToolbarDefaults.colors().copy(backgroundColor = …).
NutrientMainToolbar's default insets: the ones coordinator carries in its frame (com.pspdfkit.compose.toolbar.state.ToolbarFrame.insets, settable with ToolbarCoordinator.setMainToolbarInsets), unioned with the side system bars.