ToolbarView
Added in version 1.4.
Superclasses: Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Buildable
, ConstraintTarget
- Constructors:
ToolbarView(**properties)
new() -> Gtk.Widget
Constructors
Methods
- class ToolbarView
- add_bottom_bar(widget: Widget) None
Adds a bottom bar to
self
.Added in version 1.4.
- Parameters:
widget – a widget
- add_top_bar(widget: Widget) None
Adds a top bar to
self
.Added in version 1.4.
- Parameters:
widget – a widget
- get_bottom_bar_height() int
Gets the current bottom bar height for
self
.Bottom bar height does change depending on
reveal_bottom_bars
, including during the transition.See
get_top_bar_height
.Added in version 1.4.
- get_bottom_bar_style() ToolbarStyle
Gets appearance of the botom bars for
self
.Added in version 1.4.
- get_extend_content_to_bottom_edge() bool
Gets whether the content widget can extend behind bottom bars.
Added in version 1.4.
- get_extend_content_to_top_edge() bool
Gets whether the content widget can extend behind top bars.
Added in version 1.4.
- get_reveal_bottom_bars() bool
Gets whether bottom bars are revealed for
self
.Added in version 1.4.
- get_top_bar_height() int
Gets the current top bar height for
self
.Top bar height does change depending on
reveal_top_bars
, including during the transition.See
get_bottom_bar_height
.Added in version 1.4.
- get_top_bar_style() ToolbarStyle
Gets appearance of the top bars for
self
.Added in version 1.4.
- remove(widget: Widget) None
Removes a child from
self
.Added in version 1.4.
- Parameters:
widget – the child to be removed
- set_bottom_bar_style(style: ToolbarStyle) None
Sets appearance of the bottom bars for
self
.If set to
ADW_TOOLBAR_FLAT
, bottom bars are flat and scrolling content has a subtle undershoot shadow when touching them, same as the`.undershoot-bottom
<style-classes.html#undershoot-indicators>`_ style class. This works well for simple content, e.g.StatusPage
orPreferencesPage
, where the background at the bottom of the page is uniform. Additionally, windows with sidebars should always use this style.Undershoot shadow is only present if a bottom bar is actually present and visible. It is also never present if
extend_content_to_bottom_edge
is set toTRUE
.If set to
ADW_TOOLBAR_RAISED
, bottom bars have an opaque background and a persistent shadow, this is suitable for content such as utility panes, where some elements are directly adjacent to the bottom bars, orTabView
, where each page can have a different background.ADW_TOOLBAR_RAISED_BORDER
is similar toADW_TOOLBAR_RAISED
, but the shadow is replaced with a more subtle border. This can be useful for applications like image viewers.See also
set_top_bar_style
.Added in version 1.4.
- Parameters:
style – bottom bar style
- set_content(content: Widget | None = None) None
Sets the content widget for
self
.Added in version 1.4.
- Parameters:
content – the content widget
- set_extend_content_to_bottom_edge(extend: bool) None
Sets whether the content widget can extend behind bottom bars.
This can be used in combination with
reveal_bottom_bars
to show and hide toolbars in fullscreen.See
set_extend_content_to_top_edge
.Added in version 1.4.
- Parameters:
extend – whether content extends behind bottom bars
- set_extend_content_to_top_edge(extend: bool) None
Sets whether the content widget can extend behind top bars.
This can be used in combination with
reveal_top_bars
to show and hide toolbars in fullscreen.See
set_extend_content_to_bottom_edge
.Added in version 1.4.
- Parameters:
extend – whether content extends behind top bars
- set_reveal_bottom_bars(reveal: bool) None
Sets whether bottom bars are revealed for
self
.The transition will be animated.
This can be used in combination with
extend_content_to_bottom_edge
to show and hide toolbars in fullscreen.See
set_reveal_top_bars
.Added in version 1.4.
- Parameters:
reveal – whether to reveal bottom bars
- set_reveal_top_bars(reveal: bool) None
Sets whether top bars are revealed for
self
.The transition will be animated.
This can be used in combination with
extend_content_to_top_edge
to show and hide toolbars in fullscreen.See
set_reveal_bottom_bars
.Added in version 1.4.
- Parameters:
reveal – whether to reveal top bars
- set_top_bar_style(style: ToolbarStyle) None
Sets appearance of the top bars for
self
.If set to
ADW_TOOLBAR_FLAT
, top bars are flat and scrolling content has a subtle undershoot shadow when touching them, same as the`.undershoot-top
<style-classes.html#undershoot-indicators>`_ style class. This works well for simple content, e.g.StatusPage
orPreferencesPage
, where the background at the top of the page is uniform. Additionally, windows with sidebars should always use this style.Undershoot shadow is only present if a top bar is actually present and visible. It is also never present if
extend_content_to_top_edge
is set toTRUE
.If set to
ADW_TOOLBAR_RAISED
, top bars have an opaque background and a persistent shadow, this is suitable for content such as utility panes, where some elements are directly adjacent to the top bars, orTabView
, where each page can have a different background.ADW_TOOLBAR_RAISED_BORDER
is similar toADW_TOOLBAR_RAISED
, but the shadow is replaced with a more subtle border. This can be useful for applications like image viewers.See also
set_bottom_bar_style
.Added in version 1.4.
- Parameters:
style – top bar style
Properties
- class ToolbarView
- props.bottom_bar_height: int
The current bottom bar height.
Bottom bar height does change depending on
reveal_bottom_bars
, including during the transition.See
top_bar_height
.Added in version 1.4.
- props.bottom_bar_style: ToolbarStyle
Appearance of the bottom bars.
If set to
ADW_TOOLBAR_FLAT
, bottom bars are flat and scrolling content has a subtle undershoot shadow when touching them, same as the`.undershoot-bottom
<style-classes.html#undershoot-indicators>`_ style class. This works well for simple content, e.g.StatusPage
orPreferencesPage
, where the background at the bottom of the page is uniform. Additionally, windows with sidebars should always use this style.Undershoot shadow is only present if a bottom bar is actually present and visible. It is also never present if
extend_content_to_bottom_edge
is set toTRUE
.If set to
ADW_TOOLBAR_RAISED
, bottom bars have an opaque background and a persistent shadow, this is suitable for content such as utility panes, where some elements are directly adjacent to the bottom bars, orTabView
, where each page can have a different background.ADW_TOOLBAR_RAISED_BORDER
is similar toADW_TOOLBAR_RAISED
, but the shadow is replaced with a more subtle border. This can be useful for applications like image viewers.See also
top_bar_style
.Added in version 1.4.
- props.extend_content_to_bottom_edge: bool
Whether the content widget can extend behind bottom bars.
This can be used in combination with
reveal_bottom_bars
to show and hide toolbars in fullscreen.See
extend_content_to_top_edge
.Added in version 1.4.
- props.extend_content_to_top_edge: bool
Whether the content widget can extend behind top bars.
This can be used in combination with
reveal_top_bars
to show and hide toolbars in fullscreen.See
extend_content_to_bottom_edge
.Added in version 1.4.
- props.reveal_bottom_bars: bool
Whether bottom bars are visible.
The transition will be animated.
This can be used in combination with
extend_content_to_bottom_edge
to show and hide toolbars in fullscreen.See
reveal_top_bars
.Added in version 1.4.
- props.reveal_top_bars: bool
Whether top bars are revealed.
The transition will be animated.
This can be used in combination with
extend_content_to_top_edge
to show and hide toolbars in fullscreen.See
reveal_bottom_bars
.Added in version 1.4.
- props.top_bar_height: int
The current top bar height.
Top bar height does change depending
reveal_top_bars
, including during the transition.See
bottom_bar_height
.Added in version 1.4.
- props.top_bar_style: ToolbarStyle
Appearance of the top bars.
If set to
ADW_TOOLBAR_FLAT
, top bars are flat and scrolling content has a subtle undershoot shadow when touching them, same as the`.undershoot-top
<style-classes.html#undershoot-indicators>`_ style class. This works well for simple content, e.g.StatusPage
orPreferencesPage
, where the background at the top of the page is uniform. Additionally, windows with sidebars should always use this style.Undershoot shadow is only present if a top bar is actually present and visible. It is also never present if
extend_content_to_top_edge
is set toTRUE
.If set to
ADW_TOOLBAR_RAISED
, top bars have an opaque background and a persistent shadow, this is suitable for content such as utility panes, where some elements are directly adjacent to the top bars, orTabView
, where each page can have a different background.ADW_TOOLBAR_RAISED_BORDER
is similar toADW_TOOLBAR_RAISED
, but the shadow is replaced with a more subtle border. This can be useful for applications like image viewers.See also
bottom_bar_style
.Added in version 1.4.