]> git.lyx.org Git - features.git/commitdiff
Make LABEL_MANUAL label breakable when larger than the screen.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 17 Jan 2022 16:33:21 +0000 (17:33 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 17 Jan 2022 17:27:25 +0000 (18:27 +0100)
This is what the situation was in 2.3.X.

src/Row.cpp
src/Row.h
src/TextMetrics.cpp

index ef1495fb5970c257f9f72663403827b6f018041b..d1921a6d3fed15b5af7e0e65d5a608fbaf6892c0 100644 (file)
@@ -460,12 +460,12 @@ void Row::add(pos_type const pos, Inset const * ins, Dimension const & dim,
 
 
 void Row::add(pos_type const pos, char_type const c,
-              Font const & f, Change const & ch, bool can_break)
+              Font const & f, Change const & ch)
 {
        if (!sameString(f, ch)) {
                finalizeLast();
                Element e(STRING, pos, f, ch);
-               e.row_flags = can_break ? CanBreakInside : Inline;
+               e.row_flags = CanBreakInside;
                elements_.push_back(e);
        }
        back().str += c;
index 62ee6cfb5e55aa8359790f0624a9c79c8e79315b..4c4bfced60b712905fdb654e5a9c77763ad50a81 100644 (file)
--- a/src/Row.h
+++ b/src/Row.h
@@ -250,7 +250,7 @@ public:
                 Font const & f, Change const & ch);
        ///
        void add(pos_type pos, char_type const c,
-                Font const & f, Change const & ch, bool can_break);
+                Font const & f, Change const & ch);
        ///
        void addVirtual(pos_type pos, docstring const & s,
                        Font const & f, Change const & ch);
index 19a5e8f1476fa91e112ee918c2adc6677ce83d3d..f68292aa6423a51ab5b3ec0f10cf2e7dd2218ad1 100644 (file)
@@ -916,10 +916,10 @@ Row TextMetrics::tokenizeParagraph(pit_type const pit) const
                        // ⤶ U+2936 ARROW POINTING DOWNWARDS THEN CURVING LEFTWARDS
                        // ¶ U+00B6 PILCROW SIGN
                        char_type const screen_char = (c == 0x2028) ? 0x2936 : 0x00B6;
-                       row.add(i, screen_char, *fi, par.lookupChange(i), i >= body_pos);
+                       row.add(i, screen_char, *fi, par.lookupChange(i));
                } else
                        // row elements before body are unbreakable
-                       row.add(i, c, *fi, par.lookupChange(i), i >= body_pos);
+                       row.add(i, c, *fi, par.lookupChange(i));
 
                // add inline completion width
                // draw logically behind the previous character