Commit Graph

27480 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
c311451518 Fix math class code in InsetMathColor
The current code is too naïve and asserts on MC_UNKNOWN class.

See discussion here:
https://marc.info/?l=lyx-devel&m=161267112524889&w=2
2021-02-08 13:13:21 +01:00
Stephan Witt
80e20e86be #11682 amend change 4d4dc96b06 - check Qt version for all Qt::ApplicationState occurances 2021-02-08 09:04:18 +01:00
Stephan Witt
4d4dc96b06 #11682 open new window on Mac if there is none and LyX is activated via dock 2021-02-07 18:53:40 +01:00
Juergen Spitzmueller
233cfed333 GuiDelimiter: properly calculate widget width 2021-02-07 17:24:59 +01:00
Juergen Spitzmueller
0afae1f97d GuiDelimiter: fix tabstop access
DialogButtonBox not yet included, though.
2021-02-07 17:00:20 +01:00
Juergen Spitzmueller
fa56a5eb98 Adjust selection color of delimiter icons 2021-02-07 12:32:11 +01:00
Enrico Forestieri
3cf5a71463 Amend [5ed01cd6/lyxgit]
This commit takes into account also the case in which a prime follows
a superscript, a case not explicitly mentioned in bug 1633.
This case has to be accounted for in a different way. We cannot look
ahead when exporting, so we simply tell TeXMathStream to output an
empty group if we just output a superscript and a prime comes next.
2021-02-06 20:07:31 +01:00
Juergen Spitzmueller
5c1a6468ac GuiDelimiter: use highlight text color if icon is selected 2021-02-06 16:25:55 +01:00
Juergen Spitzmueller
7c33e2fc08 GuiDelimiter: store delimiter name in UserRole 2021-02-06 15:33:13 +01:00
Juergen Spitzmueller
1fe75ae72c GuiDelimiter: cleanup and fix crash 2021-02-06 15:09:54 +01:00
Juergen Spitzmueller
fcc832ebeb GuiDelimiter: use SVG icons rather than relying on font (#12085) 2021-02-06 14:05:46 +01:00
Jean-Marc Lasgouttes
720f439868 Fix default limits value for (under|over)brace
Fixes bug #12107.
2021-02-05 14:37:26 +01:00
Enrico Forestieri
5ed01cd616 Avoid double superscript errors
Fixes #1633
2021-02-05 01:03:09 +01:00
Enrico Forestieri
8202e4e571 Disable direct insertion of multiple spaces in mathed text
Fixes #1311
2021-02-04 21:20:45 +01:00
Thibaut Cuvelier
2720ac5dda The menu Options has been renamed Tools. 2021-02-04 20:30:43 +01:00
Pavel Sanda
ded8c873f4 Attempt on #12066.
Some lfuns are handled directly in GuiApplication while handling
of menu hiding in fullscreen was done on the level of GuiView.

We'll see if this code movement breaks in different scenarios,
but quick grep suggested that the only other way to guiview
dispatch is through drag&drop when menu isn't involved.
2021-02-03 22:06:14 +01:00
Jean-Marc Lasgouttes
9f899a17fa Force redraw of all bufferviews after zoom in/out
Add a new ForceAll update flag that forces to update metrics and
redraw all buffer views.

The situation in multi windows setting is very fragile and will need
to be adressed properly in the 2.5 cycle.
2021-02-03 15:42:11 +01:00
Kornel Benko
8d17594a33 FindAdv: Ignore '\ensuremath{' while searching
but keep contents
e.g. '\ensuremath{abc}' ==> 'abc'
2021-02-03 12:21:16 +01:00
Enrico Forestieri
b475cf8707 Amend [bc806084/lyxgit]
Rise a bit \dot, \ddots & co., as with some fonts they might
be drawn too close to the symbol they decorate.
2021-02-03 11:45:52 +01:00
Juergen Spitzmueller
8d5da386c4 Amend [b6c089afa4/lyxgit]. 2021-02-03 10:23:17 +01:00
Richard Kimberly Heck
bd0044f9d5 Fix bug #11351.
Patch from Daniel.
2021-02-02 17:34:25 -05:00
Richard Kimberly Heck
7b6db55f28 Use a static map so we don't have to reinitialize every time. 2021-02-02 17:30:57 -05:00
Richard Kimberly Heck
b6c089afa4 Fix #12104 2021-02-02 17:23:00 -05:00
Enrico Forestieri
d999d8e8d9 Improve alignment of math decorations
This patch takes into account the skewness of a character for properly
align a decoration. Unfortunately, the required amount of shift depends
on single chars, so that the recently introduced FontMetrics::italicSlope()
method cannot be used with all characters. A heuristics that produces
satisfactory results is using the italic slope only with characters whose
italic correction (kerning) is zero.

Part of #11491
2021-02-02 19:39:52 +01:00
Enrico Forestieri
bc806084cd Improve appearance of dots at higher zoom levels
Make \dot, \ddot and friends more round when increasing zoom

Part of #11491
2021-02-01 20:02:37 +01:00
Enrico Forestieri
9f3920447e Make math decorations scalable with zoom level
Fixes #11491
2021-02-01 02:53:00 +01:00
Juergen Spitzmueller
1bc7e73c74 Fix highlighting of cursor context in View Source (#12099)
This also considers dark mode,
2021-01-31 17:54:54 +01:00
Enrico Forestieri
04c0cce43e Fix make check
We have to explicitly link zlib after [197ea636/lyxgit].
2021-01-31 15:21:23 +01:00
Kornel Benko
3a1b19c5c3 FindAdv: Optimization
Using unordered_map instead of map.
Reasons:
1.) The relevant maps contain 166(Keys) and 649(Accents) entries.
  This mean that average access with 'map' needs 8 to 10 compares to find the value.
2.) Since we are using at least c++11, the unordered_map is available
2.) increasing the maps (in future) needs not to be considered anymore, because
  the access-time will not increase.
2021-01-31 09:53:06 +01:00
Enrico Forestieri
c79ec4114e Change backspace behavior in align type equations
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
2021-01-31 00:51:15 +01:00
Daniel Ramoeller
d008ca2539 Preserve multirow/-column content on deletion of subrows/columns (#11380) 2021-01-30 17:03:33 +01:00
Juergen Spitzmueller
c567c78e90 Add ProvideInsetLayout and ModifyInsetLayout (#12098)
This complements ProvideStyle and ModifyStyle.
2021-01-30 15:56:31 +01:00
Juergen Spitzmueller
897ee2ed88 Do not overwrite InsetLayout font/color 2021-01-30 15:16:12 +01:00
Juergen Spitzmueller
c8e04eb2f4 Whitespace 2021-01-30 15:11:18 +01:00
Juergen Spitzmueller
be14b73787 Fix a null pointer dereference spotted by coverity 2021-01-30 13:46:47 +01:00
Juergen Spitzmueller
c83526c3ca Revert "No need to set background color of a newly created branch."
This breaks color initialization with new branches in dark mode.

This reverts commit 5145694cd0.
2021-01-30 09:16:15 +01:00
Juergen Spitzmueller
9dd71b9e4a Recent multirow finally allows multiple paragraphs 2021-01-30 09:15:14 +01:00
Enrico Forestieri
22ee249c3e Allow pasting references to mathed
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
2021-01-30 01:32:40 +01:00
Jean-Marc Lasgouttes
b1efc5a48e Initialize properly IconInfo struct
Spotted by coverity.
2021-01-29 18:57:13 +01:00
Jean-Marc Lasgouttes
5366666c83 Copy/paste error in BranchList::setColors
Spotted by coverity.
2021-01-29 18:51:19 +01:00
Jean-Marc Lasgouttes
ef091ca0ea ChangesMonitor: beware of exceptions in destructor
There may be an exception is the paragraph does not have an owner. In
this case, there is nothing to do anyway.

Spotted by coverity.
2021-01-29 18:45:50 +01:00
Jean-Marc Lasgouttes
bbae2c8c2a FindAndReplaceOptions: initialize properly matchAtStart
Spotted by coverity.
2021-01-29 18:35:38 +01:00
Jean-Marc Lasgouttes
5145694cd0 No need to set background color of a newly created branch.
Fixes a null pointer dereference spotted by coverity.
2021-01-29 18:29:55 +01:00
Jean-Marc Lasgouttes
dca5646163 LengthValidator: initialize properly positive_
Spotted by coverity.
2021-01-29 18:17:16 +01:00
Jean-Marc Lasgouttes
90bceb65d3 Initialise correctly branch_list_id_
Reported by coverity.
2021-01-29 18:07:37 +01:00
Juergen Spitzmueller
fd8b3c148f Cosmetics 2021-01-29 15:46:46 +01:00
Juergen Spitzmueller
6d05e78168 Do not output \maketitle in table cells if the table is in the title 2021-01-29 15:45:54 +01:00
Jean-Marc Lasgouttes
911b01a3ca Fixup f3a0e8ff: Reset needUpdate after buffer update 2021-01-29 14:31:10 +01:00
Enrico Forestieri
070270fdc7 Avoid deprecation warnings
In Qt 5.15 many deprecation warnings are issued, presumably for
helping the port to Qt 6. They are really a load but can be
shuten up by using -DQT_NO_DEPRECATED_WARNINGS, except for the ones
about MidButton, AdjustToMinimumContentsLength, and DefaultLocaleLongDate.

This change should not affect compilation with Qt 4, as all changes are
backward compatible (only Qt versions prior 4.5 could be affected).
2021-01-29 13:12:29 +01:00
Juergen Spitzmueller
52196d6c48 Set proper multirow size in X table columns 2021-01-29 10:15:36 +01:00