Gtk "thin" progress bar

I'm wondering how to achieve a progressbar / loader similar to the one used by Epiphany (aka Gnome Web). See attached screenshot:

enter image description here

+3


source to share


1 answer


If I'm reading Epiphany's source code correctly, this is just style GtkProgressBar

:

https://github.com/GNOME/epiphany/blob/9b9be55de3cd74a0f0cb05880177db7b46d10923/embed/ephy-embed.c#L727

priv->progress = gtk_progress_bar_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (priv->progress),
                             GTK_STYLE_CLASS_OSD);

      



The style class is GTK_STYLE_CLASS_OSD

described like this in the documentation :

GTK_STYLE_CLASS_OSD

#define GTK_STYLE_CLASS_OSD "osd"

The CSS class used when rendering the OSD on top of another container.

+2


source







All Articles