AdwWindow

A freeform window.

<picture> <source srcset="window-dark.png" media="(prefers-color-scheme: dark)"> <img src="window.png" alt="window"> </picture>

The adw.window.Window widget is a subclass of gtk.window.Window which has no titlebar area. Instead, class@ToolbarView can be used together with class@HeaderBar or gtk.header_bar.HeaderBar as follows:

<object class="AdwWindow">
  <property name="content">
    <object class="AdwToolbarView">
      <child type="top">
        <object class="AdwHeaderBar"/>
      </child>
      <property name="content">
        <!-- ... -->
      </property>
    </object>
  </property>
</object>

Using gtk.window.Window.Widget or gtk.window.Window.Widget is not supported and will result in a crash. Use property@Window:content instead.

Dialogs

adw.window.Window can contain class@Dialog. Use adw.dialog.Dialog.present with the window or a widget within a window to show a dialog.

Breakpoints

adw.window.Window can be used with class@Breakpoint the same way as class@BreakpointBin. Refer to that widget's documentation for details.

struct AdwWindow {}

Members

Variables

parentInstance
GtkWindow parentInstance;

Examples

<object class="AdwWindow">
  <property name="width-request">360</property>
  <property name="height-request">200</property>
  <property name="content">
    <object class="AdwToolbarView">
      <child type="top">
        <object class="AdwHeaderBar"/>
      </child>
      <property name="content">
        <!-- ... -->
      </property>
      <child type="bottom">
        <object class="GtkActionBar" id="bottom_bar">
          <property name="revealed">True</property>
          <property name="visible">False</property>
        </object>
      </child>
    </object>
  </property>
  <child>
    <object class="AdwBreakpoint">
      <condition>max-width: 500px</condition>
      <setter object="bottom_bar" property="visible">True</setter>
    </object>
  </child>
</object>

Like adw.breakpoint_bin.BreakpointBin, if breakpoints are used, adw.window.Window doesn't have a minimum size, and property@Gtk.Widget:width-request and property@Gtk.Widget:height-request properties must be set manually.