From 9eafe4139d6b2c0cabe3c77a903d6ae931a26975 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Thu, 24 Aug 2023 20:18:26 +0200 Subject: Fix build on some Vala compiler versions See https://gitlab.gnome.org/GNOME/vala/-/issues/1474 and https://gitlab.gnome.org/GNOME/vala/-/issues/1478 --- main/src/ui/widgets/avatar_picture.vala | 4 ++-- main/src/ui/widgets/fixed_ratio_picture.vala | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'main/src/ui/widgets') diff --git a/main/src/ui/widgets/avatar_picture.vala b/main/src/ui/widgets/avatar_picture.vala index e632413c..fb254915 100644 --- a/main/src/ui/widgets/avatar_picture.vala +++ b/main/src/ui/widgets/avatar_picture.vala @@ -454,7 +454,7 @@ public class Dino.Ui.AvatarPicture : Gtk.Widget { label.insert_after(this, null); label.attributes = new Pango.AttrList(); label.attributes.insert(Pango.attr_foreground_new(uint16.MAX, uint16.MAX, uint16.MAX)); -#if GTK_4_8 && VALA_0_58 +#if GTK_4_8 && (VALA_0_56_GREATER_5 || VALA_0_58) picture.content_fit = Gtk.ContentFit.COVER; #elif GTK_4_8 picture.@set("content-fit", 2); @@ -516,4 +516,4 @@ public class Dino.Ui.AvatarPicture : Gtk.Widget { base.snapshot(snapshot); } } -} \ No newline at end of file +} diff --git a/main/src/ui/widgets/fixed_ratio_picture.vala b/main/src/ui/widgets/fixed_ratio_picture.vala index 79c60141..3e83ec0c 100644 --- a/main/src/ui/widgets/fixed_ratio_picture.vala +++ b/main/src/ui/widgets/fixed_ratio_picture.vala @@ -8,7 +8,7 @@ class Dino.Ui.FixedRatioPicture : Gtk.Widget { public int max_height { get; set; default = int.MAX; } public File file { get { return inner.file; } set { inner.file = value; } } public Gdk.Paintable paintable { get { return inner.paintable; } set { inner.paintable = value; } } -#if GTK_4_8 && VALA_0_58 +#if GTK_4_8 && (VALA_0_56_GREATER_5 || VALA_0_58) public Gtk.ContentFit content_fit { get { return inner.content_fit; } set { inner.content_fit = value; } } #endif private Gtk.Picture inner = new Gtk.Picture(); @@ -85,4 +85,4 @@ class Dino.Ui.FixedRatioPicture : Gtk.Widget { inner.unparent(); base.dispose(); } -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2