ui/gtk/range.c

changeset 44
473954dc6b74
parent 32
e5f4d8af567e
--- a/ui/gtk/range.c	Mon Jun 17 21:20:58 2024 +0200
+++ b/ui/gtk/range.c	Sun Sep 29 13:32:51 2024 +0200
@@ -36,7 +36,7 @@
 
 
 static UIWIDGET ui_scrollbar(UiObject *obj, UiOrientation orientation, UiRange *range, ui_callback f, void *userdata) {
-#ifdef UI_GTK3
+#if GTK_MAJOR_VERSION >= 3
     GtkWidget *scrollbar = gtk_scrollbar_new(orientation == UI_HORIZONTAL ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL, NULL);
 #else
     GtkWidget *scrollbar;
@@ -124,7 +124,7 @@
 #else
     gtk_adjustment_set_page_size(a, extent);
 #endif
-#if !(GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION >= 18)
+#if GTK_MAJOR_VERSION * 100 + GTK_MIMOR_VERSION < 318
     gtk_adjustment_changed(a);
 #endif
     range->extent = extent;

mercurial