adw.dialog.Dialog is similar to a window, but is shown within another window. It
can be used with class@Window and class@ApplicationWindow, use
adw.dialog.Dialog.present to show it.
adw.dialog.Dialog is not resizable. Use the property@Dialog:content-width and
property@Dialog:content-height properties to set its size, or set
property@Dialog:follows-content-size to TRUE to make the dialog track the
content's size as it changes. adw.dialog.Dialog can never be larger than its parent
window.
adw.dialog.Dialog can be presented as a centered floating window or a bottom sheet.
By default it's automatic depending on the available size.
property@Dialog:presentation-mode can be used to change that.
When placed inside an adw.dialog.Dialog, class@HeaderBar will display the dialog
title instead of window title. It will also adjust the decoration layout to
ensure it always has a close button and nothing else. Set
property@HeaderBar:show-start-title-buttons and
property@HeaderBar:show-end-title-buttons to FALSE to remove it if it's
unwanted.
adw.dialog.Dialog can be used with class@Breakpoint the same way as
class@BreakpointBin. Refer to that widget's documentation for details.
Like adw.breakpoint_bin.BreakpointBin, if breakpoints are used, adw.dialog.Dialog doesn't have a
minimum size, and property@Gtk.Widget:width-request and
property@Gtk.Widget:height-request properties must be set manually.
An adaptive dialog container.
<picture> <source srcset="dialog-floating-dark.png" media="(prefers-color-scheme: dark)"> <img src="dialog-floating.png" alt="dialog-floating"> </picture> <picture> <source srcset="dialog-bottom-dark.png" media="(prefers-color-scheme: dark)"> <img src="dialog-bottom.png" alt="dialog-bottom"> </picture>
adw.dialog.Dialog is similar to a window, but is shown within another window. It can be used with class@Window and class@ApplicationWindow, use adw.dialog.Dialog.present to show it.
adw.dialog.Dialog is not resizable. Use the property@Dialog:content-width and property@Dialog:content-height properties to set its size, or set property@Dialog:follows-content-size to TRUE to make the dialog track the content's size as it changes. adw.dialog.Dialog can never be larger than its parent window.
adw.dialog.Dialog can be presented as a centered floating window or a bottom sheet. By default it's automatic depending on the available size. property@Dialog:presentation-mode can be used to change that.
adw.dialog.Dialog can be closed via adw.dialog.Dialog.close.
When presented as a bottom sheet, adw.dialog.Dialog can also be closed via swiping it down.
The property@Dialog:can-close can be used to prevent closing. In that case, signal@Dialog::close-attempt gets emitted instead.
Use adw.dialog.Dialog.forceClose to close the dialog even when can-close is set to FALSE.
Header Bar Integration
When placed inside an adw.dialog.Dialog, class@HeaderBar will display the dialog title instead of window title. It will also adjust the decoration layout to ensure it always has a close button and nothing else. Set property@HeaderBar:show-start-title-buttons and property@HeaderBar:show-end-title-buttons to FALSE to remove it if it's unwanted.
Breakpoints
adw.dialog.Dialog can be used with class@Breakpoint the same way as class@BreakpointBin. Refer to that widget's documentation for details.
Like adw.breakpoint_bin.BreakpointBin, if breakpoints are used, adw.dialog.Dialog doesn't have a minimum size, and property@Gtk.Widget:width-request and property@Gtk.Widget:height-request properties must be set manually.