It is now possible to get a context menu for math insets.
InsetMathSpace was already providing a specific context menu,
but it was never triggered because the math hull inset is not
descendable. It is still so, but now when a context menu is
requested all the insets inside the math hull are examined.
If the inset under the cursor provides a context menu, it
is shown instead of the general math one.
Fixes#12100.
On macOS the Disable Editing "Lock" icon protrudes into tab title
Also, since the close button is on the left, the lock is better positioned on the right.
The detour via QIcon is to avoid a pixelated pixmap (because in LyX pixmaps don't adjust by default to the device's pixel ratio correctly).
Also
Fix for bug #12160.
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.
Due to the way these decorations are implemented, entering
them with the cursor (either form right or left) required
pressing two times cursor left or right.
Fixes#2264
The bookmarks are shown with circled numbers in the right margin (or
the left margin in RTL mode). A new color "bookmarks" has been added.
Currently bookmark 0 (the return position) is not displayed because it
is very disturbing in practice.
To make this work, a new method BookmarksSection::bookmarksInPar
retuns the list of bookmarks in a paragraph along with their position.
Force redraw when using bookmark-save and bookmark-clear.
Caveats:
- this solution does not show the precise position of the bookmark
(this is supposedly not a problem).
- if several bookmarks are on the same row, they will currently be
garbled. It would be easy to make sure that only one is shown ; what
would be more difficult would be to move the second bookmark lower.
- it is possible to make sure that the markers are correctly centered
in the margin, and that the margin size is large enough to hold the
marker (I did not try all fonts).
Fixes bug #2496.
Add code stolen from QBitTorrent that enables properly HiDpi handling.
HighDpi support is set by default starting with Qt 5.6.
Support for fractional scaling is added for Qt >= 5.14.
Hopefully fixes bug #12060.