Banner#
Added in version 1.3.
Superclasses: Widget, InitiallyUnowned, Object
Implemented Interfaces: Accessible, Actionable, Buildable, ConstraintTarget
A bar with contextual information.
Banners are hidden by default, use revealed to show them.
Banners have a title, set with title. Titles can be marked
up with Pango markup, use use_markup to enable it.
The title will be shown centered or left-aligned depending on available space.
Banners can optionally have a button with text on it, set through
button_label. The button can be used with a GAction,
or with the button_clicked signal.
CSS nodes#
AdwBanner has a main CSS node with the name banner.
Constructors#
Methods#
- class Banner
-
- get_use_markup() → bool#
Gets whether to use Pango markup for the banner title.
Added in version 1.3.
- set_button_label(label: str | None = None) → None#
Sets the button label for
self.If set to
""orNULL, the button won’t be shown.The button can be used with a
GAction, or with thebutton_clickedsignal.Added in version 1.3.
- Parameters:
label – the label
- set_revealed(revealed: bool) → None#
Sets whether a banner should be revealed
Added in version 1.3.
- Parameters:
revealed – whether a banner should be revealed
- set_title(title: str) → None#
Sets the title for this banner.
See also:
use_markup.Added in version 1.3.
- Parameters:
title – the title
- set_use_markup(use_markup: bool) → None#
Sets whether to use Pango markup for the banner title.
See also
parse_markup.Added in version 1.3.
- Parameters:
use_markup – whether to use markup
Properties#
- class Banner