From 084d37124a545c4e57dd6f56240cf27847e2c5b1 Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Tue, 20 Oct 2020 20:11:59 +0200 Subject: [PATCH] Fix issues introduced in #32 --- src/widgets/widget_definitions.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widgets/widget_definitions.rs b/src/widgets/widget_definitions.rs index fed26e5..3c8cc35 100644 --- a/src/widgets/widget_definitions.rs +++ b/src/widgets/widget_definitions.rs @@ -149,10 +149,10 @@ pub(super) fn resolve_orientable_attrs(bargs: &mut BuilderArgs, gtk_widget: >k /// @widget expander widget fn build_gtk_expander(bargs: &mut BuilderArgs) -> Result { - let gtk_widget = gtk::Expander::new(Some("Placeholder text, don't forget to set the property 'name'")); + let gtk_widget = gtk::Expander::new(None); resolve_block!(bargs, gtk_widget, { - // @prop label - label of the expander - prop(label: as_string) {gtk_widget.set_label(Some(&label));} + // @prop label - label of the expander + prop(label: as_string) { gtk_widget.set_label(Some(&label)); } }); Ok(gtk_widget) } @@ -163,6 +163,7 @@ fn build_gtk_color_button(bargs: &mut BuilderArgs) -> Result { resolve_block!(bargs, gtk_widget, { // @prop use-alpha - bool to wether or not use alpha prop(use_alpha: as_bool) {gtk_widget.set_use_alpha(use_alpha);}, + // @prop onchange - runs the code when the color was selected prop(onchange: as_string) { let old_id = on_change_handler_id.replace(Some( @@ -172,7 +173,6 @@ fn build_gtk_color_button(bargs: &mut BuilderArgs) -> Result { )); old_id.map(|id| gtk_widget.disconnect(id)); } - prop(use_alpha: as_bool) {gtk_widget.set_use_alpha(use_alpha);} }); Ok(gtk_widget)