Fix build with Vala < 0.52

MenuButton.set_child was only added to VAPIs of 0.52 and later.
Even if GTK4 is new enough, they wouldn't be available.
This commit is contained in:
Marvin W 2022-11-10 22:32:19 +01:00
parent a2e894dda1
commit cdd22e404e
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
1 changed files with 1 additions and 1 deletions

View File

@ -453,7 +453,7 @@ public bool use_tooltips() {
}
public static void menu_button_set_icon_with_size(MenuButton menu_button, string icon_name, int pixel_size) {
#if GTK_4_6
#if GTK_4_6 && VALA_0_52
menu_button.set_child(new Image.from_icon_name(icon_name) { pixel_size=pixel_size });
#else
menu_button.set_icon_name(icon_name);