[dconf] Fix some bugs with key label layout
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] Fix some bugs with key label layout
- Date: Fri, 14 Jan 2011 19:14:24 +0000 (UTC)
commit 103a67455a514e74e84cba1b9c083de9d6c8a38a
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Jan 14 13:37:43 2011 -0500
Fix some bugs with key label layout
editor/dconf-editor.vala | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala
index 1e092c7..e9bd871 100644
--- a/editor/dconf-editor.vala
+++ b/editor/dconf-editor.vala
@@ -65,19 +65,21 @@ public class EditorWindow : Gtk.Window
dir_tree_view.get_selection().select_iter(iter);
}
- private Gtk.Label add_row(Gtk.Table table, int row, string label)
+ private Gtk.Label add_row(Gtk.Table table, int row, string title)
{
- Gtk.Label name_label, value_label;
-
- name_label = new Gtk.Label(label);
- name_label.set_alignment(0.0f, 0.5f);
- table.attach(name_label, 0, 1, row, row+1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0, 0);
-
- value_label = new Gtk.Label("");
- value_label.set_alignment(0.0f, 0.5f);
+ var name_label = new Gtk.Label(title);
+ name_label.set_alignment(0.0f, 0.0f);
+ table.attach(name_label, 0, 1, row, row+1,
+ Gtk.AttachOptions.FILL,
+ Gtk.AttachOptions.SHRINK | Gtk.AttachOptions.FILL, 0, 0);
+
+ var value_label = new Gtk.Label("");
+ value_label.set_alignment(0.0f, 0.0f);
value_label.wrap = true;
- table.attach_defaults(value_label, 1, 2, row, row+1);
-
+ table.attach(value_label, 1, 2, row, row+1,
+ Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL,
+ Gtk.AttachOptions.SHRINK | Gtk.AttachOptions.FILL, 0, 0);
+
name_label.show();
value_label.show();
@@ -154,7 +156,7 @@ public class EditorWindow : Gtk.Window
schema_label.set_text(schema_name);
summary_label.set_text(summary);
- description_label.set_text(description);
+ description_label.set_text(description.strip());
type_label.set_text(type);
default_label.set_text(default_value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]