29615 Commits

Author SHA1 Message Date
Juergen Spitzmueller
d82e6d2bf0 Let errors-show open with the next error from current curson selected 2025-01-05 14:16:47 +01:00
Juergen Spitzmueller
b319b31e6c Amend b6e4ba254855 2025-01-01 15:59:12 +01:00
Juergen Spitzmueller
b6e4ba2548 Reimplement error-next (#2775)
This is often more convenient for checking errors than the dialog.
At least if the errors are obvious.

I re-introduce the binding this had up to LyX 1.4.
2025-01-01 15:45:01 +01:00
Juergen Spitzmueller
7f27eabada Change function type
The return value is never used.
2025-01-01 15:27:37 +01:00
Juergen Spitzmueller
9a650644d7 Fix another indentation 2025-01-01 13:44:14 +01:00
Juergen Spitzmueller
516935f023 Fix indentation 2025-01-01 12:18:05 +01:00
Juergen Spitzmueller
7903b665a6 Introduce errors-show
a way to re-open the (LaTeX or other processing) errors dialog after it
had been closed without having to re-compile the document (#2775)
2024-12-31 12:49:38 +01:00
Juergen Spitzmueller
40dd37089d Fix erroneous whitespace before and after math preview (#13127) 2024-12-15 09:49:36 +01:00
Jean-Marc Lasgouttes
e3ec44ffe7 Fixup 5e857883: update screen when clicking away from preview
This is a regression in 5e857883 that comes from the fact that the
Update::singlePar flag does not operate on the paragraph that may be
modified but on the one where the cursor currently lies.

Until this is fixed, we do a full update when this situation is encountered.

Fixes bug #13128.
2024-12-10 17:43:19 +01:00
Pavel Sanda
ac90ebad04 * doxy - amend 1e5c366d53 2024-12-06 23:31:49 +01:00
Pavel Sanda
c05e5d3a34 * doxy - amend 154b4fdecec 2024-12-06 23:19:08 +01:00
Richard Kimberly Heck
81f5fc80b5 Use buffer language 2024-12-05 17:21:40 -05:00
Richard Kimberly Heck
945251a6c5 Word count for references 2024-12-05 17:17:54 -05:00
Stephan Witt
bdaf1dbe99 #12224 improved palette change event for macos 2024-12-02 08:46:04 -08:00
Jean-Marc Lasgouttes
8e29ad433d Fixup 91d1ad31: beware of the reurn values of getPosNearX
The pair returned by TextMetrics;;getPosNearX is (position, boundary).
Here one had to use short variable names p and b because 'pos' and
'boundary' are a members of Cursor, and [b, p] was use dinstead of
[p,b].

Here, we added a bool & version of boundary() instead to the usual
getter/setter paradigm, because pos() is already like that. It might
be that the setter should be removed later.

Using these two members, it is now possible to use std::tie instead of
auto [,].
2024-12-02 15:24:38 +01:00
Jean-Marc Lasgouttes
629a692ce2 Cleanup Row::findElement and introduce Row::pos2x
Remove the functionality of findElement of also computing a pixel
position and introduce a function that only does that.
2024-11-29 12:14:52 +01:00
Jean-Marc Lasgouttes
d19f4319dc Try to reduce the use of CoordCache::insets().dim()
The debug code does not needed it. The code in Cursor is only used in
mathed.
2024-11-29 11:52:57 +01:00
Jean-Marc Lasgouttes
6701a5d55c Get rid of TextMetrics::x2pos
Replace it with code that uses getPosNearX.
2024-11-25 17:34:43 +01:00
Jean-Marc Lasgouttes
4c72def295 Forgot that 2024-11-25 17:01:30 +01:00
Jean-Marc Lasgouttes
1dbe589b27 Use setCursorFromCoordinates when scrolling
This is better that rewriting yet another version of the same code.
2024-11-25 16:59:20 +01:00
Jean-Marc Lasgouttes
91d1ad319d Cleanup TextMetrics::getPosNearX
This function mostly iterates though a row. Therefore it makes sense
to turn it into a wrapper around an new Row::x2pos() function.

Take this opportunity to use the C++17 structured bindings declaration
instead of passing a bool variable by address (which is only an output
variable).

No change intended.
2024-11-25 15:55:20 +01:00
Jean-Marc Lasgouttes
ecac032a94 Improve cursor movement with boundaries
Introduce a new NoEndBoundary flag for insets like InsetNewline.

Indroduce Row::start_boundary() that is true when previous Row has
end_boundary() set.

Use this to improve cursor movement around row boundaries (both for
logical ad visible cursor movement). The new code remove some of the
newline/separator hardcoding.
2024-11-22 16:30:48 +01:00
Jean-Marc Lasgouttes
33442b17ee Insert a real empty row before display math at start of paragraph
In LaTeX, when a displayed equation is at the start of a paragraph,
there is an empty row in front of it. Up to now, this was mimicked in
LyX by increasing the metrics on top of the inset. This commit creates
a real empty row, accessible by the cursor.

To make this work, many small unrelated changes are needed.

* Introduce new AlwaysBreakBefore inset row flag that means "I want a
  break before myself, even if that means creating an empty row".

* Let InsetMathHull use that for display math.

* Remove the workaround that was added for InsetMathHull metrics. This
  means that MetricsInfo::vmode is not used anymore. I decided to keep it,
  since it may prove useful later.

* Handle the flag in TextMetrics::breakParagraph. This requires to add
  a new flag 'ignore_contents' to TextMetrics::leftMargin, because we
  want the empty row to have a normal left indentation, not the one of
  display math (which is also at pos==0).

* In the initial empty row, do not inherit from the centered alignment
  of the math inset, although both are at position 0.

* Concerning cursor positioning with mouse, two methods need fixing:

  For the vertical part, handle in TextMetrics::getRowIndex the cursor
  boundary at position 0 when it is set. Basically, with cursor
  boundary true, the cursor will be in the empty row, whereas it will
  be in font of the math inset otherwise.

  For the horizontal part, handle empty row in TextMetrics::getPosNearX.

Fixes bugs 11593 and 11093.
2024-11-22 15:29:00 +01:00
Jean-Marc Lasgouttes
6727022b05 Code factorization around getRow()
Rename ParagraphMetrics::pos2row to getRowIndex and add a 'boundary'
parameter. Simplify code that handles boundaries.

No change intended.
2024-11-22 10:33:03 +01:00
Juergen Spitzmueller
d42a300dfe Quote file name to table style in LFUN_TABULAR_STYLE_INSERT
This might fix the woes with table styles on windows, where the path
to the system directory has blanks IIRC (C:\Program Files\...)
2024-11-18 10:23:31 +01:00
Juergen Spitzmueller
7016f0c676 Remove unused variables
Probably relicts from development
2024-11-18 10:11:41 +01:00
Koji Yokota
b30ccafb46 Fix a wrong UTF-8 character in a comment 2024-11-16 00:50:02 +09:00
Thibaut Cuvelier
4d4888aba8 Added mrow to InsetMathCases::mathmlize
Co-authored-by: Lorenzo Bertini <lorenzobertini97@gmail.com>
2024-11-13 20:08:09 +01:00
Juergen Spitzmueller
360bb1fa7c Implement support for classico font package (#13124)
This is only an alternative to the classico font we already support
(uop), hence no file format change.
2024-11-13 09:04:56 +01:00
Juergen Spitzmueller
833c372931 Fixup logic in LaTeXFonts::getUsedFont()
Allow for unavailable switchdefault fonts fall back to AltFonts

Prerequisite to implement #13124
2024-11-13 09:02:49 +01:00
Scott Kostyshak
92b656c17b Revert "Amend a83159f0: Use logical operator ||."
This reverts commit 48c069fa8aec72840dc55688e21c38c5dd321e66.

The commit unintentionally changed behavior. See #13116.
2024-11-11 21:32:18 +01:00
Juergen Spitzmueller
7bf14813d7 Introduce dark/light mode preference (#12224)
This requires Qt 6.8 and only works on Win and Mac.
2024-11-10 10:42:20 +01:00
Juergen Spitzmueller
d75ab6d6f0 One more Qt enum fix 2024-11-07 12:38:19 +01:00
Juergen Spitzmueller
9ffacb341d Fix spacing problems in previews with math macros (#13120)
This occurs on the legacy path when no cropping tools are available.
2024-11-06 18:26:14 +01:00
Jean-Marc Lasgouttes
b40aa80517 Reorganize file list in Makefile
The separation between cpp files and .h files was only necessary for
the monolithic build feature.

Moreover, try to move the stuff in lyx_SOURCES to liblyxcore_a_SOURCES.
Two issues though:

- Box::contains creates a link error, so put all the code in Box.h

- Compare::Compare is an issue too, and I am not sure how to fix it.
  For now, it is thus kept in lyx_SOURCES.

Moreover, version.{cpp,h} are moved to lyx_SOURCES to avoid rebuilding
liblyxcore.a at every commit.
2024-11-05 15:11:11 +01:00
Jean-Marc Lasgouttes
8c43a134fd With Qt 5.9, we need to include <functional>
Also remove 'using' statements (to be avoided in header files) and
refer to std::xxx instead of lyx:xxx.
2024-11-04 18:25:31 +01:00
Jean-Marc Lasgouttes
d86dbf6675 LYX_BEGIN_MUTE_GCC_WARNING: disable for gcc <= 7
I do not know until which version gcc has complained when trying to
mute a warning that it does not support. Recent versions do not do
that.

For now let's just do gcc 7, the limit should be higher.
2024-11-04 17:40:15 +01:00
Jean-Marc Lasgouttes
159e8f2dde Re-instate support for Qt 5.9.4
It was a bit overkill to require support for Qt 5.12 at 6ba2b5c5 and
c39d5b76. Revert partly these commits.
2024-11-04 17:22:21 +01:00
Thibaut Cuvelier
cc2c3e648a MathStream: add missing spaces after commas. 2024-11-04 01:22:22 +01:00
Juergen Spitzmueller
3e6ca9b884 More Qt enum fixes 2024-11-03 06:02:41 +01:00
Thibaut Cuvelier
08d316491f Fix two typos in comments 2024-11-03 03:31:45 +01:00
Juergen Spitzmueller
11cbc3c4a7 Fix AboutLyX layout
* remove wrong (sub)namespaces. This are inserted by newer versions of
  designer, although they are wrong
* add vertical spacer
* make horizontal spacer expand
2024-11-02 14:39:59 +01:00
Pavel Sanda
caff99419a Move header include to cpp. 2024-11-01 20:04:43 +01:00
Thibaut Cuvelier
f6405ef853 Fix a tautological condition. 2024-11-01 17:57:06 +01:00
Scott Kostyshak
24a709ce22 Update tex2lyx tests
From what I understand, the changes are expected.
2024-11-01 17:10:01 +01:00
Juergen Spitzmueller
561aa8bb32 Fix loading order of fancyhdr (#13118)
This must be loaded after geometry (amends ca4fc01847c721)
2024-11-01 14:49:29 +01:00
Pavel Sanda
a7845b561e Header not needed anymore 2024-10-31 21:32:42 +01:00
Pavel Sanda
a8afca4de0 Header not needed anymore. 2024-10-30 20:29:54 +01:00
Jean-Marc Lasgouttes
e30758166e Revert "Remove workaround that is not needed anymore with Qt 5.12"
We want to support Qt 5.9 for now.

This reverts commit 8837f8ca8ca5e1d87a846871aa0860af0dbf6ae5.
2024-10-30 19:31:59 +01:00
Thibaut Cuvelier
110e654b67 InsetMathFont: harden the new switches against unexpected values. 2024-10-30 01:58:54 +01:00