Commit Graph

44115 Commits

Author SHA1 Message Date
Scott Kostyshak
29b386640e Comment: link to Beamer enumitem feature request 2022-01-27 17:27:15 -05:00
José Matos
79a2ac575c Replace $${python} directly in the converter constructor 2022-01-27 18:32:57 +00:00
José Matos
b73ab0256d Fix compilation with gcc-12 2022-01-27 15:37:45 +00:00
Jean-Marc Lasgouttes
2da183bf4f Check layout type when inserting inset over selection
When inserting inset over a selection, the layout is transferred if
the inset covers full paragraphs.

This is not the right policy in the case of environments. Until proper
code is written and tested, limit ourselves to command layouts.

Fixes bug #12251.
2022-01-24 19:24:52 +01:00
Jean-Marc Lasgouttes
6c98ac5a7b Fix breaking of MANUAL_LABEL paragraph when label is too long
Typical example is a Labeling layout which label is an inline equation
larger than the screen. Before this commit, the row would not get
broken at all.

Two parts in the patch:

1/ when breaking the row in shortenIfNeeded, mark the last element as
   AlwaysBreakAfter instead of BreakAfter, in case the next element is
   NoBreakBefore.

2/ when nothing could be done, as last resort keep the first element
   of the row only.
2022-01-23 21:21:25 +01:00
Kornel Benko
f8f86a1a81 Next runtime messages to be ommitted if compiled with clang using flag '-fsanitize'.
Prevent the return of impossible values for 'enum flags'.
For instance the result of '~Update::Force' at src/BufferView.cpp:3025 without this patch
is '4294967293'.
2022-01-23 20:13:26 +01:00
Jean-Marc Lasgouttes
ec3a44fef5 brkstr2str_pos: avoid case where length is negative
The string that Qt sees is not the original string, since we add
zero-width nonbreaking spaces around it, plus an override character to
force rendering direction. This means that translating positions
between these two representation can be a bit tricky.

We use a max(foo, 0) here to make sure that our intermediate
computation is postive.

Fixes part of bug #12452.
2022-01-23 19:34:11 +01:00
Juergen Spitzmueller
942538c02d Fix bug 12459
When checking for branch color, take into account that some branches
are defined in the master document only, some only in the child.
2022-01-22 09:30:25 +01:00
Kornel Benko
2764ed20c2 Omit runtime messages if compiled with clang using flag '-fsanitize'.
Setting sufficiently high value allows to use
ColorCode enums for new up to 32000 branch insets.
Previous setting printed messages if using more than 25 new branch insets.
"'ColorCode' ... src/Color.cpp:435:10: runtime error:
load of value 128, which is not a valid value for type"
2022-01-21 11:02:09 +01:00
Jean-Marc Lasgouttes
a64244b844 Fixup 7485225c: better placement of deph bar
Fixes #12243.
2022-01-20 21:51:51 +01:00
Jean-Marc Lasgouttes
da3c3796ee Make LABEL_MANUAL label breakable when larger than the screen.
This is what the situation was in 2.3.X.
2022-01-17 18:27:25 +01:00
Jean-Marc Lasgouttes
6f7505300e When clearing a row, always clear the whole text area width
It is not a good idea to take into account the horizontal scrolling
that may have happened. For example, this leads to display glitches
when a Description label is larger than text width.

This explains why SingleParUpdate strategy did not work with home/end
on a long row.
2022-01-17 17:35:12 +01:00
Jean-Marc Lasgouttes
4f158ecfc8 Fix computation of LABEL_MANUAL label separation
The spacing of Labeling, Description and friends shall be computed
when breaking the row, not when tokenizing it. Indeed, this is the
right place to determine its correct value.

To this end add a new MARGINSPACE row element type.

This allows to remove TextMetrics::labelEnd, which is not used anymore.
2022-01-17 17:35:12 +01:00
Jean-Marc Lasgouttes
c638caddd8 Compilation fix for Qt4 2022-01-13 19:35:12 +01:00
jpc
473a4f2648 Update & solve shortcut conflict in fr.po 2022-01-13 17:39:49 +01:00
jpc
d085830895 Update branch inset inversion explanation 2022-01-13 17:33:36 +01:00
Jean-Marc Lasgouttes
854fbc5262 Revert "Add UI for selecting backing store drawing strategy"
The need for this variable is too rare to deserve being exposed in UI.

This reverts commit a3fd3a09f1.
2022-01-13 17:09:42 +01:00
Jean-Marc Lasgouttes
61d062633c Better handling of trailing spaces in rows.
When a string is broken at the margin by the Qt algorithm, the space
at which breaking occurred is automatically skipped in width
computation. However, the ending space of the string is taken into
account and is visible for example at paragraph end.

When the trailing space is followed by a displayed inset, then the
space should be skipped too, which means that the width of the last
row element has to be recomputed. For the sake of performance, the
width of the element without trailing spaces is computed in advance in
FontMetrics::breakString.

This "no space" width will be used when trimming a row element of its trailing
spaces instead of the original one.

Additionally, do not trim trailing spaces when the row is flushed.

Fixes bug #12449.
2022-01-13 16:49:59 +01:00
Stephan Witt
28a1744dcd #12157 Replace old with new banner in DMG background image 2022-01-10 07:48:54 +01:00
Stephan Witt
678ab325c0 #12423 fix a focus change problem
The search widget triggers a showEvent() in updateTitle() leading to setting the focus to the default push button.
The check in updateTitle() for the need to restore the title avoids superfluous show events and avoids the unwanted focus change.
2022-01-09 22:33:43 +01:00
Stephan Witt
22045e455a #12434 add GUI debug messages for pinch-to-zoom gesture 2022-01-09 12:29:23 +01:00
Daniel Ramoeller
7134ebd793 Pinch to zoom fix
Amendment to fix for #12434.
2022-01-09 12:29:23 +01:00
Jean-Marc Lasgouttes
65394e1907 fix file name 2022-01-08 23:03:50 +01:00
Jean-Marc Lasgouttes
1ed9257c6d Document \draw_strategy in release notes
Also trim some whitespace.
2022-01-07 17:59:26 +01:00
Stephan Witt
d9b9307d14 #12451 Adjust color cache on change of dark/light mode 2022-01-05 08:26:45 +01:00
Jean-Marc Lasgouttes
d44c63e2c6 Set current cursor font when toggling emphasize
The change actually works for all font toggling with implicit selection.

Fixes bug #12450.
2022-01-04 18:58:55 +01:00
José Matos
109ea2be4a Add new placeholder $${python} to configure
This ensures that we use a consistent Python interpreter in LyX.

$${python} is replaced by the Python version found.

Users can apply this in preferences and use the same version defined by
LyX.
2022-01-04 00:21:34 +00:00
Scott Kostyshak
13a7269b9d Change LFUN arg from "zoom" to "zoomlevel"
This change is just to be more specific, to help when grepping and
reading.

The idea is from Daniel
(https://www.lyx.org/trac/ticket/12420?replyto=11#comment:11).

Amends cc787967 (and thus 49a17aaa).
2022-01-03 15:57:35 -05:00
José Matos
940d3ceeb9 Make layout2layout compatible with Python 2 and 3 2022-01-03 19:59:42 +00:00
Stephan Witt
11d42ac3df Remove temporary code comment. 2022-01-03 10:44:02 +01:00
Stephan Witt
d432403430 #12434 add event handler for pinch-to-zoom gesture 2022-01-03 07:37:03 +01:00
Enrico Forestieri
d4cfa5204c Fix bug #12447
Due to a thinko at 1fe75ae7 the code was not using the correct index.
2022-01-02 18:49:44 +01:00
Stephan Witt
df990b1027 Guard new code for builds with OS X 10.11 SDK and lesser (part 2). 2022-01-01 18:47:57 +01:00
Stephan Witt
718b735dfe Guard new code for builds with OS X 10.11 SDK and lesser. 2022-01-01 18:46:32 +01:00
Stephan Witt
47c92834df Correct white space. 2022-01-01 16:37:07 +01:00
Stephan Witt
2125863874 Qt6 QFontDatabase is a pure static class. Call the member functions directly. 2022-01-01 10:06:07 +01:00
Juergen Spitzmueller
64a60c72ea GuiGraphics: disable "Read from file" button if the values do not differ 2021-12-31 14:32:59 +01:00
Juergen Spitzmueller
8f3fdafd9e GuiGraphics: check more carefully whether we have a changed BB 2021-12-31 14:32:13 +01:00
Juergen Spitzmueller
ec722f3a48 GuiGraphics: read the BB values also for new graphics
that aren't in the cache yet.
2021-12-31 14:30:09 +01:00
Jean-Marc Lasgouttes
0789f2f2ae Fix font inside footnote inset
An inset that resets its font (like Footnote) does not care at all
about enclosing font. Therefore the real starting point is the class
default font. This avoid cases where the footnote contents is forced
to \normalsize.

It turns out that the Greyedout note inset, did inherit font but was
declared as not doing it. This commmit changes the definition by
adding \normalfont\normalsize so that no inheritance happens.

Note that actually \normalfont resets everything but the font size.
This does not matter for footnote (which has its own font size) and
greyedout (which is fixed now), but may matter elsewhere. Also, I do
not know what the situation with HTML is.
2021-12-31 13:40:53 +01:00
Stephan Witt
77670bc998 Reduce the mix of python versions in configure.py in case of running it with python3 2021-12-31 13:40:22 +01:00
Stephan Witt
6372f5569e Avoid python based lilypond-book detection if it's not needed - e.g. on Mac 2021-12-31 11:54:28 +01:00
Scott Kostyshak
4bdb1ca4c2 Add comment regarding fsanitize + Clang issue
We could not figure out the root issue, or at least not to the point
where we felt changing this code considering we could not trigger
any bug from a user perspective.

For now, we just add a comment in the code.

For more information, see our ML discussion here:

  https://www.mail-archive.com/search?l=mid&q=20211227113249.53bf5a63%40admin1-desktop
2021-12-30 11:39:04 -05:00
Kornel Benko
011be4a959 Update sk.po 2021-12-29 19:14:41 +01:00
Juergen Spitzmueller
8a25af029b de.po 2021-12-29 18:00:45 +01:00
Scott Kostyshak
cc787967f4 Change "Show Zoom Value" to "Show Zoom Level"
See discussion at #12420.

Amends 49a17aaa.
2021-12-29 11:45:01 -05:00
Scott Kostyshak
f40413db11 Reg tests for language switching
Use cases from #12352. The files correspond to
mwe-remove-bottom.23.lyx and mwe-remove-top.23.lyx. The only
differences are that I changed to FreeSans and FreeSerif for the
fonts.
2021-12-29 10:38:16 -05:00
Juergen Spitzmueller
095e533be9 Fix language environment with environments at inset begin/end (#12352) 2021-12-29 16:07:40 +01:00
Stephan Witt
f22c5c3c3f Remove unused local variable 2021-12-29 15:33:44 +01:00
Juergen Spitzmueller
0f2d711f34 Fix TOC filtering with slashes (#12359)
Seems the * wildcard does not match these.
2021-12-29 14:43:52 +01:00