Commit Graph

29317 Commits

Author SHA1 Message Date
Juergen Spitzmueller
16902f6584 Remove unused variables
Probably relicts from development

(cherry picked from commit 7016f0c676)
2024-11-18 10:31:16 +01:00
Juergen Spitzmueller
1138b3875b 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.

(cherry picked from commit 360bb1fa7c
amendment from 51f4fc7f67 is included)
2024-11-13 17:14:54 +01:00
Juergen Spitzmueller
2a60f32780 Fixup logic in LaTeXFonts::getUsedFont()
Allow for unavailable switchdefault fonts fall back to AltFonts

Prerequisite to implement #13124

(cherry picked from commit 833c372931)
2024-11-13 17:11:43 +01:00
Juergen Spitzmueller
a8d90cde6f Fix spacing problems in previews with math macros (#13120)
This occurs on the legacy path when no cropping tools are available.

(cherry picked from commit 9ffacb341d)
2024-11-07 18:34:26 +01:00
Juergen Spitzmueller
b86361ab5a One more Qt enum fix 2024-11-07 12:39:12 +01:00
Juergen Spitzmueller
181110f33e Qt enum fixes 2024-11-03 06:04:31 +01:00
Juergen Spitzmueller
4137bf116e 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

(cherry picked from commit 11cbc3c4a7)
2024-11-02 12:27:23 -04:00
Juergen Spitzmueller
008c7cfa47 Fix loading order of fancyhdr (#13118)
This must be loaded after geometry (amends ca4fc01847)

(cherry picked from commit 561aa8bb32)
2024-11-01 16:15:12 +01:00
Juergen Spitzmueller
b185ffeddc Check for NULL pointer earlier
Reported by Coverity

(cherry picked from commit 5ec247a957)
2024-10-20 17:49:21 -04:00
Juergen Spitzmueller
d44bea76ea Fix group box width in Document > Settings > Float Settings
Also fix typo in widget name
2024-10-17 17:46:21 -04:00
Jean-Marc Lasgouttes
e78b2b4e87 Give a layout name to math HullInset
This makes it accessible to inset-forall.

(cherry picked from commit f4a3f4f29b)
2024-10-17 10:21:33 +02:00
Jean-Marc Lasgouttes
3cab29486d QFontMetrics::xHeight() is not always the ascent of 'x'
Use the real ascent of glyph 'x' as LyX 2.3.x did.
It can make a difference at least on Windows with many fonts.

Fixes bug #13100.

(cherry picked from commit 194b53ef9d)
2024-10-16 13:02:16 +02:00
Juergen Spitzmueller
6a9677db4f Fix (biblatex) file encoding handling in GuiBibtex (#13109)
(cherry picked from commit 83006fc080)
2024-10-11 12:40:44 +02:00
Juergen Spitzmueller
fd6f8c28c3 Protect \inputencoding in i18npreamble
as it might end up in a moving argument (\lstlistlistingname in book
classes).

See https://marc.info/?l=lyx-devel&m=172812937932740

(cherry picked from commit a16e4b206a)
2024-10-07 09:36:00 +02:00
Juergen Spitzmueller
478d59f5dd Adhere to semantic background color with default branches
This fixes color mismatched when "use system colors" is checked

See https://marc.info/?l=lyx-users&m=172797086718347

(cherry picked from commit 1f7e8d3ffe)
2024-10-05 12:53:45 -04:00
Pavel Sanda
f73b86132c PDF options: reflect in UI mutually exclusive colorlinks and frames.
Backport 601abfe929.
2024-10-01 20:34:42 +02:00
Koji Yokota
2e4cc60eec Fix #13094 Wrong IM window after opening a new window 2024-09-30 08:25:00 +09:00
Juergen Spitzmueller
f56fcd01a2 Allow negative offset in GuiLine (#13102)
(cherry picked from commit 2244ac3dee)
2024-09-26 08:14:59 +02:00
Juergen Spitzmueller
624fd5f442 Re-focus workarea after some outline context-menu actions (see #1624)
Thanks Pavel for the main idea

(cherry picked from commit 126cbec5e7)
2024-09-24 17:01:47 +02:00
Juergen Spitzmueller
608e678217 Amend 9464f0526e
Simplify function

(cherry picked from commit 9fc1194494)
2024-09-22 11:57:10 +02:00
Juergen Spitzmueller
173464b8a3 Fixup LFUN_REFERENCE_TO_PARAGRAPH for captions in other buffers
The movement to the caption is now done in the LFUN function itself,
as we need the DocIterator in the caption

This greatly simplifies the code in the TocWidget and shifts all the
complexity to the LFUN itself

(cherry picked from commit 9464f0526e)
2024-09-22 11:57:09 +02:00
Juergen Spitzmueller
0c77174406 fixup REFERENCE_TO_PARAGRAPH:
* par id actually can be 0
* properly move on in the buffer list if paragraph is not found
  in the current buffer
* use dit to get label (as this might be in a different buffer)

(cherry picked from commit 4ed822925f)
2024-09-22 11:57:09 +02:00
Juergen Spitzmueller
8fc5266996 typo
(cherry picked from commit 2c4536c709)
2024-09-22 11:57:09 +02:00
Juergen Spitzmueller
454800a096 rename Paragraph::getLabel()
getLabel() usually refers to a paragraph label (e.g. \item) in this
context, not \label as in the case here.

(cherry picked from commit 7d46ddaa95)
2024-09-22 11:57:09 +02:00
Juergen Spitzmueller
2f6838cab3 fixup definition of LFUN_REFERENCE_TO_PARAGRAPH
(cherry picked from commit 2fdeee4bf7)
2024-09-22 11:57:09 +02:00
Juergen Spitzmueller
179983a7fb Implement reference-to-paragraph in outliner (#1624)
This allows to insert a cross-reference to headings, figures or tables
by right-clicking on the outliner item.

If the item in question does not have a label yet, it is inserted.

(cherry picked from commit 143e534d1e)
2024-09-22 11:57:09 +02:00
Juergen Spitzmueller
69614db1ec Implement LFUN_REFERENCE_TO_PARAGRAPH
This function checks whether a paragraph (specified by ID) has a label.
If so, it simply inserts a reference to this at cursor position, if
not it inserts a label to that paragraph (pos 0) and then inserts
a reference at cursor position.

Needed to implement #1624 (insert cross references to items that do not
have yet a label)

(cherry picked from commit 3fe99bf6f5)
2024-09-22 11:57:08 +02:00
Juergen Spitzmueller
ce64021ce9 Allow DocIterator::paragraphGotoArgument() to return id() without pos()
We need this for the forthcoming reference-to-paragraph function

(cherry picked from commit e3b36208ed)
2024-09-22 11:57:08 +02:00
Juergen Spitzmueller
dcc91b4a85 Implement Paragraph::getLabel()
This function returns the first label (as string) if there is any

(cherry picked from commit a303600b54)
2024-09-22 11:57:07 +02:00
Juergen Spitzmueller
18d9d7ee9d re-implement LFUN_REFERENCE_INSERT
this is in preparation of another feature

(cherry picked from commit 181c8ce7c1)
2024-09-22 11:57:07 +02:00
Juergen Spitzmueller
897fa08919 Only \protect labels in \thanks notes
See https://marc.info/?l=lyx-users&m=136394387505489
2024-09-21 13:36:55 -04:00
Juergen Spitzmueller
59d61892e4 GuiBibTeX: introduce way to toggle between absolute and relative local paths (#13097) 2024-09-21 13:27:37 -04:00
Juergen Spitzmueller
5cb9b55162 Fix outliner tree depth (#13098) 2024-09-19 11:00:01 -04:00
Jean-Marc Lasgouttes
2c5f284f89 Initialize client's name in main()
Initializing clientName at declaration time is not a good idea.

Spotted by Coverity scan.

(cherry picked from commit 3d323412ad)
2024-09-10 12:02:32 +02:00
Jean-Marc Lasgouttes
615f035854 Do not forget to reset stream after std::hex
Spotted by Coverity scan.

(cherry picked from commit f4c02d670b)
2024-09-10 11:59:22 +02:00
Juergen Spitzmueller
a7e8397a84 adapt tex2lyx to 0beb790a6a
(cherry picked from commit f725abea05)
2024-09-09 18:11:08 -04:00
Juergen Spitzmueller
fb5782b62a Handle space issue with refstyle more downstream
It is not necessarily, and infers with some usages, to generally escape
spaces in labels and references

(cherry picked from commit 0beb790a6a)
2024-09-09 18:05:10 -04:00
Juergen Spitzmueller
16281b4cf1 Fix indentation
(cherry picked from commit bfd855747a)
2024-09-09 18:04:59 -04:00
Jean-Marc Lasgouttes
4d46f766ea Avoid missing updates after some operations on selection
The logic at the end of Text::dispatch failed when needsUpdate and
singleParUpdate were true at the same time.
2024-08-31 16:12:59 +02:00
Jean-Marc Lasgouttes
5ca48a7a39 Fix update of cursor in tab-delete when there is a selection
The position of the cursor should not be decreased if it is already at
the start of the paragraph. This can lead to a crash when trying to
display the caret.

(cherry picked from commit 16be88ca18)
2024-08-31 16:12:59 +02:00
Jean-Marc Lasgouttes
d7e2ca377f Get rid of QPA_XCB define
Since the platform is selected at run time (e.g. xcb vs. Wayland), it
is not a good idea to decide at compile time what code is run. Another
example is on macOS, where having xcb libraries available will lead to
lauching the Xquartz whenever LyX is running.

With this patch, things are separated:
- the code is run when run-time platform is "xcb".
- the support code is compiled in when xcb header and libraries are
  available.

The cmake code is courtesy of Kornel Benko.

Fixes ticket #13086.

(cherry picked from commit 18c310a8cf)
(cherry picked from commit f1fddd86ef)
(cherry picked from commit 3bc4554e57)
(cherry picked from commit 8c14748e78)
2024-08-31 15:07:29 +02:00
Jean-Marc Lasgouttes
390f458122 Streamline -geometry command-line option support
Instead of baking our own support for -geometry command line option on
Windows (Qt only does that for Xcb), use the fact that Qt 5 provides
the equivalent -qwindowgeometry flag.

All we need to do is to replace the -geometry option with -qwindowgeometry.

This is part of the effort in ticket #13086 to get rid of the
compile-time QPA_XCB define.

(cherry picked from commit ce9de28f06)
2024-08-31 15:05:34 +02:00
Jean-Marc Lasgouttes
76ef192214 Fixup e2cf6731: fix thinko
The current buffer is part of allRelatives(), contrary to what I
thought. Therefore updateId() increased the buffer id by two.

(cherry picked from commit 2eb4e3d3ca)
2024-08-30 15:10:22 +02:00
Jean-Marc Lasgouttes
e2cf6731c0 Do not run updateMacros if the buffer has not changed
Each buffer now has an id which is increased when it is marked dirty
(or when one of its relatives is marked dirty).

This can be a big win since updateMacros is very expensive.

(cherry picked from commit 999fb37ebb)
(cherry picked from commit fe1a3b57df)
2024-08-30 11:11:10 +02:00
Jean-Marc Lasgouttes
f06de64047 Force a metrics update of buffer after reload
It makes reload more robust and is in any case good enough to avoid
crash in #139091.

Fixes bug #13091.

(cherry picked from commit 52ec69a1af)
2024-08-27 14:07:51 +02:00
Juergen Spitzmueller
53ae96fb0b Assure OK/Apply button is initially disabled in InsetParamsDialogs (#8927)
(cherry picked from commit a2629b8eab)
2024-08-25 12:42:33 -04:00
Koji Yokota
0562b13743 Fix wrong preedit cursor position in Qt5 2024-08-20 21:11:15 +09:00
Pavel Sanda
3a68177562 Fix regression introduced via #12819.
Cherry-pick e322ef153.
2024-08-20 09:32:03 +02:00
Juergen Spitzmueller
a46fb46633 Improve output pane, as discussed in #12372
* The image scale param is shared by XHTML and DocBook
* It does not only apply to math
* Get rid of redundant group headers (#12902)

(cherry picked from commit 1429552063)
2024-08-18 18:32:03 +02:00
Juergen Spitzmueller
b21f104b37 Add "needcopiesfrom" converter flag
This is needed to provide ePub and other DocBook-based exports with
the right (renamed) images (fixes #12372)

(cherry picked from commit 03c5842006)
2024-08-18 18:29:22 +02:00