spinner_button: Stop spinners when idle

This commit is contained in:
Maximiliano Sandoval R 2023-04-10 12:50:57 +02:00
parent 4e3675e286
commit 36f50ab260
No known key found for this signature in database
GPG key ID: D64A8D747F6FE706
2 changed files with 4 additions and 3 deletions

View file

@ -14,8 +14,7 @@
</object>
</child>
<child>
<object class="GtkSpinner" id="spinner">
<property name="spinning">True</property>
<object class="Spinner" id="spinner">
<property name="valign">center</property>
<property name="halign">center</property>
</object>

View file

@ -1,6 +1,8 @@
use adw::subclass::prelude::*;
use gtk::{glib, prelude::*, CompositeTemplate};
use super::Spinner;
mod imp {
use glib::subclass::InitializingObject;
@ -14,7 +16,7 @@ mod imp {
#[template_child]
pub label: TemplateChild<gtk::Label>,
#[template_child]
pub spinner: TemplateChild<gtk::Spinner>,
pub spinner: TemplateChild<Spinner>,
}
#[glib::object_subclass]