1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
From ca7f98bd3e9462deac3661244dc76004a36fc8c3 Mon Sep 17 00:00:00 2001
From: Wen Kokke <wenkokke@users.noreply.github.com>
Date: Mon, 20 Jan 2025 13:41:48 +0000
Subject: [PATCH] fix(pango): map PANGO_WRAP_NONE to WrapNowhere to avoid
conflict with Gtk WrapMode
Origin: https://github.com/gtk2hs/gtk2hs/pull/336/
Index: b/Graphics/Rendering/Pango/Layout.chs
===================================================================
--- a/Graphics/Rendering/Pango/Layout.chs
+++ b/Graphics/Rendering/Pango/Layout.chs
@@ -356,11 +356,20 @@ layoutGetWidth (PangoLayout _ pl) = do
-- a word if it is the only one on this line and it exceeds the
-- specified width.
--
+#if PANGO_VERSION_CHECK(1,56,0)
+{#enum PangoWrapMode as LayoutWrapMode
+ {underscoreToCase,
+ PANGO_WRAP_WORD as WrapWholeWords,
+ PANGO_WRAP_CHAR as WrapAnywhere,
+ PANGO_WRAP_WORD_CHAR as WrapPartialWords,
+ PANGO_WRAP_NONE as WrapNowhere}#}
+#else
{#enum PangoWrapMode as LayoutWrapMode
{underscoreToCase,
PANGO_WRAP_WORD as WrapWholeWords,
PANGO_WRAP_CHAR as WrapAnywhere,
PANGO_WRAP_WORD_CHAR as WrapPartialWords}#}
+#endif
-- | Set how this paragraph is wrapped.
--
|