3

I am wondering how to achieve a progressbar / loader indicator similiar to the one Epiphany (aka Gnome Web) is using. See the provided screenshot:

enter image description here

1 Answers1

2

If I'm reading the Epiphany source code right, it's just a styled 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 GTK_STYLE_CLASS_OSD style class is described like this in the documentation:

GTK_STYLE_CLASS_OSD

#define GTK_STYLE_CLASS_OSD "osd"

A CSS class used when rendering an OSD (On Screen Display) element, on top of another container.

unwind
  • 391,730
  • 64
  • 469
  • 606
Cactus
  • 27,075
  • 9
  • 69
  • 149