summaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2011-12-19 11:30:00 -0500
committerChris Lumens <clumens@redhat.com>2011-12-19 11:35:54 -0500
commit8df82048bbc03cb38925a11c220ca0fcf03c6742 (patch)
tree7a51ceef3dbde9f8c93a3b3ed529696c8fd14313 /widgets
parent1f5bea9aeea43dfd13a1841170c568e18e066e9c (diff)
downloadanaconda-8df82048bbc03cb38925a11c220ca0fcf03c6742.tar.gz
anaconda-8df82048bbc03cb38925a11c220ca0fcf03c6742.tar.xz
anaconda-8df82048bbc03cb38925a11c220ca0fcf03c6742.zip
Set different values for the alignment on hubs and spokes.
If I use the same values, the selectors in the hubs look way too cramped. Or, the spokes look like they're floating in space.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/src/BaseWindow.c2
-rw-r--r--widgets/src/HubWindow.c4
-rw-r--r--widgets/src/glade-adaptor.c17
3 files changed, 18 insertions, 5 deletions
diff --git a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c
index a120ebac6..766c66ef2 100644
--- a/widgets/src/BaseWindow.c
+++ b/widgets/src/BaseWindow.c
@@ -180,7 +180,7 @@ static void anaconda_base_window_init(AnacondaBaseWindow *win) {
* to control the amount of space the Window's content takes up on the
* screen.
*/
- win->priv->alignment = gtk_alignment_new(0.5, 0.0, 0.5, 0.5);
+ win->priv->alignment = gtk_alignment_new(0.5, 0.0, 0.0, 0.5);
gtk_box_pack_start(GTK_BOX(win->priv->main_box), win->priv->alignment, TRUE, TRUE, 0);
/* The action_area goes inside the alignment and represents the main
diff --git a/widgets/src/HubWindow.c b/widgets/src/HubWindow.c
index 638d8ce1d..82cd72c97 100644
--- a/widgets/src/HubWindow.c
+++ b/widgets/src/HubWindow.c
@@ -111,6 +111,10 @@ static void anaconda_hub_window_init(AnacondaHubWindow *win) {
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(win->priv->scrolled_window),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_box_pack_start(GTK_BOX(action_area), win->priv->scrolled_window, TRUE, TRUE, 0);
+
+ /* The hub has different alignment requirements than a spoke. */
+ gtk_alignment_set(GTK_ALIGNMENT(anaconda_base_window_get_alignment(ANACONDA_BASE_WINDOW(win))),
+ 0.5, 0.0, 0.5, 0.5);
}
/**
diff --git a/widgets/src/glade-adaptor.c b/widgets/src/glade-adaptor.c
index b7ca49f75..871e21c1c 100644
--- a/widgets/src/glade-adaptor.c
+++ b/widgets/src/glade-adaptor.c
@@ -31,6 +31,7 @@
#include <gtk/gtk.h>
#include "BaseWindow.h"
+#include "HubWindow.h"
#include "SpokeWindow.h"
void anaconda_standalone_window_post_create(GladeWidgetAdaptor *adaptor,
@@ -58,10 +59,18 @@ void anaconda_standalone_window_post_create(GladeWidgetAdaptor *adaptor,
glade_widget_property_set(nav_area_widget, "n-columns", 2);
alignment_widget = glade_widget_get_from_gobject(anaconda_base_window_get_alignment(window));
- glade_widget_property_set(alignment_widget, "xalign", 0.5);
- glade_widget_property_set(alignment_widget, "yalign", 0.0);
- glade_widget_property_set(alignment_widget, "xscale", 0.5);
- glade_widget_property_set(alignment_widget, "yscale", 0.5);
+
+ if (ANACONDA_IS_HUB_WINDOW(object)) {
+ glade_widget_property_set(alignment_widget, "xalign", 0.5);
+ glade_widget_property_set(alignment_widget, "yalign", 0.0);
+ glade_widget_property_set(alignment_widget, "xscale", 0.5);
+ glade_widget_property_set(alignment_widget, "yscale", 0.5);
+ } else {
+ glade_widget_property_set(alignment_widget, "xalign", 0.5);
+ glade_widget_property_set(alignment_widget, "yalign", 0.0);
+ glade_widget_property_set(alignment_widget, "xscale", 0.0);
+ glade_widget_property_set(alignment_widget, "yscale", 0.5);
+ }
}
void anaconda_standalone_window_write_widget(GladeWidgetAdaptor *adaptor,