shell: remove unused title label and ensure padding around each panel
Make sure there is always 6 pixels padding around the embedded settings panel. Remove the unused title label and alignment.
This commit is contained in:
parent
a2665e9f01
commit
4fcc633a36
2 changed files with 12 additions and 36 deletions
|
@ -107,14 +107,20 @@ activate_panel (GnomeControlCenter *shell,
|
|||
if (panel_type != G_TYPE_INVALID)
|
||||
{
|
||||
GtkWidget *panel;
|
||||
GtkWidget *box;
|
||||
gint i;
|
||||
|
||||
/* create the panel plugin */
|
||||
panel = g_object_new (panel_type, "shell", shell, NULL);
|
||||
|
||||
box = gtk_alignment_new (0, 0, 1, 1);
|
||||
gtk_alignment_set_padding (GTK_ALIGNMENT (box), 6, 6, 6, 6);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (box), panel);
|
||||
|
||||
/* switch to the new panel */
|
||||
i = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), panel, NULL);
|
||||
gtk_widget_show_all (panel);
|
||||
i = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), box, NULL);
|
||||
gtk_widget_show_all (box);
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), i);
|
||||
|
||||
return;
|
||||
|
@ -166,10 +172,6 @@ shell_show_overview_page (GnomeControlCenterPrivate *priv)
|
|||
|
||||
gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), CAPPLET_PAGE);
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->builder,
|
||||
"label-title")), "");
|
||||
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->builder,
|
||||
"title-alignment")));
|
||||
|
||||
/* clear the search text */
|
||||
g_free (priv->filter_string);
|
||||
|
@ -271,13 +273,8 @@ search_entry_changed_cb (GtkEntry *entry,
|
|||
else
|
||||
{
|
||||
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (priv->search_filter));
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), SEARCH_PAGE);
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->builder,
|
||||
"label-title")),
|
||||
"");
|
||||
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->builder,
|
||||
"title-alignment")));
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook),
|
||||
SEARCH_PAGE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,27 +70,6 @@
|
|||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="title-alignment">
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="top_padding">12</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label-title">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook">
|
||||
<property name="visible">True</property>
|
||||
|
@ -143,7 +122,7 @@
|
|||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -162,8 +141,8 @@
|
|||
<object class="GtkSizeGroup" id="sizegroup">
|
||||
<property name="mode">vertical</property>
|
||||
<widgets>
|
||||
<widget name="home-button"/>
|
||||
<widget name="entry-alignment"/>
|
||||
<widget name="home-button"/>
|
||||
</widgets>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
Loading…
Add table
Reference in a new issue