ToolbarStyle#

Added in version 1.4.

class ToolbarStyle#

Describes the possible top or bottom bar styles in an ToolbarView widget.

flat is suitable for simple content, such as StatusPage or PreferencesPage, where the background at the top and bottom parts of the page is uniform. Additionally, windows with sidebars should always use this style.

<picture style=”min-width: 33%; display: inline-block;”>

<source srcset=”toolbar-view-flat-1-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”toolbar-view-flat-1.png” alt=”toolbar-view-flat-1”>

</picture> <picture style=”min-width: 33%; display: inline-block;”>

<source srcset=”toolbar-view-flat-2-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”toolbar-view-flat-2.png” alt=”toolbar-view-flat-2”>

</picture>

raised style is suitable for content such as utility panes, where some elements are directly adjacent to the top/bottom bars, or TabView, where each page can have a different background.

raised-border style is similar to raised, but with the shadow replaced with a more subtle border. It’s intended to be used in applications like image viewers, where a shadow over the content might be undesired.

<picture style=”min-width: 33%; display: inline-block;”>

<source srcset=”toolbar-view-raised-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”toolbar-view-raised.png” alt=”toolbar-view-raised”>

</picture> <picture style=”min-width: 33%; display: inline-block;”>

<source srcset=”toolbar-view-raised-border-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”toolbar-view-raised-border.png” alt=”toolbar-view-raised-border”>

</picture>

See top_bar_style and bottom_bar_style.

New values may be added to this enumeration over time.

Fields#

class ToolbarStyle
FLAT#

No background, shadow only for scrolled content

RAISED#

Opaque background with a persistent shadow

RAISED_BORDER#

Opaque background with a persistent border