Nutrient Contextual Toolbar Defaults
Defaults for NutrientContextualToolbar, one per parameter, so a host overrides one value and inherits the rest — the TopAppBarDefaults shape — plus the sizing constants the bar shares with NutrientToolbarScaffold (the Compose home of the View ToolbarCoordinatorLayout styleable defaults).
The bar has two looks, chosen by where it is docked: a flat strip spanning the window when top-docked (Shape, no border) and a detached, rounded, bordered bar when docked to a side (SideDockedShape, sideDockedBorder) — the View roundCornersIfVertical() treatment. A host that wants one look everywhere passes the same value for both.
Properties
Corner radius of the side drop-zone placeholders (the View MENU_BAR_CORNER_RADIUS_DP).
Duration of the drop-zone fade (the View TOOLBARS_FADE_DURATION_MS).
The show animation: a fade, the View ToolbarCoordinatorLayout's show/hide animation class.
The hide animation: a fade, matching enterTransition.
Margin between a side-docked vertical bar and its window edge (pspdf__vertical_toolbar_horizontal_margin).
How the items indicate press, hover and selection — ToolbarItemIndication.Default.
No insets at all — the default, because the bar's insets are its container's business: NutrientToolbarScaffold places the bar inside the window insets and paints the status-bar strip itself, and a host positioning the bar in its own Box pads that. Pass real insets only for a bar composed edge to edge with nothing around it.
The bar's shadow elevation, from the pspdf__toolbar_elevation dimension.
The side-docked bar's border width — the View ContextualToolbarMenuBar.BORDER_STROKE_WIDTH_DP.
The side-docked bar's shape — detached from the window edge with 16dp corners, the View ContextualToolbarMenuBar.CORNER_RADIUS_DP.
The contextual bar's cross-axis size (the View pspdf__contextualToolbarHeight, 58dp).
Margin above and below a side-docked vertical bar (pspdf__vertical_toolbar_vertical_margin).
Functions
The bar's colors: the ambient theme's main-toolbar scheme with the XML pspdf__contextualToolbarStyle attributes — background, icon, activated icon and submenu background — laid over it, which is what the View bars painted. The bar reuses MainToolbarColors because its buttons and submenu sheet are the main toolbar's; popup is the submenu sheet's background. Override one with copy: NutrientContextualToolbarDefaults.colors().copy(backgroundColor = …).
The themed drop-zone placeholder color — the View pspdf__dragTargetColor styleable of pspdf__ToolbarCoordinatorLayout, resolved with the same default chain.
The side-docked bar's border: SideDockedBorderWidth in the XML pspdf__contextualToolbarStyle border color.
The theme's android:statusBarColor — what the View dispatchDraw painted into the strip above a top-docked contextual bar (statusBarPaint). Transparent when the theme doesn't define one (edge-to-edge hosts that manage the strip themselves).
The themed contextual bar cross-axis size — the View pspdf__contextualToolbarHeight styleable of pspdf__ToolbarCoordinatorLayout, resolved with the same default chain (ToolbarSize when the theme doesn't override it).