[gnome-builder/wip/chergert/perspective] prefs: add sizing alignments to vcs
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/perspective] prefs: add sizing alignments to vcs
- Date: Sun, 8 Nov 2015 09:45:29 +0000 (UTC)
commit da94e3cf39b078c968c0fdbcead359597c793f33
Author: Christian Hergert <chergert redhat com>
Date: Sun Nov 8 01:45:12 2015 -0800
prefs: add sizing alignments to vcs
data/ui/ide-preferences-entry.ui | 1 +
libide/preferences/ide-preferences-builtin.c | 6 ++++++
libide/preferences/ide-preferences-entry.c | 10 ++++++++++
libide/preferences/ide-preferences-entry.h | 2 ++
4 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/data/ui/ide-preferences-entry.ui b/data/ui/ide-preferences-entry.ui
index 446c8ac..059e20c 100644
--- a/data/ui/ide-preferences-entry.ui
+++ b/data/ui/ide-preferences-entry.ui
@@ -10,6 +10,7 @@
<child>
<object class="GtkLabel" id="title">
<property name="visible">true</property>
+ <property name="xalign">0.0</property>
</object>
</child>
<child>
diff --git a/libide/preferences/ide-preferences-builtin.c b/libide/preferences/ide-preferences-builtin.c
index cea01d2..698d63d 100644
--- a/libide/preferences/ide-preferences-builtin.c
+++ b/libide/preferences/ide-preferences-builtin.c
@@ -221,6 +221,7 @@ ide_preferences_builtin_register_vcs (IdePreferences *preferences)
g_autofree gchar *email_text = NULL;
g_autoptr(GFile) global_file = NULL;
GgitConfig *config;
+ GtkSizeGroup *size_group;
GtkWidget *author;
GtkWidget *email;
@@ -264,6 +265,11 @@ ide_preferences_builtin_register_vcs (IdePreferences *preferences)
ide_preferences_add_list_group (preferences, "vcs", "attribution", _("Attribution"), 0);
ide_preferences_add_custom (preferences, "vcs", "attribution", author, NULL, 0);
ide_preferences_add_custom (preferences, "vcs", "attribution", email, NULL, 0);
+
+ size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+ gtk_size_group_add_widget (size_group, ide_preferences_entry_get_title_widget (IDE_PREFERENCES_ENTRY
(author)));
+ gtk_size_group_add_widget (size_group, ide_preferences_entry_get_title_widget (IDE_PREFERENCES_ENTRY
(email)));
+ g_clear_object (&size_group);
}
static void
diff --git a/libide/preferences/ide-preferences-entry.c b/libide/preferences/ide-preferences-entry.c
index b1a0bb1..8d27699 100644
--- a/libide/preferences/ide-preferences-entry.c
+++ b/libide/preferences/ide-preferences-entry.c
@@ -174,3 +174,13 @@ ide_preferences_entry_init (IdePreferencesEntry *self)
self,
G_CONNECT_SWAPPED);
}
+
+GtkWidget *
+ide_preferences_entry_get_title_widget (IdePreferencesEntry *self)
+{
+ IdePreferencesEntryPrivate *priv = ide_preferences_entry_get_instance_private (self);
+
+ g_return_val_if_fail (IDE_IS_PREFERENCES_ENTRY (self), NULL);
+
+ return GTK_WIDGET (priv->title);
+}
diff --git a/libide/preferences/ide-preferences-entry.h b/libide/preferences/ide-preferences-entry.h
index 0a1dafb..3dfff31 100644
--- a/libide/preferences/ide-preferences-entry.h
+++ b/libide/preferences/ide-preferences-entry.h
@@ -34,6 +34,8 @@ struct _IdePreferencesEntryClass
IdePreferencesContainerClass parent_class;
};
+GtkWidget *ide_preferences_entry_get_title_widget (IdePreferencesEntry *self);
+
G_END_DECLS
#endif /* IDE_PREFERENCES_ENTRY_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]