Commit 55066996 authored by Michael Natterer's avatar Michael Natterer 😴

622863 - Input Devices list is not resizeable

Derive from GtkPaned instead of GtkBox, and change the handle size to
12px via gtkrc so spacing rules are followed.
parent 8a8e8c6f
......@@ -107,7 +107,7 @@ static void gimp_device_editor_delete_clicked (GtkWidget *button,
GimpDeviceEditor *editor);
G_DEFINE_TYPE (GimpDeviceEditor, gimp_device_editor, GTK_TYPE_BOX)
G_DEFINE_TYPE (GimpDeviceEditor, gimp_device_editor, GTK_TYPE_PANED)
#define parent_class gimp_device_editor_parent_class
......@@ -145,15 +145,13 @@ gimp_device_editor_init (GimpDeviceEditor *editor)
gtk_orientable_set_orientation (GTK_ORIENTABLE (editor),
GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing (GTK_BOX (editor), 12);
gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (GTK_WIDGET (editor)),
GTK_ICON_SIZE_BUTTON,
&icon_width, &icon_height);
private->treeview = gimp_container_tree_view_new (NULL, NULL, icon_height, 0);
gtk_widget_set_size_request (private->treeview, 200, -1);
gtk_box_pack_start (GTK_BOX (editor), private->treeview, FALSE, FALSE, 0);
gtk_paned_pack1 (GTK_PANED (editor), private->treeview, FALSE, TRUE);
gtk_widget_show (private->treeview);
g_signal_connect_object (private->treeview, "select-item",
......@@ -172,7 +170,7 @@ gimp_device_editor_init (GimpDeviceEditor *editor)
gtk_widget_set_sensitive (private->delete_button, FALSE);
vbox = gtk_vbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (editor), vbox, TRUE, TRUE, 0);
gtk_paned_pack2 (GTK_PANED (editor), vbox, TRUE, TRUE);
gtk_widget_show (vbox);
ebox = gtk_event_box_new ();
......
......@@ -34,12 +34,12 @@ typedef struct _GimpDeviceEditorClass GimpDeviceEditorClass;
struct _GimpDeviceEditor
{
GtkBox parent_instance;
GtkPaned parent_instance;
};
struct _GimpDeviceEditorClass
{
GtkBoxClass parent_class;
GtkPanedClass parent_class;
};
......
......@@ -47,6 +47,7 @@ style "gimp-default-style"
GimpDockbook::tab-icon-size = button
GimpColorNotebook::tab-border = 0
GimpColorNotebook::tab-icon-size = button
GimpDeviceEditor::handle-size = 12
GimpDockable::content-border = 2
GimpEditor::content-spacing = 2
GimpEditor::button-spacing = 2
......
......@@ -54,6 +54,7 @@ style "gimp-default-style"
GimpDockbook::tab-icon-size = menu
GimpColorNotebook::tab-border = 0
GimpColorNotebook::tab-icon-size = menu
GimpDeviceEditor::handle-size = 12
GimpDockable::content-border = 1
GimpEditor::content-spacing = 1
GimpEditor::button-spacing = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment