我想知道如何实现类似于 Epiphany(又名 Gnome Web)正在使用的进度条/加载器指示器。请参阅提供的屏幕截图:
最佳答案
如果我正确阅读 Epiphany 源代码,它只是一个样式化的 GtkProgressBar
:
priv->progress = gtk_progress_bar_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (priv->progress),
GTK_STYLE_CLASS_OSD);
描述了 GTK_STYLE_CLASS_OSD
样式类 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.
关于Gtk "subtle"进度条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30036586/