HdyDialog

HdyDialog — An adaptive dialog

Functions

GtkWidget * hdy_dialog_new ()

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── GtkDialog
                            ╰── HdyDialog

Implemented Interfaces

HdyDialog implements AtkImplementorIface and GtkBuildable.

Description

A GtkDialog that adapts to smaller displays

Small is defined as:

1
2
is_small = ((             width <= 400 && height <= 800) ||
            (maximized && width <= 800 && height <= 400));

In the smaller view a HdyDialog matches it's size to that of it's parent and for "Presentation Dialogs" uses a back button rather than close button to dismiss.

It's recommended that dialog contents are wrapped in a GtkScrolledWindow to ensure they don't overflow the screen

HdyDialog works best when “use-header-bar” is TRUE (which is the case when using hdy_dialog_new())

Design Information: GitLab Issue

Ideally when using HdyDialog you shouldn't need to know you are using it rather than GtkDialog however there are some notable differences: “modal” is TRUE by default as is “destroy-with-parent” as the behaviour demonstrated by HdyDialog would be a bad user experiance when not moda

Functions

hdy_dialog_new ()

GtkWidget *
hdy_dialog_new (GtkWindow *parent);

Create a HdyDialog with “transient-for” set to parent

C Usage

1
GtkWidget *dlg = hdy_dialog_new (GTK_WINDOW (main_window));

Vala Usage

1
var dlg = new Hdy.Dialog (main_window);

Python Usage

1
dlg = Handy.Dialog.new (main_window);

Parameters

parent

GtkWindow this dialog is a child of

 

Since: 0.0.7

Types and Values

HDY_TYPE_DIALOG

#define HDY_TYPE_DIALOG (hdy_dialog_get_type())

HdyDialogClass

typedef struct {
  GtkDialogClass parent_class;
} HdyDialogClass;

HdyDialog

typedef struct _HdyDialog HdyDialog;