[gnome-control-center] sharing: Fix stretched header bar switch
- From: Yosef Or Boczko <yoseforb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sharing: Fix stretched header bar switch
- Date: Fri, 19 Jul 2013 13:31:39 +0000 (UTC)
commit dd1a0c8dce17f3f3c993331d54320a304ca03772
Author: Yosef Or Boczko <yoseforb gmail com>
Date: Fri Jul 19 16:30:22 2013 +0300
sharing: Fix stretched header bar switch
and add padding of 4px
https://bugzilla.gnome.org/show_bug.cgi?id=703974
panels/sharing/cc-sharing-panel.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 7b7e6fa..2348ff6 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -113,7 +113,7 @@ cc_sharing_panel_constructed (GObject *object)
/* add the master switch */
cc_shell_embed_widget_in_header (cc_panel_get_shell (CC_PANEL (object)),
- priv->master_switch);
+ gtk_widget_get_parent (priv->master_switch));
}
static void
@@ -957,6 +957,7 @@ static void
cc_sharing_panel_init (CcSharingPanel *self)
{
CcSharingPanelPrivate *priv = self->priv = PANEL_PRIVATE (self);
+ GtkWidget *box;
GError *err = NULL;
gchar *objects[] = {
"sharing-panel",
@@ -1013,8 +1014,12 @@ cc_sharing_panel_init (CcSharingPanel *self)
NULL, NULL);
/* create the master switch */
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+
priv->master_switch = gtk_switch_new ();
- gtk_widget_show (priv->master_switch);
+ gtk_widget_set_valign (priv->master_switch, GTK_ALIGN_CENTER);
+ gtk_box_pack_start (GTK_BOX (box), priv->master_switch, FALSE, FALSE, 4);
+ gtk_widget_show_all (box);
/* start the panel in the disabled state */
gtk_switch_set_active (GTK_SWITCH (priv->master_switch), FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]