diff options
author | William Jon McCann <jmccann@redhat.com> | 2012-08-16 13:44:14 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2012-08-16 13:56:54 -0400 |
commit | 06ce7efe10f9953a462cbce707d58cf29f839245 (patch) | |
tree | 1da6e07741384aa54c552a45ff9d720ffb10c667 | |
parent | 5bb55d500e5a8b659a3c19b14d425fc1be81bb9b (diff) | |
download | nautilus-06ce7efe10f9953a462cbce707d58cf29f839245.tar.gz |
Wrap and possibly scroll when image properties are long
https://bugzilla.gnome.org/show_bug.cgi?id=641822
-rw-r--r-- | src/nautilus-image-properties-page.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/nautilus-image-properties-page.c b/src/nautilus-image-properties-page.c index 1516a829f..67f7f80cc 100644 --- a/src/nautilus-image-properties-page.c +++ b/src/nautilus-image-properties-page.c @@ -147,6 +147,7 @@ append_item (NautilusImagePropertiesPage *page, if (value != NULL) { label = gtk_label_new (value); + gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); gtk_grid_attach_next_to (GTK_GRID (page->details->grid), label, name_label, GTK_POS_RIGHT, @@ -591,23 +592,32 @@ nautilus_image_properties_page_class_init (NautilusImagePropertiesPageClass *cla static void nautilus_image_properties_page_init (NautilusImagePropertiesPage *page) { + GtkWidget *sw; + page->details = G_TYPE_INSTANCE_GET_PRIVATE (page, NAUTILUS_TYPE_IMAGE_PROPERTIES_PAGE, NautilusImagePropertiesPageDetails); gtk_orientable_set_orientation (GTK_ORIENTABLE (page), GTK_ORIENTATION_VERTICAL); gtk_box_set_homogeneous (GTK_BOX (page), FALSE); - gtk_box_set_spacing (GTK_BOX (page), 2); - gtk_container_set_border_width (GTK_CONTAINER (page), 6); + gtk_box_set_spacing (GTK_BOX (page), 0); + gtk_container_set_border_width (GTK_CONTAINER (page), 0); + + sw = gtk_scrolled_window_new (NULL, NULL); + gtk_container_set_border_width (GTK_CONTAINER (sw), 0); + gtk_widget_set_vexpand (GTK_WIDGET (sw), TRUE); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + gtk_box_pack_start (GTK_BOX (page), sw, FALSE, TRUE, 2); page->details->grid = gtk_grid_new (); + gtk_container_set_border_width (GTK_CONTAINER (page->details->grid), 6); gtk_orientable_set_orientation (GTK_ORIENTABLE (page->details->grid), GTK_ORIENTATION_VERTICAL); gtk_grid_set_row_spacing (GTK_GRID (page->details->grid), 6); gtk_grid_set_column_spacing (GTK_GRID (page->details->grid), 20); append_item (page, _("Loading..."), NULL); - gtk_box_pack_start (GTK_BOX (page), - page->details->grid, - FALSE, TRUE, 2); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), page->details->grid); gtk_widget_show_all (GTK_WIDGET (page)); } |