[glabels/vala] Tweak behavior of ColorButton.
- From: Jim Evins <jimevins src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glabels/vala] Tweak behavior of ColorButton.
- Date: Mon, 8 Oct 2012 18:05:43 +0000 (UTC)
commit 4eb55c6bba12b010a7490bbd57c6f953e60b9f2e
Author: Jim Evins <evins snaught com>
Date: Mon Oct 8 14:04:05 2012 -0400
Tweak behavior of ColorButton.
glabels/color_button.vala | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/glabels/color_button.vala b/glabels/color_button.vala
index f06462b..7377902 100644
--- a/glabels/color_button.vala
+++ b/glabels/color_button.vala
@@ -40,6 +40,9 @@ namespace glabels
private ColorSwatch swatch;
private Gtk.Label key_label;
+
+ private Gtk.SizeGroup size_group;
+
private ColorMenu menu;
@@ -56,12 +59,20 @@ namespace glabels
this.add( hbox );
swatch = new ColorSwatch( SWATCH_W, SWATCH_H, color );
+ swatch.no_show_all = true;
hbox.pack_start( swatch, true, true, 0 );
key_label = new Gtk.Label( "" );
+ key_label.no_show_all = true;
key_label.hide();
hbox.pack_start( key_label, true, true, 0 );
+ /* Lock height of swatch and key_label together. */
+ size_group = new SizeGroup( SizeGroupMode.VERTICAL );
+ size_group.ignore_hidden = false;
+ size_group.add_widget( swatch );
+ size_group.add_widget( key_label );
+
Gtk.Arrow arrow = new Gtk.Arrow( Gtk.ArrowType.DOWN, Gtk.ShadowType.IN );
hbox.pack_end( arrow, false, false, 0 );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]