user4209617
user4209617

Reputation:

Gtk "subtle" Progress Bar

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

Upvotes: 3

Views: 562

Answers (1)

Cactus
Cactus

Reputation: 27626

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.

Upvotes: 2

Related Questions