info-overview: Drop unnecessary grid reordering code
When the virtualization widgets are hidden, the following widets don't need to move up. This seems to be due to the orignal author thinking this was required or a bug in GTK rendering a double space between these rows.
This commit is contained in:
parent
8f8924b067
commit
8e9e84853d
2 changed files with 2 additions and 24 deletions
|
@ -70,8 +70,6 @@ typedef struct
|
|||
GtkWidget *updates_button;
|
||||
|
||||
/* Virtualisation labels */
|
||||
GtkWidget *label8;
|
||||
GtkWidget *grid1;
|
||||
GtkWidget *label18;
|
||||
|
||||
char *gnome_version;
|
||||
|
@ -526,22 +524,6 @@ get_cpu_info (const glibtop_sysinfo *info)
|
|||
return g_strdup (cpu->str);
|
||||
}
|
||||
|
||||
static void
|
||||
move_one_up (GtkWidget *grid,
|
||||
GtkWidget *child)
|
||||
{
|
||||
int top_attach;
|
||||
|
||||
gtk_container_child_get (GTK_CONTAINER (grid),
|
||||
child,
|
||||
"top-attach", &top_attach,
|
||||
NULL);
|
||||
gtk_container_child_set (GTK_CONTAINER (grid),
|
||||
child,
|
||||
"top-attach", top_attach - 1,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static struct {
|
||||
const char *id;
|
||||
const char *display;
|
||||
|
@ -572,8 +554,6 @@ set_virtualization_label (CcInfoOverviewPanel *self,
|
|||
{
|
||||
gtk_widget_hide (priv->virt_type_label);
|
||||
gtk_widget_hide (priv->label18);
|
||||
move_one_up (priv->grid1, priv->label8);
|
||||
move_one_up (priv->grid1, priv->disk_label);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -760,8 +740,6 @@ cc_info_overview_panel_class_init (CcInfoOverviewPanelClass *klass)
|
|||
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, graphics_label);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, virt_type_label);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, updates_button);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, label8);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, grid1);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, label18);
|
||||
|
||||
g_type_ensure (CC_TYPE_HOSTNAME_ENTRY);
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
|
@ -174,7 +174,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label8">
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
|
|
Loading…
Add table
Reference in a new issue