Without overriding any class nor inteface, in rust, you must specify a default value for the param spec enum builder, I don’t know too much details about it, but I guess it makes sense, since an enum value must be of any of its variants (null/unspecified would be invalid).
You can specify this with the #[builder()] attribute.
Example:
#[derive(glib::Properties)]
#[properties(wrapper_type = super::MyObject)]
pub struct MyObject {
// Inside builder() you must specify the default value
#[property(get, set, builder(gtk::Orientation::Horizontal))]
orientation: RefCell<gtk::Orientation>,
}
impl Default for MyObject {
fn default() -> Self {
Self {
orientation: RefCell::new(gtk::Orientation::Horizontal),
}
}
}
You still have to implement Default trait for the object.