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

app: fix width of GimpThumbBox' thumbnail generation progressbar

using CSS and GTK_ALIGN_FILL. The progress is currently not visible,
there is a bug in Adwaita that is about to be fixed upstream.
parent 7efb8576
......@@ -223,6 +223,8 @@ gimp_file_dialog_class_init (GimpFileDialogClass *klass)
GIMP_FILE_PROCEDURE_GROUP_NONE,
GIMP_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY));
gtk_widget_class_set_css_name (widget_class, "GimpFileDialog");
}
static void
......
......@@ -415,9 +415,10 @@ gimp_thumb_box_new (GimpContext *context)
gtk_widget_show (box->info);
box->progress = gtk_progress_bar_new ();
gtk_widget_set_halign (box->progress, GTK_ALIGN_FILL);
gtk_progress_bar_set_show_text (GTK_PROGRESS_BAR (box->progress), TRUE);
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (box->progress), "Fog");
gtk_box_pack_end (GTK_BOX (vbox2), box->progress, FALSE, FALSE, 0);
gtk_widget_set_no_show_all (box->progress, TRUE);
/* don't gtk_widget_show (box->progress); */
gtk_widget_set_size_request (GTK_WIDGET (box),
......@@ -586,8 +587,8 @@ gimp_thumb_box_create_thumbnails (GimpThumbBox *box,
gimp_progress_set_value (progress, 0.0);
while (gtk_events_pending ())
gtk_main_iteration ();
while (g_main_context_pending (NULL))
g_main_context_iteration (NULL, FALSE);
gimp_thumb_box_create_thumbnail (box,
list->data,
......@@ -607,8 +608,8 @@ gimp_thumb_box_create_thumbnails (GimpThumbBox *box,
gimp_progress_set_value (progress, 0.0);
while (gtk_events_pending ())
gtk_main_iteration ();
while (g_main_context_pending (NULL))
g_main_context_iteration (NULL, FALSE);
}
if (box->files)
......
......@@ -133,6 +133,12 @@ GimpDisplayShell progressbar progress {
min-height: 1em;
}
GimpFileDialog progressbar trough,
GimpFileDialog progressbar progress {
min-width: 1px; /* hack */
min-height: 1em;
}
GimpRuler {
font-size: smaller;
}
......
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