Gtk.Spinner¶
class — extends Widget, Accessible, Buildable, ConstraintTarget
Displays an icon-size spinning animation.
It is often used as an alternative to a ProgressBar
for displaying indefinite activity, instead of actual progress.
<picture> <source srcset="spinner-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkSpinner" src="spinner.png"> </picture>
To start the animation, use Spinner.start, to stop it
use Spinner.stop.
CSS nodes¶
GtkSpinner has a single CSS node with the name spinner.
When the animation is active, the :checked pseudoclass is
added to this node.
Accessibility¶
GtkSpinner uses the AccessibleRole.progress_bar role.
Constructors¶
new¶
Returns a new spinner widget. Not yet started.
Methods¶
get_spinning¶
Returns whether the spinner is spinning.
set_spinning¶
Sets the activity of the spinner.
Parameters:
spinning— whether the spinner should be spinning
start¶
Starts the animation of the spinner.
stop¶
Stops the animation of the spinner.
Properties¶
spinning¶
Whether the spinner is spinning