libsysprof-gtk: ignore informative area of listview

This commit is contained in:
Christian Hergert
2023-06-30 11:48:13 -07:00
parent 0334c4768d
commit 22ea27ca7a
2 changed files with 6 additions and 1 deletions

View File

@ -31,6 +31,7 @@ struct _SysprofTracksView
SysprofSession *session;
GtkWidget *top_left;
GtkListView *list_view;
double motion_x;
@ -112,6 +113,9 @@ sysprof_tracks_view_snapshot (GtkWidget *widget,
self->motion_x, 0,
&x, &y);
if (x < gtk_widget_get_width (self->top_left))
return;
gtk_snapshot_append_color (snapshot,
&(GdkRGBA) {0,0,0,.3},
&GRAPHENE_RECT_INIT (x, y, 1,
@ -196,6 +200,7 @@ sysprof_tracks_view_class_init (SysprofTracksViewClass *klass)
gtk_widget_class_set_css_name (widget_class, "tracks");
gtk_widget_class_bind_template_child (widget_class, SysprofTracksView, list_view);
gtk_widget_class_bind_template_child (widget_class, SysprofTracksView, top_left);
gtk_widget_class_bind_template_callback (widget_class, sysprof_tracks_view_motion_enter_cb);
gtk_widget_class_bind_template_callback (widget_class, sysprof_tracks_view_motion_leave_cb);

View File

@ -7,7 +7,7 @@
<child>
<object class="GtkBox">
<child>
<object class="GtkInscription">
<object class="GtkInscription" id="top_left">
<property name="min-chars">30</property>
<property name="nat-chars">30</property>
</object>