TabButton

Added in version 1.3.

class TabButton(**properties: Any)

Superclasses: Widget, InitiallyUnowned, Object

Implemented Interfaces: Accessible, Actionable, Buildable, ConstraintTarget

A button that displays the number of TabView pages.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/tab-button.png

AdwTabButton is a button that displays the number of pages in a given AdwTabView, as well as whether one of the inactive pages needs attention.

It’s intended to be used as a visible indicator when there’s no visible tab bar, typically opening an TabOverview on click, e.g. via the overview.open action name:

<object class="AdwTabButton">
  <property name="view">view</property>
  <property name="action-name">overview.open</property>
</object>

CSS nodes

AdwTabButton has a main CSS node with name tabbutton.

Accessibility

AdwTabButton uses the GTK_ACCESSIBLE_ROLE_BUTTON role.

Constructors

class TabButton
classmethod new() Widget

Creates a new AdwTabButton.

Added in version 1.3.

Methods

class TabButton
get_view() TabView | None

Gets the tab view self displays.

Added in version 1.3.

set_view(view: TabView | None = None) None

Sets the tab view to display.

Added in version 1.3.

Parameters:

view – a tab view

Properties

class TabButton
props.view: TabView

The view the tab button displays.

Added in version 1.3.

Signals

class TabButton.signals
activate() None

Emitted to animate press then release.

This is an action signal. Applications should never connect to this signal, but use the clicked signal.

Added in version 1.3.

clicked() None

Emitted when the button has been activated (pressed and released).

Added in version 1.3.