Misc: Fix GObject property types for GLabel::xalign/yalign properties

When running under valgrind, it claims that there's used uninitialized
memory, which is set as GObject property in the code. It's for
GtkLabel::xalign. The problem was that the value in the code is
an integer, but the property itself expects float type. This fixes
the place and where a floating point is already used it annotates
the value to be float, not a double.
This commit is contained in:
Milan Crha
2022-10-06 13:36:10 +02:00
parent 8138619419
commit 11a34a1d28
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -83,8 +83,8 @@ add_grid_row (GcalImportFileRow *self,
title_label = g_object_new (GTK_TYPE_LABEL,
"visible", TRUE,
"label", title,
"xalign", 1.0,
"yalign", 0.0,
"xalign", 1.0f,
"yalign", 0.0f,
"ellipsize", PANGO_ELLIPSIZE_END,
"max-width-chars", 40,
NULL);
@@ -96,7 +96,7 @@ add_grid_row (GcalImportFileRow *self,
value_label = g_object_new (GTK_TYPE_LABEL,
"visible", TRUE,
"label", value,
"xalign", 0.0,
"xalign", 0.0f,
"selectable", TRUE,
"ellipsize", PANGO_ELLIPSIZE_END,
"max-width-chars", 40,
+1 -1
View File
@@ -387,7 +387,7 @@ update_header (GtkListBoxRow *row,
header = g_object_new (GTK_TYPE_LABEL,
"label", label,
"xalign", 0,
"xalign", 0.0f,
NULL);
gtk_widget_add_css_class (header, "caption-heading");