recorder: Adapt to widget visibility changes
We now need to explicitly hide the details label.
This commit is contained in:
@@ -348,13 +348,12 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
|
||||
widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_box_pack_start (GTK_BOX (widget), hbox, FALSE, TRUE);
|
||||
|
||||
for (i = 0; i < g_list_model_get_n_items (priv->recordings); i++)
|
||||
{
|
||||
GtkInspectorRecording *r = g_list_model_get_item (priv->recordings, i);
|
||||
|
||||
|
||||
if (r == recording)
|
||||
break;
|
||||
|
||||
@@ -373,7 +372,7 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
|
||||
else
|
||||
render_str = "Partial Render";
|
||||
cairo_region_destroy (region);
|
||||
|
||||
|
||||
if (previous)
|
||||
{
|
||||
time_str = format_timespan (gtk_inspector_recording_get_timestamp (recording) -
|
||||
@@ -386,19 +385,18 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
|
||||
str = g_strdup_printf ("<b>%s</b>\n", render_str);
|
||||
}
|
||||
label = gtk_label_new (str);
|
||||
gtk_widget_show (label);
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
g_free (str);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE);
|
||||
|
||||
button = gtk_toggle_button_new ();
|
||||
gtk_widget_show (button);
|
||||
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
|
||||
gtk_button_set_icon_name (GTK_BUTTON (button), "view-more-symbolic");
|
||||
|
||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, TRUE);
|
||||
|
||||
label = gtk_label_new (gtk_inspector_render_recording_get_profiler_info (GTK_INSPECTOR_RENDER_RECORDING (recording)));
|
||||
gtk_widget_hide (label);
|
||||
gtk_box_pack_end (GTK_BOX (widget), label, FALSE, FALSE);
|
||||
g_object_bind_property (button, "active", label, "visible", 0);
|
||||
}
|
||||
@@ -409,7 +407,6 @@ gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
|
||||
}
|
||||
|
||||
g_object_set (widget, "margin", 6, NULL); /* Seriously? g_object_set() needed for that? */
|
||||
gtk_widget_show (widget);
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user