Larger values will eventually crash LyX (see #12353), 0 or negative
values make the image disappear in the workarea and impossible to edit.
(cherry picked from parts of
commit 14d63f5be8)
1/ The most annoying part was the error in po/. It turns out that reading
and understanding the po/Makevars file was the key. A simple change of
variable ensures that "make dist" does not try to rebuild lyx.pot.
2/ The way tests in src/ are defined meant that the
dependency-tracking files were not all deleted. This should be OK now.
(cherry picked from commit 9017581ecf)
The minimal vamue is set to 10%, let's set the max to 1000%. This
avoids crashes when characters are too large.
The code is refactored to be more compact and the tests are more precise.
Fixes bug #12452.
(cherry picked from commit 5259b6ba62)
In case of path names for external files containing symbolic links the real path
and the logical path name may be different for the same file or directory.
LyX is using QDir::tempPath() to create the path name of the temporary directory.
The Qt implementation is free to return the logical or the real path name here and
it happens to be different for various platforms and versions.
The most stable and clean solution is to use the real path name consistently.
(cherry picked from commit f2f861f017)
LyX relies on a a backing store to draw when running under macOS or
Wayland, because Qt arbitrarily overwrites parts of the workarea
before we paint (and we paint only the parts that need to be painted).
However it seems that this is also necessary on X11 when the WM theme
is translucid. Since there is no way that I know of to detect this
situation, this patch adds a LyXRC setting to manually select this
drawing strategy.
Note that using a backing store is not always a good solution, since
this disables subpixel aliasing.
At this point there is no UI for the variable.
Fixes bug #12119
(cherry picked from commit c213eb7f75)
(cherry picked from commit 1ed9257c6d)
Rather than that, keep it with a warning that it is not available.
Fallback procedure (which maintains security measures) is done in
the conversion step.
This prevents document properties being silently changed on sharing.
(cherry picked from commit 3543626182)
When switching class, it does not make sense to flag flex insets that
are undefined if they were already undefined before.
Part of bug #12163.
(cherry picked from commit 009efa195b)
Add code stolen from QBitTorrent and Qt Creator that properly enables
HighDpi handling.
The rules are:
1/ nothing needs to be done for macOS and Qt >= 6
2/ HighDpi support is set by default starting with Qt 5.6.
3/ Support for fractional scaling is added for Qt >= 5.14.
Hopefully fixes bug #12060.
(cherry picked from commit d7a4f47e7d)
(cherry picked from commit f92f2f95ff)
The math color inset inherits the mode of the containing inset.
This mode is inferred by the kind of font in effect. Setting the
right mode allows to insert spaces where these should be allowed.
Another small glitch was that the selection was always parsed in
math mode, so that any space was swallowed, even if the inset would
allow them.
We lack the necessary font (cmb10) for drawing bold uppercase greek
letters. It would be overkill adding it for this sole purpose, so
adopt the same poor man's bold strategy used with \boldsymbol.
A reference can be directly inserted into mathed but cannot be pasted
because the pasted material is returned in plain text format. This patch
allows getting a string from the cut stack in a suitable format allowing
the math parser to actually create an InsetRef.
Fixes#11539
(cherry picked from commit 22ee249c3e)
When hitting backspace in the first position of a cell in mathed,
if the cell is part of an array, the whole array is dissolved
and the sole cell content pasted in the containing environment.
But if the cell is part of an eqnarray or align math hull type, the
cursor is simply (and unexpectedly) taken out of the whole equation,
which is left unchanged.
This patch makes backspace equivalent to the cursor left key in those
cases, while leaving the behavior unchanged in all other ones.
Fixes#11678
(cherry picked from commit c79ec4114e)
It turns out that the code is the same in texted ans mathed and that
whatever is done in InsetTabular is not useful.
This means that we do not need to deal Text::dispatch idiosyncrasies
(in particular forcing the cursor to be visible).
Fix bug #11225.
(cherry picked from commit 9e1db65932)
The method horizontalAdvance() replaces width() starting with Qt 5.11.
To handle this, all direct calls to QFontMetrics::width() are replaced
by calls to GuiFontMetrics::width(), and the code for
GuiFontMetrics::width(QChar) uses horizontalAdvance on newer Qt
versions.
(cherry picked from commit 21422dd652)
This is particularly important for contents in RtL languages, where
the right margin may contain the paragraph indentation, or
itemize/enumeration symbols.
Fixes bug #12030.
(cherry picked from commit 875b1def4f)