summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake24
-rw-r--r--config.h.cmake6
-rw-r--r--src/ui/dialog/aboutbox.cpp27
3 files changed, 57 insertions, 0 deletions
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 1fead418a..a98ebcf2b 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -258,6 +258,30 @@ set(TRY_GTKSPELL ON)
set (WITH_GTKMM_3_10 ON)
endif()
+ # Check whether we can use new features in Gtkmm 3.12
+ # TODO: Drop this test and bump the version number in the GTK test above
+ # as soon as all supported distributions provide Gtkmm >= 3.12
+ pkg_check_modules(GTKMM_3_12
+ gtkmm-3.0>=3.12,
+ )
+
+ if("${GTKMM_3_12_FOUND}")
+ message("Using Gtkmm 3.12 build")
+ set (WITH_GTKMM_3_12 ON)
+ endif()
+
+ # Check whether we can use new features in Gtkmm 3.16
+ # TODO: Drop this test and bump the version number in the GTK test above
+ # as soon as all supported distributions provide Gtkmm >= 3.16
+ pkg_check_modules(GTKMM_3_16
+ gtkmm-3.0>=3.16,
+ )
+
+ if("${GTKMM_3_16_FOUND}")
+ message("Using Gtkmm 3.16 build")
+ set (WITH_GTKMM_3_16 ON)
+ endif()
+
# Check whether we can use new features in Gtkmm 3.22
# TODO: Drop this test and bump the version number in the GTK test above
# as soon as all supported distributions provide Gtkmm >= 3.22
diff --git a/config.h.cmake b/config.h.cmake
index 2cd660d87..134f7539d 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -56,6 +56,12 @@
/* Build with Gtkmm 3.10.x or higher */
#cmakedefine WITH_GTKMM_3_10 1
+/* Build with Gtkmm 3.12.x or higher */
+#cmakedefine WITH_GTKMM_3_12 1
+
+/* Build with Gtkmm 3.16.x or higher */
+#cmakedefine WITH_GTKMM_3_16 1
+
/* Build with Gtkmm 3.22.x or higher */
#cmakedefine WITH_GTKMM_3_22 1
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index 805bfb562..9b99dde6b 100644
--- a/src/ui/dialog/aboutbox.cpp
+++ b/src/ui/dialog/aboutbox.cpp
@@ -107,8 +107,21 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) {
g_strdup_printf("<small>Inkscape %s</small>",
Inkscape::version_string);
label->set_markup(label_text);
+
+#if WITH_GTKMM_3_10
+ label->set_halign(Gtk::ALIGN_END);
+ label->set_valign(Gtk::ALIGN_CENTER);
+#else
label->set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER);
+#endif
+
+#if WITH_GTKMM_3_12
+ label->set_margin_start(5);
+ label->set_margin_end(5);
+#else
label->set_padding(5,0);
+#endif
+
g_free(label_text);
label->set_selectable(true);
label->show();
@@ -118,8 +131,22 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) {
"<a href=\"https://www.inkscape.org\">https://www.inkscape.org</a>";
link->set_markup(website_link);
+
+#if WITH_GTKMM_3_10
+ link->set_halign(Gtk::ALIGN_END);
+#else
link->set_alignment(Gtk::ALIGN_END);
+#endif
+
+#if WITH_GTKMM_3_12
+ label->set_margin_start(5);
+ label->set_margin_end(5);
+ label->set_margin_top(5);
+ label->set_margin_bottom(5);
+#else
link->set_padding(5,5);
+#endif
+
link->set_selectable(true);
link->show();