diff options
Diffstat (limited to 'eel')
-rw-r--r-- | eel/eel-gtk-extensions.c | 4 | ||||
-rw-r--r-- | eel/eel-labeled-image.c | 22 |
2 files changed, 18 insertions, 8 deletions
diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c index 4e1bbeca..437723ea 100644 --- a/eel/eel-gtk-extensions.c +++ b/eel/eel-gtk-extensions.c @@ -483,8 +483,8 @@ eel_gtk_message_dialog_set_details_label (GtkMessageDialog *dialog, label = gtk_label_new (details_text); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_selectable (GTK_LABEL (label), TRUE); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif diff --git a/eel/eel-labeled-image.c b/eel/eel-labeled-image.c index 2292978a..dbede43f 100644 --- a/eel/eel-labeled-image.c +++ b/eel/eel-labeled-image.c @@ -1102,8 +1102,13 @@ labeled_image_update_alignments (EelLabeledImage *labeled_image) if (labeled_image->details->fill) { +#if GTK_CHECK_VERSION (3, 16, 0) + x_alignment = gtk_label_get_xalign (GTK_LABEL (labeled_image->details->label)); + y_alignment = gtk_label_get_yalign (GTK_LABEL (labeled_image->details->label)); +#else gtk_misc_get_alignment (GTK_MISC (labeled_image->details->label), &x_alignment, &y_alignment); +#endif /* Only the label is shown */ if (!labeled_image_show_image (labeled_image)) @@ -1139,9 +1144,9 @@ labeled_image_update_alignments (EelLabeledImage *labeled_image) } -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (labeled_image->details->label, GTK_ALIGN_CENTER); - gtk_widget_set_valign (labeled_image->details->label, GTK_ALIGN_CENTER); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (labeled_image->details->label), x_alignment); + gtk_label_set_yalign (GTK_LABEL (labeled_image->details->label), y_alignment); #else gtk_misc_set_alignment (GTK_MISC (labeled_image->details->label), x_alignment, @@ -1157,8 +1162,13 @@ labeled_image_update_alignments (EelLabeledImage *labeled_image) if (labeled_image->details->fill) { +#if GTK_CHECK_VERSION (3, 0, 0) + x_alignment = gtk_widget_get_halign (labeled_image->details->image); + y_alignment = gtk_widget_get_valign (labeled_image->details->image); +#else gtk_misc_get_alignment (GTK_MISC (labeled_image->details->image), &x_alignment, &y_alignment); +#endif /* Only the image is shown */ if (!labeled_image_show_label (labeled_image)) @@ -1193,9 +1203,9 @@ labeled_image_update_alignments (EelLabeledImage *labeled_image) } } -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (labeled_image->details->image, GTK_ALIGN_CENTER); - gtk_widget_set_valign (labeled_image->details->image, GTK_ALIGN_CENTER); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_set_halign (labeled_image->details->image, x_alignment); + gtk_widget_set_valign (labeled_image->details->image, y_alignment); #else gtk_misc_set_alignment (GTK_MISC (labeled_image->details->image), x_alignment, |