Commit Graph

28927 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
81e35bc396 Replace hardcoded inheritFont() with InheritFont InsetLayout tag
Each removed inheritFont method is replaced by a 'InheritFont false'
line in the relevant InsetLayout entry.

Add code to layout2layout that does this automatically when the entry
is missing.

The case of InsetScript is special, since the inheritFont() was not
needed here: the default is indeed true.

Fixes bug #12238.
2023-07-22 23:38:53 +02:00
Pavel Sanda
fe953000ed Fix application of PARAGRAPH_PARAMS* in selection.
- Setting in the last paragraph of selection was not applied
  at certain conditions (i.e. relative cursor position in first
  paragraph > rel.c.pos. in last paragraph).

Getting back + fixing typo from e2b42b1726.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg220019.html
2023-07-22 18:17:46 +02:00
Jean-Marc Lasgouttes
cfe094a380 Introduce new InsetLayout tag InheritFont
The font inside the inset is inherited from the parent for LaTeX
export if this parameter is true, as well as on screen. Otherwise
the document default font is used.

The default value is true.

Update tufte layouts to use this tag for sidenote and marginnote flex
insets.

Increase layout format to 101.

Fixes bug #12238.
2023-07-22 15:53:14 +02:00
Jean-Marc Lasgouttes
c8c589353a Detect when one tries to bind a lfun to a prefix of longer commands
Change KeyMap::getBinding to return FuncRequest::prefix in this case.

Add handling of this case in PrefShortcuts::validateNewShortcut.

What does not seem to work is that if, for example, accent-acute is
bound to M-s (which is a prefix for size-related bindings), and then
the binding is removed, the functions are not visibly restored.

Part of bug #10131.
2023-07-22 00:01:34 +02:00
Jean-Marc Lasgouttes
f31bf0df1d Send some debug info to ACTION 2023-07-20 23:39:15 +02:00
Juergen Spitzmueller
0e0c2c6120 Update tex2lyx tests 2023-07-20 15:22:47 +02:00
Juergen Spitzmueller
2841a1c063 Update covington support in linguistics module (file format change) 2023-07-20 15:09:47 +02:00
Kornel Benko
11f44c00e0 FindAdv: Handle negthinspace, negmedspace and negthickspace also in regexes 2023-07-20 12:32:58 +02:00
Pavel Sanda
5b34105514 Group most verbose dbg output into more intuitive categories.
From now on, having all dbg level except of painting and scrolling
shows debug output which can be actually followed.
2023-07-18 22:25:28 +02:00
Jean-Marc Lasgouttes
008cec3eec Honor scroll_below_document when jumping to end of document
While fixing #12491 at 0fed10e4, some band-aids were removed at the
end of `BufferView::scrollToBuffer`. One of them ensured that
scrolling to last paragraph would not leave the last row alone on
screen.

This behavior is actually correct when the scroll_below_document pref is true.

This commit restores the test that avoids the issue.

Of course, this does not fix the real issue, since for example opening
Tutorial.lyx and jumping to "5.3 Errors!" produces the same unwanted
effect.
2023-07-18 21:03:00 +02:00
Juergen Spitzmueller
649cb30963 Another tiny correction (not yet ideal) 2023-07-18 18:11:59 +02:00
Juergen Spitzmueller
7640d1fbf5 Remove bogus condition and add comments 2023-07-18 17:55:08 +02:00
Juergen Spitzmueller
eadc8ab147 LaTeXHighlighter: handle grouped values with commas in keyval options 2023-07-18 17:35:48 +02:00
Juergen Spitzmueller
9e308ddb03 Improve keyval highlighter 2023-07-18 17:05:56 +02:00
Juergen Spitzmueller
c549a2b59c At end of children, language needs to be reset
This amends 243b0ef90c
2023-07-18 15:27:17 +02:00
Juergen Spitzmueller
6603ae2242 Support option snippets in the LaTeXHighlighter 2023-07-18 15:13:48 +02:00
Kornel Benko
8eda9e25e0 Acount for all non-negative spaces used by lyx
The unicode representation in an ascii-string string is
\302\240                                Normal space
\342\200\257                            Non-breaking Thin (1/6 em)
\342\200\213\342\200\205\342\200\213    Medium(2/9 em)
\342\200\213\342\200\204\342\200\213    Thick (5/18 em)
\342\201\240\342\200\202\342\201\240    Half Quad(0.5 em)
\342\200\203                            Quad(1 em)
\342\200\203\342\200\203                Double Quad(2 em)
\342\220\243                            Visible space

'Double Quad' counts as 2 spaces, all others count as 1 space in the search regex
2023-07-18 13:09:55 +02:00
Juergen Spitzmueller
cd080da3c4 Fix thinspace search regex 2023-07-18 07:28:18 +02:00
Jean-Marc Lasgouttes
430c41cd05 Fix display of comment char in "lyxlex" debug channel 2023-07-17 23:02:46 +02:00
Juergen Spitzmueller
999b95398d THINSPACE is nonbreakable (i.e., 0x202f, not 0x2009) 2023-07-17 17:14:50 +02:00
Juergen Spitzmueller
f6f936e3d0 Support protected and thin space in simple search (#12836) 2023-07-17 16:58:58 +02:00
Juergen Spitzmueller
e87ace901a Style 2023-07-17 16:55:47 +02:00
Juergen Spitzmueller
edaf28fdd6 Do not throw away runparams settings of InsetText in InsetFoot::latex
This amends 243b0ef90c
2023-07-17 13:18:56 +02:00
Jean-Marc Lasgouttes
13d24c711e When breaking a paragraph, do not reset depth
Remove some logic that would reset depth when editing non-environment
stuff (e.g. Standard layout) at non-zero depth. The current way of
decreasing depth is to use paragraph-break in an empty paragraph.

See discussion in ticket #2445 for why this code happened.

Fixes bug #12750.
2023-07-16 17:16:02 +02:00
Stephan Witt
c4195defe6 #12818 amend last change b924db72c5 - use c++ 11 compiler compatible code 2023-07-16 17:11:38 +02:00
Stephan Witt
b924db72c5 #12818 correct evaluation of message box result info
The help page of int QMessageBox::exec() (​https://doc.qt.io/qt-6/qmessagebox.html#exec) says:
When using a QMessageBox with standard buttons, this function returns a StandardButton value indicating the standard button that was clicked.
When using QMessageBox with custom buttons, this function returns an opaque value; use clickedButton() to determine which button was clicked.
2023-07-16 16:49:02 +02:00
Juergen Spitzmueller
b397c78b70 Move comment to where it belongs 2023-07-16 16:46:02 +02:00
Juergen Spitzmueller
243b0ef90c If language needs to be reset at the end of footnotes or floats
then do reset it only after footnotes or floats. \selectlanguage at
the end of environments might produce spurious vertical space
(see https://marc.info/?l=lyx-devel&m=168872369617866)
2023-07-16 16:31:31 +02:00
Jean-Marc Lasgouttes
386a2ddca1 Cache the value of FontMetrics::xHeight()
This value is computed for the metrics of *every* Mathdata and hotspot
says that it counts for 9% of total on math-heavy "branch-test.lyx"
file. I am not sure that real world agrees with that, but profiling
shows that Qt itself does not cache the value.

Part of reinvestigation of #12297.
2023-07-15 23:32:59 +02:00
Jean-Marc Lasgouttes
d8e509e5eb Cleanup and (maybe) speedup InsetMathChar::mathClass
Profiling with hotspot show that it counts for more than it should and
indeed using support::contains is a overkill here. I like the new code
better anyway.

I would be surprised to see that it makes a big difference, though.
2023-07-15 23:29:24 +02:00
Jean-Marc Lasgouttes
582eb7cc03 add comment 2023-07-15 15:20:28 +02:00
Daniel Ramoeller
975115479a Don't add LabelString for Manual LabelType
Fix for bug  #12753
2023-07-14 19:06:40 +02:00
Jean-Marc Lasgouttes
4bbd4a45e7 Fix display of a math hull inset in a tight inset
This is a kind of hack. This allows InsetMathHull to state that it
needs some elbow room beyond its width, in order to fit the numbering
and/or the left margin (with left alignment), which are outside of the
inset itself.

To this end, InsetMathHull::metrics() sets a value in
MetricsInfo::extrawidth and this value is recorded later in the
corresponding row element's `extra' field.

The code could be reorganized to be simpler, in particular by
computing metrics in tokenizeRow, or after tokenizeRow. However the
choice here is to produce a simple patch, fit for 2.4.0.

Fixes bug #12320.
2023-07-14 17:17:23 +02:00
Jean-Marc Lasgouttes
7cc431bd55 Add optional parameter 'local' to outline-in/out
When this parameter is given, only the current paragraph is affected
by the section promoting/demoting.

Note that the new argument is not used yet.

Update release notes and LFUNS documentation.

Part of ticket #12417.
2023-07-06 17:47:08 +02:00
Jean-Marc Lasgouttes
a3db9a667f Outline: swap order of up and down arrows
The order is more natural now.

See discussion in #12809.
2023-07-06 17:47:08 +02:00
Scott Kostyshak
c4cdff5de2 Fix cursor font after collapsing inset (#12830)
If the cursor is in an inset, and it is closed (e.g., with ctrl + i,
or inset-toggle), the cursor is moved outside of the inset, so the
font must be reset.
2023-07-06 08:40:41 -04:00
Pavel Sanda
fb43449c80 Hide multi-keystroke accelerators in Mac menu (bug 12693).
Patch from Juergen.
2023-07-05 20:45:26 +02:00
Daniel Ramoeller
28a9124241 Fix combined zoom widget on windows (bug #12803). 2023-07-04 19:08:51 +02:00
Pavel Sanda
9d8bef017b Add bug reference. 2023-07-03 23:54:34 +02:00
Juergen Spitzmueller
d5a9699794 Fix inset context menu offset with keyboard (#12811) 2023-07-03 16:28:38 +02:00
Juergen Spitzmueller
94dd5ed6eb Avoid unnecessary cprotect loading (#12826) 2023-06-30 16:31:13 +02:00
Scott Kostyshak
551ede855a Style and whitespace 2023-06-29 05:31:41 -04:00
Enrico Forestieri
befe2da495 Honor pending spaces in InsetMathChar::write
The InsetMathChar::write() method directly accesses the otexrowstream
underlying the TeXMathStream class for writing a character, thus
shortcircuiting the mechanism that allows to separate a macro from the
following material. It has to do so because directly writing a char_type
would cause printing its numerical value instead of the corresponding
unicode character in systems where char_type is typedef'd to uint32_t.

This problem has been uncovered by [7441172d/lyxgit] because each atom
of a mathed cell was being separately written to the output instead of
using the lyx::write() method in MathExtern.cpp that simply converts
everything to a docstring. As InsetMathChar::write() is the only method
bypassing the TeXMathStream machanism, it is simpler teaching it to
honor the pending space instead of modifying the code in InsetMathColor.

This commit amends 7441172d.
2023-06-28 21:17:26 +02:00
Jürgen Spitzmüller
889dac7def Prevent par break caused by \egroup (#12821) 2023-06-28 14:46:46 +02:00
Jean-Marc Lasgouttes
8aea6af6a0 Make outline function work in an inset
The function outline is modified to operate only in the inset that
contains the cursor. This means that the function can be enabled in
insets (this had been forbidden to fix #5004).

Of course, there may be cases where the user expects something to
happen outside of the inset. I am sorry to announce that this is not
going to happen ;)

Fixes bug #12809.
2023-06-27 14:58:27 +02:00
Scott Kostyshak
f208f18022 Update tex2lyx tests
Update the test files after the last format change (c3f98d1f).
2023-06-21 15:03:47 -04:00
Jean-Marc Lasgouttes
65b03c7c72 Improve label font computation in insets
This patch reuses the code of TextMetrics::displayFont() that handles
the label part of LABEL_MANUAL paragraphs to create a new
labelDisplayFont() method usable for things like Itemize labels.

To this end, and new magic value is used as position to force the
label case in displayFont(). The code is also factored a bit and
cleaned up.

Fixes bug #12810.
2023-06-21 17:23:34 +02:00
Juergen Spitzmueller
6c4afc1ccb Show full inset context-menu when clicking on text part of collapsible (#10370) 2023-06-20 11:00:13 +02:00
Juergen Spitzmueller
75eb3abcfb typo 2023-06-20 11:00:05 +02:00
Jean-Marc Lasgouttes
b82a7279a8 Comments cleanup 2023-06-20 00:06:57 +02:00
Scott Kostyshak
f14384ff91 Add "override" to fix warning
Otherwise we get the following warning:

src/frontends/qt/InsertTableWidget.h:44:7: error: 'hideEvent' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
        void hideEvent(QHideEvent * event);
             ^

Amends ca5a75b2.
2023-06-19 14:52:45 -04:00
Juergen Spitzmueller
2bbc420032 Disable LFUN_INDEX_TAG_ALL if there is noting to tag (#12812) 2023-06-18 12:45:25 +02:00
Daniel Ramoeller
ca5a75b23e Properly uncheck insert table toolbutton
Fix for bug #12801
2023-06-18 12:20:35 +02:00
Scott Kostyshak
eac460e438 Remove the mathed "BUGS" file (#3493)
Jürgen cleaned up the previous contents of this "BUGS" file. What
was left (before the rm in this commit) had been written in 2001 at
2dd1a460, and it is not clear if it is still relevant.
2023-06-15 05:15:32 -04:00
Daniel Ramoeller
c13c959974 Fix margins and spacing of InsetParamsUI
Fix for bug #12244.
2023-06-15 04:18:36 -04:00
Daniel Ramoeller
7371a99256 Fix for HiDPI logo in About
Fix for #12322.
2023-06-13 09:56:48 -04:00
Scott Kostyshak
67ff56c63a Whitespace 2023-06-13 09:55:53 -04:00
Pavel Sanda
152811a27d Activate work area by tab click.
Fix for #11835.
Patch by Daniel Ramoeller.
2023-06-13 12:11:11 +02:00
Yuriy Skalko
2475a6a616 Move Fullscreen preferences from Editing>Control section into Look & Feel>User Interface section 2023-06-13 11:28:31 +02:00
Pavel Sanda
afb918bf78 Fix for #12681.
Number Paste Recent menus entries as in toolbar.
Slightly improved patch from Daniel Ramoeller.
2023-06-13 10:07:56 +02:00
Richard Kimberly Heck
0c69a5eab2 Fix bug #12796 2023-06-12 19:38:40 -04:00
Daniel Ramoeller
8124e6c02e Fix bug #12795 2023-06-12 19:33:25 -04:00
Richard Kimberly Heck
c3f98d1fa4 The lyx2lyx for the previous commit. 2023-06-11 12:55:51 -04:00
Enrico Forestieri
c33f2f50a0 Do not output LaTeX for a macro if the LaTeX part is empty. 2023-06-11 12:55:51 -04:00
Juergen Spitzmueller
3be39de1f7 Address deprecation warning
QMutexRecursive has been introduced with Qt 5.14, the warning with
Qt 5.15.2
2023-06-11 13:15:55 +02:00
Juergen Spitzmueller
833f8c148e Limit QEvent::ApplicationPaletteChange casing to Mac
This is not needed on Linux and dramatically slows down runtime mode
change
2023-06-11 12:43:30 +02:00
Juergen Spitzmueller
3af906e9f3 Fix crash on OS-switch of dark/light mode (#12786)
At least for Mac and Linux. Windows needs testing and possibly its
own fix.
2023-06-10 08:30:31 +02:00
Jean-Marc Lasgouttes
24f4c51f0e inset-split should not be dispatched to inset at point
This functon does not make sense for a full inset.

Fixes second part of bug #12747.
2023-06-06 11:10:45 +02:00
Daniel Ramoeller
5a893d9862 Replace selection on insert LyX Document
Fix for bug #10390
2023-05-31 01:01:22 +02:00
Daniel Ramoeller
c0d7ac5b71 Split-inset fix
- Remember whether something has to be pasted

Fix for bug #12747
2023-05-31 00:05:23 +02:00
Daniel Ramoeller
2e966811d8 Center preview status message
Fix for bug #12724
2023-05-30 14:12:11 +02:00
Richard Kimberly Heck
9a4e44e7df Fix indentation 2023-05-27 11:38:19 -04:00
Richard Kimberly Heck
04fe6c89dc Fix typo 2023-05-27 11:37:00 -04:00
Daniel Ramoeller
4ed0312c51 Fix bug #12772 2023-05-26 23:39:28 -04:00
Jean-Marc Lasgouttes
3895c79879 Fixup 1d637b8a: do not set extra spacing for typewriter
This messed up rows with both normal and typewriter fonts.
2023-05-23 09:22:51 +02:00
Juergen Spitzmueller
ba659d0cfd Fix indentation 2023-05-22 16:32:49 +02:00
Juergen Spitzmueller
25ecd919fe Use proper (inset) font for normalizing purposes
Not all insets have a proper layout, but we have Inset::getFont()

Fixes #12729
2023-05-19 12:35:03 +02:00
Kornel Benko
f13808939b Advaced search: check for toString() before using it.
(#12783)
2023-05-18 18:07:40 +02:00
Juergen Spitzmueller
92f211d6b4 Replace deprecated function
activateWindow() is available back to Qt4 (at least)
2023-05-17 08:56:12 +02:00
Jean-Marc Lasgouttes
e0db6378c9 Revert "Do not return copies of string members"
This commit is very wrong when trivstrings are used (since what is
retirned is a temporary variable) and it turns out that cygwin
requires this for some reason.

This reverts commit 3ae5d6bdec.
2023-05-15 17:13:41 +02:00
Stephan Witt
ac286e54b7 #12769 correct line width based painting of wavy underline
With very tiny fonts the line width is 0 and the loop to construct the wavy line never ends.
2023-05-15 07:06:44 +02:00
Juergen Spitzmueller
90d40eb95e Add labels to encoding variant combo 2023-05-13 18:38:33 +02:00
Juergen Spitzmueller
75f628aec0 Replace removed signal
The used one has been removed from Qt6
2023-05-12 09:46:38 +02:00
Juergen Spitzmueller
120ba1d3ec Do not attempt to read bitmap icon with svg renderer
Pavel, this should cure your woes
2023-05-12 09:39:20 +02:00
Juergen Spitzmueller
0a040d18ad Some layout fixes
Layout was too squeezed and didn't properly expand on longer (l7n) strings
2023-05-11 17:46:16 +02:00
Pavel Sanda
918146addd Fix DocBook case 2023-05-11 15:29:14 +02:00
Jean-Marc Lasgouttes
6fbc8c6352 Fixup 7f1b1729: restore lazy caret handling
For some reason, the code that should have been put in
updateCaretGeometry() went to resetCaret(). I do not see how that made
sense.

I am not totally sure what the consequences of the patch are, though.
It just "looks right".
2023-05-11 10:13:27 +02:00
Pavel Sanda
b198a36a36 Less expensive OP first as this might be called often. 2023-05-10 12:43:14 +02:00
Pavel Sanda
52fd21f902 Handle stats for French guillemets 2023-05-10 12:23:56 +02:00
Pavel Sanda
63ff4f4431 Count quotes in document statistics as well.
Currently any quote counts as a single character.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg219697.html
2023-05-09 20:48:13 +02:00
Pavel Sanda
16da5ef010 * LanguageUi.ui - change layout.
This pane is responsible for horizontal excess size (at least in CZ
translation) of document settings panel. The reason is second encoding combo
which get very lengthy (there are actually 3 of them).
This patch moves them to separate line.

Beware, touching this panel is headache.
Qt Designer (5.15.2) does not know even how to load this ui
file correctly and it's impossible to move unicodeEncodingCO.
When breaking layout this CO is mysteriously deleted.

Finally I gave up and simply edited file in vim to get COs to the new row.
2023-05-09 20:33:42 +02:00
Pavel Sanda
75d731c9d8 * OutputUi.ui - Reorganize Output pane so it takes less vertical space. 2023-05-09 19:06:26 +02:00
Pavel Sanda
20b45cf028 * Document prefs: rename Format -> Output 2023-05-09 19:05:31 +02:00
Pavel Sanda
c3613f1f17 * PrefDocHandlingUi.ui - add naming for emergency file 2023-05-09 18:35:00 +02:00
Jean-Marc Lasgouttes
e620920fe2 Fix unitialized member warning by coverity
The members open_braces and close_wildcards of MatchStringAdv are not
initialized in case of early return and coverity complains about that.
2023-05-09 13:52:33 +02:00
Enrico Forestieri
ee9fca42bb Use black as default color for an inset button label text
It turns out that LyX was using red as default color for the
inset button text since ever. However, due to the use of "inherit",
the default button text color was black in practice. This was so
until [897ee2ed/lyxgit], which made the label font not inherited
by default anymore. Hence, all insets that didn't specify a specific
label button color started using red as default color.

This commit restores the previous behavior and introduces the
possibility of modifying this default color.

Fixes bug #12771
2023-05-09 11:33:13 +02:00
Richard Kimberly Heck
8fac7d7035 If the ending delimiter is at the end of the file, then the test
pimpl_->is
will return false no matter what. So we need a different way to
check if the delimiter was found.
2023-05-06 18:59:40 -04:00
Jean-Marc Lasgouttes
e454deba2c Revert "Move Fullscreen preferences from Editing>Control section into Look & Feel>User Interface section"
I pushed it by mistake.

This reverts commit 4d31e20d7d.
2023-05-05 21:23:21 +02:00
Jean-Marc Lasgouttes
3ae5d6bdec Do not return copies of string members
This fixes the g++ 12 warnings below.

../../master/src/Converter.cpp:714:55: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  714 |                                         Mover const & mover = getMover(conv.to());
      |                                                       ^~~~~
../../master/src/Converter.cpp:714:71: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::to() const())’
  714 |                                         Mover const & mover = getMover(conv.to());
      |                                                               ~~~~~~~~^~~~~~~~~~~
../../master/src/Converter.cpp:786:39: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  786 |                         Mover const & mover = getMover(conv.from());
      |                                       ^~~~~
../../master/src/Converter.cpp:786:55: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::from() const())’
  786 |                         Mover const & mover = getMover(conv.from());
2023-05-05 20:35:23 +02:00
Yuriy Skalko
4d31e20d7d Move Fullscreen preferences from Editing>Control section into Look & Feel>User Interface section 2023-05-05 19:21:37 +02:00
Jean-Marc Lasgouttes
43b24085fb Merge files Text{,2,3}.cpp
This is done at the end of the release cycle to avoid backporting issues.

The goal is to simplify development, since it was difficult to guess
in which file a given method could be found.

There is some effect on compilation time, but it is not too bad:

* before merge

  lapinot: time make Text.o Text3.o Text2.o
    CXX      Text.o
    CXX      Text3.o
    CXX      Text2.o

  real	0m32,504s
  user	0m31,027s
  sys	0m1,446s
  lapinot: rm Text*.o
  lapinot: time make -j8 Text.o Text3.o Text2.o
    CXX      Text.o
    CXX      Text3.o
    CXX      Text2.o

  real	0m21,282s
  user	0m32,661s
  sys	0m1,424s

* after merge

  lapinot: time make Text.o
    CXX      Text.o

  real	0m26,731s
  user	0m25,706s
  sys	0m1,020s
2023-05-04 16:28:09 +02:00
Jean-Marc Lasgouttes
21dcb4782f Never not show caret when window does not have focus
A non blinking cursor could appear when hovering on inset button.

Fixes bug #12762.
2023-05-03 12:22:52 +02:00
Jean-Marc Lasgouttes
e533118b38 spacing 2023-05-03 12:15:26 +02:00
Jean-Marc Lasgouttes
89db357cd6 Code factoring: introduce BufferView::busy()
The WorkArea should not have to look at details of the undo stack.
No change intended.
2023-05-03 11:57:31 +02:00
Daniel Ramoeller
dfc3db773a Fixup 89394bcd: handle cursor keys from keypad
Due to a macOS peculiarity, it is necessary to handle KeypadModifier.
We do it unconditionnally, although only macOS seems to be affected.

"Note: On macOS, [...] The KeypadModifier value will also be set when
an arrow key is pressed as the arrow keys are considered part of the
keypad." (​https://doc.qt.io/qt-6/qt.html#KeyboardModifier-enum)

Related to bug #12572.
2023-05-03 11:25:06 +02:00
Jean-Marc Lasgouttes
ee5dcc9d47 Fixup e1261817: place cursor correctly in RtL
In an RtL paragraph, the cursor should be placed to the right of the
end-of-paragraph indicator.
2023-05-02 16:44:40 +02:00
Jean-Marc Lasgouttes
97ccb8c8c9 Make inset info icons tight again!
This is a follow-up to 5be391b2, which increased the space on
left/right of graphics inset. This extra space makes sense in normal
graphics editing, but is weird in the case of InsetInfo, which has its
own spacing.

Create a special tight graphics inset class, and use that for icons.
2023-05-02 14:49:47 +02:00
Enrico Forestieri
17b24cf480 Re-enable QWindowsMimeMetafile with Qt6
Qt 6.5.0 has dropped support for the QWindowsMime class
in favor of a new QWindowsMimeConverter class. They say:
  "If you have implementations of QWindowsMime or QMacMime in Qt 5,
   then those will almost directly translate to the new APIs but
   require less boiler-plate code to register the converters with Qt."
This may be true, but in practice they break binary compatibility with
previous versions. If you used the QWindowsMime class until Qt 6.4 by
using boiler-plate code to register the converters with Qt, you now
need to modify the sources and recompile. Fantastic!
2023-04-28 23:34:01 +02:00
Pavel Sanda
c6a190d480 Centralize use of "all files" wildcard in dialogs so it's consistent. 2023-04-28 21:59:37 +02:00
Pavel Sanda
a42a57a0b6 Increase hint verbosity, otherwise difficult to understand. 2023-04-27 21:24:49 +02:00
Pavel Sanda
5be391b274 Do not let cursor overlap with inserted graphics.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg219612.html
2023-04-27 20:37:32 +02:00
Scott Kostyshak
1dc55bd88b Fix compiler warning about unused string consts
These trigger a warning with Clang:

src/Session.cpp:34:14: error: unused variable 'sec_session' [-Werror,-Wunused-const-variable]
string const sec_session = "[session info]";
             ^
src/Session.cpp:35:14: error: unused variable 'sec_toolbars' [-Werror,-Wunused-const-variable]
string const sec_toolbars = "[toolbars]";
             ^
2023-04-26 14:06:25 -04:00
Pavel Sanda
72eb386af0 Improve error msg. 2023-04-21 23:15:16 +02:00
Jean-Marc Lasgouttes
f7afcc31fe Fix undo with cell-plit
This function modifies several cells.

Fixes bug #12746.
2023-04-21 14:42:51 +02:00
Pavel Sanda
18be0ec7f8 Few changes in GUI color strings to improve grouping. 2023-04-19 22:25:18 +02:00
Juergen Spitzmueller
a15bc829d1 Do not load mathrsfs if unicode-math is required (#12734)
The latter provides \mathscr and the packages clash
2023-04-15 12:35:22 +02:00
Pavel Sanda
3dd79b1c4e comment only 2023-04-14 23:58:59 +02:00
Pavel Sanda
4b736a19f2 Add few color comments 2023-04-14 23:16:54 +02:00
Juergen Spitzmueller
9ec80456fe tex2lyx: fix import of umlauts and ß in math (#12739) 2023-04-14 19:13:23 +02:00
Pavel Sanda
7f614397ed typo 2023-04-14 10:53:37 +02:00
Pavel Sanda
32209c9845 Typo in metadata glyphs check.
So I belive, but someone please double check.
2023-04-13 21:55:57 +02:00
Pavel Sanda
6b7da5ec8c typo 2023-04-13 21:50:43 +02:00
Pavel Sanda
f664498ba7 typo 2023-04-13 21:36:17 +02:00
Jean-Marc Lasgouttes
d828728cc9 Revert "Automatically adjust tab stop width"
The fix is more complicated than that

This reverts commit bb16efc07e.
2023-04-11 14:19:20 +02:00
Daniel Ramoeller
bb16efc07e Automatically adjust tab stop width
Extend tab stops to the same indentation point instead of a fixed number of spaces.

Fix for bug #12736
2023-04-11 13:36:52 +02:00
Scott Kostyshak
7368e5be2b Amend 1dc66608
Declare override, otherwise we get the following warning:

src/insets/InsetListings.h:42:7: error: 'isEnvironment' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
        bool isEnvironment() const { return !params().isInline(); }
             ^
src/insets/Inset.h:606:15: note: overridden virtual function is here
        virtual bool isEnvironment() const { return getLayout().latextype() == InsetLaTeXType::ENVIRONMENT; }
                     ^
1 error generated.
2023-04-10 13:14:15 -04:00
Juergen Spitzmueller
b42e978080 Do not switch dir with numbers and babel in full unicode
Patch by Udi Fogiel
2023-04-10 15:31:26 +02:00
Juergen Spitzmueller
8917cb3cc8 luabidi's \\LR[E] needs to be embraced (possibly a LuaTeX bug)
without the grouping, trailing text disappears
2023-04-10 15:16:20 +02:00
Juergen Spitzmueller
2abde5d162 Inset::forceLTR() only determines whether explicit switches are needed
(as opposed to InsetLayout::forceLTR()). So properly set this for ERT
and remove downstream special casing
2023-04-10 10:20:11 +02:00
Juergen Spitzmueller
767f3e5b81 Fix spacing in forceLTR for classic latex 2023-04-10 08:37:04 +02:00
Juergen Spitzmueller
e9c8b10c1d Do not forceLTR math with Xe/Lua (part of #12731) 2023-04-10 08:24:46 +02:00
Juergen Spitzmueller
f058442be9 Put forceLTR (display) environments in LRE environment rather than command
This fixes whitespace issues.
2023-04-10 08:10:51 +02:00
Juergen Spitzmueller
1dc666082e Add Inset::isEnvironment()
This usually returns InsetLayout::isEnvironment(), but listings has
specific conditions (depending on whether it is inline or not)
2023-04-10 08:09:32 +02:00
Juergen Spitzmueller
61f2cd27a8 Fix indentation 2023-04-09 15:01:17 +02:00
Juergen Spitzmueller
7b6707fc52 Properly resolve undefined citations with Xe/Lua and bibliography environment
These need an extra LaTeX run
2023-04-08 19:25:30 +02:00
Juergen Spitzmueller
6ec6db8cd9 Fix crash when copying multiple cells in table
while having done "backwards" selection (selBegin() in a later
column/row than selEnd())
2023-04-08 16:55:41 +02:00
Juergen Spitzmueller
849d0c81ca Record babel use for single par preview 2023-04-02 14:51:47 +02:00
Juergen Spitzmueller
84dde6aeb9 Fix indentation 2023-04-02 12:31:41 +02:00
Daniel Ramoeller
211554d0df Fix bug #12721. 2023-03-30 16:12:08 -04:00
Juergen Spitzmueller
3a02e477a0 Sync doc CT settings with dialog-external change of status (#12703) 2023-03-21 10:24:34 +01:00
Jean-Marc Lasgouttes
1d637b8af0 Spaces in typewriter font never expand in justified text
This fixes on-screen appearance of things like code with lines longer
than the window width.

The TeXbook makes it clear by indicating that \fontdimen3 == 0 for
these fonts.
2023-03-18 21:03:42 +01:00
Jean-Marc Lasgouttes
f24bb4a919 Remove indentation on screen after a plain separator inset
Fixes bug #12700.
2023-03-18 19:47:42 +01:00
Juergen Spitzmueller
5ad6cbb1d8 Fix signal order (#12712) 2023-03-18 15:58:04 +01:00
Juergen Spitzmueller
81d6965c81 Do not swap parens and stuff with babel and Xe/LuaTeX 2023-03-17 18:11:38 +01:00
Jean-Marc Lasgouttes
e2011856bc Fixup a2378c1182: handle the monospace case
When the font is tt, the stretch space is null. Change the display
rendering to accomodate that.
2023-03-17 14:27:15 +01:00
Jean-Marc Lasgouttes
98b5a16793 Fix completion in math when inline completion was not yet shown (take 2)
Better version of b4211ef2: we handle the case of a unique completion early.

Fixes bug #12674.
2023-03-16 11:58:49 +01:00
Jean-Marc Lasgouttes
fb1c4494ea Revert "Fix completion in math when inline completion was not yet shown"
A better fix is in the works.

This reverts commit b4211ef206.
2023-03-16 11:58:49 +01:00
Richard Kimberly Heck
7bcf201f40 Fix bug #12707 2023-03-15 23:24:47 -04:00
Jean-Marc Lasgouttes
175bcc6efc Fixup 00c39208: initialise ParagraphMetrics::id_ in default constructor
This was missing. Spotted by coverity.
2023-03-15 23:38:16 +01:00
Jean-Marc Lasgouttes
a2378c1182 Improve display of ellipsis special char
Follow the TeXbook and use a half space as separation.
2023-03-15 12:25:19 +01:00