Commit Graph

29036 Commits

Author SHA1 Message Date
Juergen Spitzmueller
27033f41aa Fix comment 2023-11-05 12:38:09 +01:00
Juergen Spitzmueller
098b4f3348 Amend ec2da3a509 2023-11-05 12:28:27 +01:00
Juergen Spitzmueller
ec2da3a509 Prevent data loss when closing LyX while document dialog has unapplied changes (#12955)
Entails new strings, but I think the severity allows for that.
2023-11-05 12:09:33 +01:00
Enrico Forestieri
75a08df529 Inherit outer font in text-in-math environments
Some text-in-math environments such as \text, \mbox, \fbox, and
\makebox, inherit the outer text font. This commit reflects this
in the on-screen representation.

Fixes #12950.
2023-11-02 17:54:02 +01:00
Juergen Spitzmueller
5d193c7b62 Revert "Show full inset context-menu when clicking on text part of collapsible (#10370)"
This reverts commit 6c4afc1ccb.

This needs more thinking to get the menus sane.
2023-11-02 10:17:06 +01:00
Enrico Forestieri
e0e1350b7e Revert "Inherit outer font in text-in-math environments"
This reverts commit d72b9b0238.

Unfortunately, the font taken into account is the font at the
current cursor position rather than the font of the corresponding
math inset.
2023-11-02 01:59:54 +01:00
Enrico Forestieri
d72b9b0238 Inherit outer font in text-in-math environments
The text-in-math environments such as \text, \mbox, \fbox, \makebox
and so on, inherit the outer text font. This commit reflects this
in the on-screen representation.

Fixes #12950.
2023-11-01 22:21:49 +01:00
Juergen Spitzmueller
07c99393be Consider PackageOptions with parskip 2023-10-30 12:54:29 +01:00
Juergen Spitzmueller
6c5dc39cd5 Amend 9de9ec1e88
When setting halfline parskip with parskip provided, we still need
to set this explicitly, as we don't know the current \parskip value.

Also improve code readability.
2023-10-30 12:17:14 +01:00
Juergen Spitzmueller
9de9ec1e88 Do not add empty \parskip definition (reported in #12946) 2023-10-30 09:22:14 +01:00
Pavel Sanda
28f81d1be5 Revert "MathML: don't output delimiters in InsetMathBinom and InsetMathDelim if the delimiter is a space."
This reverts commit be44cb8516, see #12891.
2023-10-27 21:18:45 +02:00
Juergen Spitzmueller
e9998fb1cc Enter table after insertion (#12101)
posForward() jumped over the inset, which is not what is wanted here,
I think (cf. other inset insertion methods)
2023-10-22 10:19:50 +02:00
Juergen Spitzmueller
8e619462e1 Disable OUTLINE functions when min or max toclevel is reached 2023-10-21 13:49:50 +02:00
Juergen Spitzmueller
2b33da5944 Let OUTLINE functions jump from section to part if there is no chapter
Fixes #12938
2023-10-21 13:48:50 +02:00
Juergen Spitzmueller
bf0152185b Make string translatable 2023-10-21 12:52:49 +02:00
Juergen Spitzmueller
4658cf95f7 Disambiguate "Language"
Some translations need a different term for programming languages.
2023-10-21 12:34:47 +02:00
Juergen Spitzmueller
906f2b8507 Fix tautology spotted by coverity
The if and else paths have been identical since the removal of dvipost
(a450797b2a)
2023-10-20 09:53:38 +02:00
Juergen Spitzmueller
33da28e5a5 Fix coverity-detected issue CID 403672
Error handling issues  (CHECKED_RETURN)
Calling "translateString" without checking return value
(as is done elsewhere 15 out of 18 times).

AFAICS we do not need the boolean return value in these two cases.
2023-10-20 09:35:55 +02:00
Jean-Marc Lasgouttes
99ecdd6ceb Fixup 65cb9fa4: avoid extra spacing when selecting math
This was happening whenever a selection started/ended after a fraction
inset.
2023-10-18 12:30:55 +02:00
Juergen Spitzmueller
72e242267b Only apply ui_style if it has changed 2023-10-15 11:20:49 +02:00
Juergen Spitzmueller
81fda3ac55 Warn user that uistyle reset to default requires restart 2023-10-15 11:02:45 +02:00
Juergen Spitzmueller
cfcc57bd89 Simplify 2023-10-15 11:02:35 +02:00
Juergen Spitzmueller
462a701e62 Make new gui element translatable 2023-10-15 09:40:58 +02:00
Juergen Spitzmueller
41e3f1ec98 complement tooltip 2023-10-15 09:17:31 +02:00
Eugene Chornyi
d2132751a7 Implement ui style selection dialog 12832 attempt 2 2023-10-15 08:46:12 +02:00
Daniel Ramoeller
5a9ea580e4 Correctly update Outliner icon size
Fix for #12453
2023-10-14 12:48:09 +02:00
Jean-Marc Lasgouttes
ff7696f184 Do not use Color_selectionmath when selection is gone
It might happen that the selection goes away without recomputing
metrics (for example with char-forward). The added test is a bit of a
band-aid for this situation. A better solution would be to understand
better when metrics computation is triggered in mathed.
2023-10-12 11:30:47 +02:00
Jean-Marc Lasgouttes
174dc2c8be Use Color_selectionmath as needed for multi-cell selection in math
This is complementary to partial selection implemented at 65cb9fa4.
2023-10-12 11:30:47 +02:00
Eugene Chornyi
a99a16ae58 Revert 072ba7bd and f1deb1c6 2023-10-11 23:22:17 +02:00
Eugene Chornyi
f1deb1c658 amend 072ba7bd 2023-10-11 22:03:29 +02:00
Pavel Sanda
c9c5a2a9d8 Add space padding around word count forgotten part of (#12625).
Again from Daniel.
2023-10-11 21:07:12 +02:00
Pavel Sanda
5ed59b3c09 Remove ugly frame around word count (#12625).
Requested and tested by Daniel.
2023-10-11 21:01:56 +02:00
Thibaut Cuvelier
be44cb8516 MathML: don't output delimiters in InsetMathBinom and InsetMathDelim if the delimiter is a space. 2023-10-11 20:37:38 +02:00
Eugene Chornyi
072ba7bd2e Implement ui style selection dialog 12832 2023-10-11 20:06:52 +02:00
Scott Kostyshak
1273f25c76 Fix three sign-compare compiler warning
Fixes three similar warnings. One of them is the following:

src/insets/InsetInfo.cpp:1583:20: error: comparison of integers of different signs: 'int' and 'std::basic_string<wchar_t>::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
        for (int i = 0; i < sequence.length(); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~
2023-10-10 10:13:37 -04:00
Thibaut Cuvelier
531a37baee XHTML: implement InsetInfo. 2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
d8a0f1aadd DocBook: fix a crash in docbookSimpleAllParagraphs.
When having the code preview pane open with examples/Language_Support/Mixing_Japanese_with_other_Languages_(with_CJKutf8), clicking at random on paragraphs sometimes yielded a crash: *par when par is the end of the iterator. LyX could output the whole document as DocBook without this patch and still generates the same output with it (i.e. no text is missing).
2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
43921861b9 DocBook: in InsetInfo, ensure that no db:date is inserted within a db:date. 2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
78b157b61e DocBook: fix closing formatting after deleted text.
Previously, when closing font tags, only the previous character's font was used. However, if that character is deleted, it had no change of having the right font tags opened/closed. Hence, look further to compare the font of the current character to output with the font of the previously output character.
2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
b9fc4bae44 DocBook: fix formatting of TODOs.
The lines were very long; this commit truncates them to 120 characters.
2023-10-10 09:57:17 -04:00
Thibaut Cuvelier
0c2f3dedd6 DocBook: add support for InsetInfo.
A similar patch would be required for LyXHTML, but it will come later. The main impact is that some text isn't output in XHTML (like DocBook before this patch).

The code isn't as clean as it could be. I avoided touching anything not related to DocBook, as the release of 2.4 is nearing, while leaving comments for parts to improve for the next release cycle. Given that the code compiles, there are no risks for TeX or XHTML outputs; for DocBook, less content is skipped, which is a net improvement for users.
2023-10-10 09:57:17 -04:00
Pavel Sanda
cc257b4927 Few string fixes from Dan. 2023-10-09 20:41:57 +02:00
Juergen Spitzmueller
90307cf212 Amend 3f0bb8aa43
Account for the paragraph marker
2023-10-04 13:49:34 +02:00
Juergen Spitzmueller
3f0bb8aa43 Fix assertion on paste with empty pars 2023-10-04 13:40:38 +02:00
Juergen Spitzmueller
5cb53606b6 Introduce color_selectionmath
To have a distinctive color for selected math which works in both modes

Also, link color_selectionmath with QPalette::HighlightedText, so we
won't need to special-case on lyxrc.use_system_colors any longer
2023-10-04 13:10:07 +02:00
Jean-Marc Lasgouttes
65cb9fa4df Use Color_selectiontext as needed for partial selection in math
Currently, selected math hull insets use Color_selectiontext when
system colors are in use. This commit implements the same behavior
for partial selection.

This is done by introducing two element types (BEGIN_SEL and END_SEL)
to MathRow.
2023-10-03 12:51:11 +02:00
Juergen Spitzmueller
2b69dc54da Revert the logic of 343a9749ab
It might be better to be explicit also with black, after all.
2023-10-01 12:20:40 +02:00
Juergen Spitzmueller
242381464b Simplify 2023-10-01 11:38:10 +02:00
Juergen Spitzmueller
6df25c3585 When box background is "none", frame color != black and page color has been set
then use the page color as box background, not white
2023-10-01 11:08:11 +02:00
Juergen Spitzmueller
343a9749ab No need to use \fcolorbox with explicit black frame and no background
White background, however, is always treated explicit (think non-white
page background)
2023-10-01 10:12:52 +02:00