Yesterday I said the rest of Odysseus's chrome (besides the headerbar and tabbar) is only shown as needed, so today I want to (briefly) discuss the mechanism I use to achieve that: GtkRevealer.

GtkRevealer is a bin that can show and hide it's children, and I use it to wrap GtkInfobars, the find toolbar, & the downloads bar.

GtkRevealer is, under the hood, a GtkBin that computes it's size or opacity (as determined by the configured transition) from a GtkProgressTracker. Also in GTK3 it constructs it's own GdkWindow, presumably so it can use the window manager (and possibly GPU) for compositing.

And GtkProgressTracker in turn takes a sequence of "frame times" to combine each with it's stored previous frame time, the duration and a global slowdown, to compute the corresponding point on a linear or cubic curve.


Sign in to participate in the conversation

For people who care about, support, or build Free, Libre, and Open Source Software (FLOSS).