mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-08 22:20:54 +00:00
libsysprof-gtk: fix alpha check
This commit is contained in:
@ -68,7 +68,7 @@ sysprof_column_layer_snapshot (GtkWidget *widget,
|
|||||||
|
|
||||||
_sysprof_xy_layer_get_xy (SYSPROF_XY_LAYER (self), &x_values, &y_values, &n_values);
|
_sysprof_xy_layer_get_xy (SYSPROF_XY_LAYER (self), &x_values, &y_values, &n_values);
|
||||||
|
|
||||||
if (width == 0 || height == 0 || n_values == 0 || self->color.alpha == 0)
|
if (width == 0 || height == 0 || n_values == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (self->color_set)
|
if (self->color_set)
|
||||||
@ -76,6 +76,9 @@ sysprof_column_layer_snapshot (GtkWidget *widget,
|
|||||||
else
|
else
|
||||||
color = _sysprof_chart_layer_get_accent_bg_color ();
|
color = _sysprof_chart_layer_get_accent_bg_color ();
|
||||||
|
|
||||||
|
if (color->alpha == .0)
|
||||||
|
return;
|
||||||
|
|
||||||
gtk_snapshot_save (snapshot);
|
gtk_snapshot_save (snapshot);
|
||||||
|
|
||||||
if (!sysprof_xy_layer_get_flip_y (SYSPROF_XY_LAYER (self)))
|
if (!sysprof_xy_layer_get_flip_y (SYSPROF_XY_LAYER (self)))
|
||||||
|
|||||||
Reference in New Issue
Block a user