mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-gtk: ignore informative area of listview
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user