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)
remove the error message for not finding a pdf viewer (apparently empty string is returned by FindExecutable if the executable is a Windows Store app). If there is really no pdf viewer, let the Windows itself decide what to do (produce error or not and which one).
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)
Private message by Michal Hoftich (tex4ht head developer):
oolatex is not recommended way to use Tex4ht for the ODT conversion.
It is better to use
make4ht -f odt mwe.tex
make4ht fixes some issues in ODT files
This is candidate for stable.
(cherry picked from commit 17ebec693a)
To do this, hard-coded test for xcb had to be replaced with a call to
platformName(). Since this method does not exist in Qt4, we emulate
it.
Note that Qt5 uses xcb bindings for X11 system, while Qt4 relies on
older X11 bindings. We return platorm == "qt4x11" in this case.
Fixes bug #11746.
(cherry picked from commit 222a317dd2)