diff options
author | Jim Evins <evins@snaught.com> | 2012-10-08 21:35:47 -0400 |
---|---|---|
committer | Jim Evins <evins@snaught.com> | 2012-10-08 21:35:47 -0400 |
commit | 3633ac97f627ca5fdb69d9da61383f28b9135be4 (patch) | |
tree | 7ac9645cd1a846443524e8ccfa1d005546794ae8 | |
parent | a31f634bf4b27f4adc924d27c776487dfd1106e5 (diff) |
Make sure to display the correct child in a ColorButton.
-rw-r--r-- | glabels/color_button.vala | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/glabels/color_button.vala b/glabels/color_button.vala index 7377902..819cea4 100644 --- a/glabels/color_button.vala +++ b/glabels/color_button.vala @@ -96,6 +96,17 @@ namespace glabels this.color_node = color_node; + if ( color_node.field_flag ) + { + swatch.hide(); + key_label.show(); + } + else + { + swatch.show(); + key_label.hide(); + } + swatch.set_color( color_node.color ); } @@ -104,9 +115,12 @@ namespace glabels { is_default_flag = false; - this.color_node.field_flag = false; - this.color_node.color = color; - this.color_node.key = null; + color_node.field_flag = false; + color_node.color = color; + color_node.key = null; + + swatch.show(); + key_label.hide(); swatch.set_color( color ); } @@ -120,6 +134,9 @@ namespace glabels color_node.color = default_color; color_node.key = null; + swatch.show(); + key_label.hide(); + swatch.set_color( default_color ); } |