app: derive GimpDisplayShell from GtkBox instead of GtkVBox
and avoid gtk_container_add() on boxes in some more plavces.
This commit is contained in:
@ -119,8 +119,8 @@ gimp_display_shell_filter_dialog_new (GimpDisplayShell *shell)
|
||||
|
||||
editor = gimp_color_display_editor_new (shell->filter_stack);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
|
||||
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (cdd->dialog))),
|
||||
editor);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (cdd->dialog))),
|
||||
editor, TRUE, TRUE, 0);
|
||||
gtk_widget_show (editor);
|
||||
|
||||
return cdd->dialog;
|
||||
|
@ -150,8 +150,8 @@ gimp_display_shell_scale_dialog (GimpDisplayShell *shell)
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
||||
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (shell->scale_dialog))),
|
||||
table);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (shell->scale_dialog))),
|
||||
table, TRUE, TRUE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
row = 0;
|
||||
|
@ -160,7 +160,7 @@ static void gimp_display_shell_transform_overlay (GimpDisplayShell *shell,
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpDisplayShell, gimp_display_shell,
|
||||
GTK_TYPE_VBOX,
|
||||
GTK_TYPE_BOX,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PROGRESS,
|
||||
gimp_display_shell_progress_iface_init)
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_COLOR_MANAGED,
|
||||
@ -274,6 +274,9 @@ gimp_color_managed_iface_init (GimpColorManagedInterface *iface)
|
||||
static void
|
||||
gimp_display_shell_init (GimpDisplayShell *shell)
|
||||
{
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (shell),
|
||||
GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
shell->options = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS, NULL);
|
||||
shell->fullscreen_options = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN, NULL);
|
||||
shell->no_image_options = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_NO_IMAGE, NULL);
|
||||
|
@ -47,7 +47,7 @@ typedef struct _GimpDisplayShellClass GimpDisplayShellClass;
|
||||
|
||||
struct _GimpDisplayShell
|
||||
{
|
||||
GtkVBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
/* --- cacheline 2 boundary (128 bytes) was 20 bytes ago --- */
|
||||
|
||||
@ -211,7 +211,7 @@ struct _GimpDisplayShell
|
||||
|
||||
struct _GimpDisplayShellClass
|
||||
{
|
||||
GtkVBoxClass parent_class;
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
void (* scaled) (GimpDisplayShell *shell);
|
||||
void (* scrolled) (GimpDisplayShell *shell);
|
||||
|
Reference in New Issue
Block a user