Commit Graph

27014 Commits

Author SHA1 Message Date
Richard Kimberly Heck
2afc68ede2 Whitespace 2020-10-02 13:11:28 -04:00
Jean-Marc Lasgouttes
dd65a97b55 Pass parameters as const references when possible
Fixes some cppcheck warnings.
2020-10-02 18:56:01 +02:00
Jean-Marc Lasgouttes
4d9a2c2e59 Fixup f96b99dc: do not initialize cache too late 2020-10-02 12:17:57 +02:00
Jean-Marc Lasgouttes
a97b384b07 Fixup f96b99dc: thinko
Setting the res value and returning from the function at the same time
does not make sense. After reflection, it is the "return" that shall
go.

No idea what effect it had.
2020-10-02 12:06:32 +02:00
Juergen Spitzmueller
8b155ce957 Refactoring 2020-10-02 08:30:31 +02:00
Juergen Spitzmueller
720179947e tex2lyx: properly set textclass if no class is given
(snippets without \documentclass and no forced class)
2020-10-02 08:17:45 +02:00
Jean-Marc Lasgouttes
e16b9e8d22 Remove non-const version of ParagraphMetrics::getRow
Constify a bit TextMetrics::isRTLBoundary().
2020-10-01 14:58:18 +02:00
Jean-Marc Lasgouttes
a2b754b10b Fixup 7d965319: reset cursor font at a finer level 2020-10-01 14:19:09 +02:00
Jean-Marc Lasgouttes
7f1b1729b4 Cleanup the caret geometry code
Intended changes:

* code is shorter and cleaner

* caret scales better with zoom when cursor_width=0: completion
  indicator, l-shaped cursor...

Details:

* Rename BufferView::getPosAndHeight to getPosAndDim because ascent is
  needed too and width could in the future be set depending on font.

* Get rid of rect_ in CaretWidget and record a Dimension (and y value) instead.
  Remove also caret_width_ and slant_, replace rtl_ with dir.

* Make CaretWidget members public and lose the trailing _.

* change CaretWidget::update to read its parameters from current bufferview.
2020-10-01 13:17:01 +02:00
Jean-Marc Lasgouttes
7d96531909 Fix bug where cursor size is not reset correctly.
A couple of calls to setCurrentFont fix the issue, but there has to be
more cases to catch. I am not sure why it used to work.
2020-10-01 12:44:38 +02:00
Jean-Marc Lasgouttes
f9aadae290 Get rid of helper Text::previousWord(), used only once 2020-09-29 10:15:31 +02:00
Richard Kimberly Heck
a41bcb3701 Error message 2020-09-28 22:45:44 -04:00
Richard Kimberly Heck
003a267764 We really do not want id to change 2020-09-28 22:20:22 -04:00
Richard Kimberly Heck
594401912b Fix minor annoyance with previous commit.
When validating local layout, in particular, we create a dummy text TextClass
and so are not necessarily modifying previously declared material. Hence, we
get a spurious (but harmless) "Incomplete argument definition!" warning. This
suppresses it, but to do that we need to propogate the ReadType.
2020-09-28 22:07:08 -04:00
Richard Kimberly Heck
6f643e52d4 Allow argument definitions in layout files to modify existing ones.
This is what layout re-definitions do in all other cases.
2020-09-28 22:06:11 -04:00
Richard Kimberly Heck
54a72663ae Move defaults into struct definition 2020-09-28 21:30:40 -04:00
Pavel Sanda
ad475adfd3 amend 6d6fc761be 2020-09-28 16:44:12 +02:00
Pavel Sanda
6d6fc761be Qt4 compilable again 2020-09-28 16:34:42 +02:00
Yuriy Skalko
e47092044b Use real italic slope for slanted caret 2020-09-28 14:30:05 +02:00
Juergen Spitzmueller
b38500353c Amend 448e5efab4
Only set langClosed to true if it really has been closed.
2020-09-26 12:12:09 +02:00
Enrico Forestieri
f0807a604c Use correct bounding box when exporting from command line
Without GUI an image is not available even if it is actually cached.
In this case we load the image for obtaining its dimensions in order
to correct the clipping bounding box.

This amends 380f34a1.
2020-09-25 20:58:40 +02:00
Enrico Forestieri
a8572c1358 Correct comment 2020-09-25 12:11:10 +02:00
Enrico Forestieri
9b1763cd42 Do not correct clipping bounding box for vector formats
This amends 380f34a1 that only took into account the postscript format.
2020-09-25 12:01:57 +02:00
Jean-Marc Lasgouttes
967f4d661e Remove default parameter of UndoGroupHelper constructor
This can lead to mistakes. If no buffer is required at the beginning,
it is better to pass 'nullptr' explicitly.

Fix a case of missing parameter in GuiCompleter (introduced at
f3656600). This avoids some spurious "There is no group open (creating
one)" messages.
2020-09-23 17:33:17 +02:00
Jean-Marc Lasgouttes
32b688225d Do not use a fake row to compute completion dimension
The code in TextMetrics::completionPosAndDim is needlessly complicated.

1/ It is easier to rely directly on Text::getWord() rather than on the
   helper previousWord().

2/ Using a fake row to compute completion height is overkill. A
   simpler solution is proposed here.

No intended effect. These changes prepare the fix to ticket #11818.
2020-09-22 15:11:08 +02:00
Juergen Spitzmueller
b814c4fda7 Fix unnecessary cprotect 2020-09-20 08:45:42 +02:00
Thibaut Cuvelier
da67bde61a Revert "XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1, and not XHTML5."
This reverts commit c8e2c17a: this makes some browsers unable to understand basic HTML entities.
2020-09-20 01:35:14 +02:00
Thibaut Cuvelier
44a7d2bc88 DocBook: adapt code for older GCC. 2020-09-19 23:55:07 +02:00
Thibaut Cuvelier
b5adcec28a XHTML: fix for encodings in attributes (patch by Kornel) 2020-09-19 20:43:42 +02:00
Thibaut Cuvelier
c83fd0eb06 XHTML sections: saner code to close the section.
It only caused troubles in corner cases...
2020-09-19 20:43:42 +02:00
Thibaut Cuvelier
a85b4b88ed XHTML sections: only filter out things that are not Sectioning, not based on the level. 2020-09-19 20:43:42 +02:00
Thibaut Cuvelier
0dfa240209 XHTML: restore sections. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
15dbc2b9ab Revert "XHTML: remove <section> support."
This reverts commit 52216b73
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
c8e2c17a58 XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1, and not XHTML5. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
92ad86dacc XHTML: remove <section> support. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
bfeb3b66b1 DocBook: slight code simplification. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
6c51cabd35 DocBook: fix output in Layout::write. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
50f011e062 DocBook: implement InsetBox titles. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
3711a38b9c DocBook: fix a crash in bibliography paragraphs. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
1b818c448d DocBook: work for more subfigure cases.
EmbeddedObjects hid quite a few gems :).
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
8758000641 DocBook: ensure xml:id is not output too many times.
This is mostly important for subfigures, but debugging this issue showed that InsetCaption could be slightly simplified and InsetLabel should be made a tad more robust.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
d0a5ba4859 DocBook: handle other cases of subfigures. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
9a48c8d22b DocBook: fix handling of new lines and fonts.
Only the font variable was restored to the right state, not fs.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
5f0720e947 XHTML: fix generation of many useless </section>. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
faec783822 XML: bad fix for a crash that only happened in XHTML.
As an error is output, I suppose that this behaviour is OK.
2020-09-19 20:43:40 +02:00
Scott Kostyshak
a632a9ae3c DocBook: remove useless functions. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
1a76fb9658 DocBook: avoid using isspace in StartTag::writeTag.
This is the cause of crashes (on both Windows and Linux).
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
2cd7a94f8b DocBook: introduce Floating::docbookFloatType.
This ensures that all comparisons for DocBook are made on the same normalised version of the float type. This cased a strange bug where <table> was output within <informaltable> for Linguistics Tableaux.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
8ed8d36595 Fix two warnings in BufferView. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
40f4da3c9f DocBook: floats can no more override DocBookTag.
This lead to a quite subtle bug. The major problem is that float tags
depend on whether the LyX float has a title (formal) or nor (informal).
This information cannot be encoded in the layout format as easily as a
simple DocBookTag.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
08a58242c1 DocBook: better output with the Linguistics module.
One issue left: <table> output within an <informaltable>, that does not make sense... I'm debugging it.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
abed1f3e6e DocBook: fix crash with Linguistics example.
This was due to Floating::docbookTag not returning anything with the floattype_ tableau. Another issue that happened with that document is that the standard library's isspace crashed for some characters. I therefore implemented a more efficient version of the part that required it, and inlined the definition of isspace (even though that part becomes irrespective of locale, but was that feature ever used?).
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
594a4763b7 Fix a few warnings. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
e3da8b65f6 DocBook: several missing features for Additional.lyx.
Includes: semantic markup (sorry about noun: Additional.lyx uses it to mark menus; there is something better in DocBook, but it looks like the LaTeX equivalent is really for person names), boxes, info layouts.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
19734ea454 DocBook: implement LyX-Code.
This is quite ugly.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
bc9d3ec262 DocBook: <person> is not valid per se, rather use <personname>.
The cleanest solution would still be <person><personname>, but this ought to be enough. Otherwise, that would imply having two tags for some fonts...
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
8f3d0fd88f DocBook: new-line behaviour in bibliographies. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
6d246bba69 DocBook: fix margin notes.
They were nested twice in <sidebar>. Also fixes a new line issue.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
91982ee105 DocBook: new lines around formulae. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
e995414917 DocBook: avoid generating fonts for "special cases" like equations. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
654559feb8 DocBook: fix line issues around programlisting. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
9d3a717ef1 DocBook: fix font issues when a paragraph has an InsetNewline. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
7a1b82a16a DocBook: fix issue with fonts. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
c3aa843da8 DocBook: fixes in bibliography (missing new line at the end). 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
6688b076cc DocBook: fixes in lists.
Actually output something when list item is empty. XMLStream discarded the sequence StartTag/EndTag (nothing in between).

New-line behaviour around term in description lists.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
5b01c80635 DocBook: fix titles in KOMA Script. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
976bd91fc2 DocBook: bug fixing with wrapper merging. 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
ec0f4885a7 DocBook: fix bibliographies (end of <bibliography> and sections). 2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
642b18aad0 DocBook: generate <partintro> when required. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
17b06f5336 DocBook: streamline code to handle sections. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
f219fe1cd7 DocBook: streamline code to handle abstracts. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
a8da31e5e0 DocBook: fix handling of index end-of-range. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
78a361778f DocBook: fix float tags (was unduly overridden).
The output was not valid for floats without title.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
39ad6e84f0 DocBook: improve equation formatting (new lines for block equations). 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
fc2c36289b DocBook: rewrite makeListEnvironment. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
8656fbd520 DocBook: start splitting environment handling in two, to have proper things for lists. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
1bd49f9c39 DocBook: make all make* functions have the same argument order. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
fc0999a422 DocBook: partially remove use of bpit/epit in docbookParagraphs and docbookSimpleAllParagraphs.
This will help with the next refactoring to be much cleaner (only work with iterators, don't maintain twice the same information).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
bfc67c59b4 XML: use the new mechanisms for CR detection with errors.
This helps tracking down line problems even in the presence of errors.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
52b2d3f683 DocBook: make Paragraph::simpleDocBookOnePar return a list of paragraphs.
Before, it directly wrote to the XMLStream, but it made implementation of new lines tricky. Now, it returns the XML for each sub-paragraph (delimited by new lines) as a string, so that the caller can adopt a more precise behaviour (such as in lists).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
faaf780bed DocBook: fix compilation issues. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
3d348818e0 DocBook: Coverity potential problem for precooked bibliographies. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
ac46456b28 DocBook: simplify precooked bibliography code. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
6a4d3dbef7 DocBook: remove useless includes. 2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
d8651cc60b More functions in anonymous namespace. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
25f72d392c DocBook: fine tuning of new lines. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
bdea21a87e DocBook: improve comments. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
9393ca74ba DocBook: new logic to handle the new lines, only used in output_docbook for now. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
27a44f8e48 XML: memorise if the last thing that is getting output is a line feed. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
6998e76495 DocBook: define new arguments in layouts to configure new-line behaviour. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
87dae26e4a Simplify code to generate only one paragraph at a time. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
9184ae14f0 A few more constants to avoid copies 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
dab71087cf DocBook: add a layout tag to tell whether an item is the abstract or not. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
7b0f9d9524 DocBook: simplify code to handle abstracts. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
0f145c3ef0 DocBook: use DocBookWrapperMergeWithPrevious in the code. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
c92e0bc5e7 DocBook: fix for ordering. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
72c304a629 DocBook: make openParTag/closeTag use paragraphs instead of layouts.
Not useful per se, but will be next with checking whether the wrapper tags should be opened/closed.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
c417253d0b DocBook: use DocBookItemTag within paragraphs.
This is at least helpful for AAS, even though it slightly resembles a repurposition of that parameter.
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
1a09086ec2 Merge findLastParagraph and findLastBibliographyParagraph to lower code duplication.
Maybe these functions should move to ParagraphList.h/cpp?
2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
4d78fe5957 Slight code-consistency improvements. 2020-09-19 20:43:36 +02:00
Thibaut Cuvelier
ad18c19492 DocBook: add new layout parameter DocBookWrapperMergeWithPrevious. 2020-09-19 20:43:36 +02:00
Thibaut Cuvelier
a852706bf0 DocBook: allow empty paragraphs before the <info> section. 2020-09-19 20:43:36 +02:00
Daniel Ramoeller
9a1f732664 Show slanted caret (cursor) when text style emphasis/italics/slanted.
Fixes for bug #11428. Emphasis is used regularly and it is helpful to
see whether the next text will be written emphasized directly from the
cursor.

This is also implemented in MS Word and Google docs but not in
LibreWriter.

Also fixes the caret for RTL languages whose width was previously
extended into the wrong direction.
2020-09-18 13:27:06 +02:00
Yuriy Skalko
cd933534bd Increment preferences format to 34: rename Cyrillic *.kmap files 2020-09-17 15:05:31 +02:00
Jean-Marc Lasgouttes
b96b876403 Revert "Show toolbar context menu only when clicking on the toolbar"
Something is wrong.

This reverts commit f25253f89a.
2020-09-16 16:54:33 +02:00
Daniel Ramoeller
f25253f89a Show toolbar context menu only when clicking on the toolbar
Previsouly it was on the whole application window, except on disabled toolbar
buttons.

Fix for bug #11949
2020-09-16 11:18:57 +02:00
Jean-Marc Lasgouttes
ae37caacdd Add method FontMetrics::italic()
This can be useful for ticket #11428.
2020-09-14 16:26:19 +02:00
Yuriy Skalko
b0db575dc1 Show custom text styles in status bar
Fixes bug #11951.
2020-09-14 11:38:29 +02:00
Scott Kostyshak
670da1817e Fix documentation for LFUN_LAYOUT
The argument 'ignorenests' was renamed to 'ignoreautonests' at
d6fb2abb.
2020-09-12 19:31:42 -04:00
Stephan Witt
320b6b6656 #6401 correct cursor movement for word forward/backward with enabled Mac style (mac_like_cursor_movement)
The change includes a rewrite of the cursor movement when „mac style“ is enabled and don’t change anything otherwise.
The new code for mac uses the document iterator to go forward or backward. The traversal stops at word boundaries.
If going forward the position increments until a word is reached (if not already inside) and stops at the end of the word.
If going backward it does the same in opposite direction. The cursor jumps over non-editable insets and math.
Editable (open) insets are entered and the cursor move detects word boundaries inside them.
2020-09-12 14:34:56 +02:00
Yuriy Skalko
fb7b7e5223 Refactor runCommand 2020-09-11 16:13:23 +02:00
Jean-Marc Lasgouttes
c1f8c6c26d Fixup 5202d44e: make caret geometry update lazy
Instead of working around crashes in update of caret geometry, only
request it as needed. The actual computation will take place just
before painting the caret.

It might be that this is overkill and that caret geometry should be
updated unconditionally. One would have to to some timing while idle to
ascertain that.

Fixes bug #11912.
2020-09-11 11:48:12 +02:00
Eugene Chornyi
46da0d9d4d Workaround Qtbug regarding the QAbstractScrollArea::mouseMoveEvent(...) (06969f9d) is only needed until Qt 5.15.1 as it was fixed there. 2020-09-10 20:40:48 +02:00
Daniel Ramöller
69841003a3 Let Ctrl-Click on a reference jump to the corresponding label.
Fix some warnings while we're at it. (That part by RKH.)
2020-09-10 12:38:41 -04:00
Daniel Ramöller
35aaa1c528 Show child documents in outline with their paths. 2020-09-10 12:30:12 -04:00
Richard Kimberly Heck
a8de13632a Add FIXME 2020-09-10 12:24:52 -04:00
Jean-Marc Lasgouttes
bf25e8568d Fixup ad954a32: make space insets easier to see.
The previous code left one extra pixel on each side of the visible space, and
spaces became too small to be readable.
2020-09-09 11:28:21 +02:00
Jean-Marc Lasgouttes
eda3219662 Remove unneeded space for \nolimits 2020-09-09 10:35:35 +02:00
Enrico Forestieri
fcd14df230 Avoid spurious requirements
The macros defined in the symbols file are only used for on-screen
representation, so that their definition should not require the use
on any latex package. Their definition should be taken into account
only when they are overridden by user macros with same name.
2020-09-09 01:32:51 +02:00
Enrico Forestieri
0762b52334 Try to use the right width for math symbols
The rules for typesetting math differ from the rules for typesetting
text. For example, two italic 'f' chars have to be typeset more closely
than two 'o' chars in text mode, but not in math mode. Qt provides a
method that returns the distance appropriate for drawing a subsequent
character in text mode, but nothing for math mode. Typically, the
distance appropriate for drawing the next character in math mode is
the actual width span by the character, corrected by the rules of
an appendix in the TeXbook. Recently, those rules are followed more
closely in LyX but not exactly, and we have to find a way to adapt to them.
Some symbols may need more spacing around them than the width they span.
So, we use the distance suggested by Qt, unless it is less than the
width of the rectangle bounding the symbol. Before Qt 5.11 the used method
was QFontMetrics::width(), but since then it has been declared obsolete
in favor of QFontMetrics::horizontalAdvance(), whose name conveys better
its meaning.
2020-09-08 22:30:02 +02:00
Jean-Marc Lasgouttes
b744c3e28a Revert "Fixup 5202d44e: make caret geometry update lazy"
Something is wrong with the cursor.

This reverts commit dc35f1ddf4.
2020-09-07 16:02:50 +02:00
Jean-Marc Lasgouttes
dc35f1ddf4 Fixup 5202d44e: make caret geometry update lazy
Instead of working around crashes in update of caret geometry, only
request it as needed. The actual computaiton will take place just
before painting the caret.

It might be that this is overkill and that caret geometry should be
updated unconditionally. One would have to to some timing while idle to
ascertain that.

Fixes bug #11912.
2020-09-07 15:52:43 +02:00
Jean-Marc Lasgouttes
9b18a9b609 Fixup e1be71da5: avoid duplication of layout
If the containing paragraph has kept its layout, reset the layout of
the first paragraph of the newly inserted inset.
2020-09-07 14:16:47 +02:00
Jean-Marc Lasgouttes
a58bcf1d27 Fixup f96b99dcb3: read correctly \limits after macros
Move InsetMacro::limits_ to InsetMacro::Private, where it should have
been from the start. This means that limits_ is now copied when the
macro is cloned.
2020-09-07 12:13:42 +02:00
Enrico Forestieri
062d94c5da Fix on-screen display of special math fonts
Make sure that the on-screen representation of the special math fonts
mathbb, mathds, mathfrak, mathcal, and mathscr matches the latex output.
2020-09-06 18:16:04 +02:00
Juergen Spitzmueller
61739e5aef Add some hspacers 2020-09-05 08:23:56 +02:00
Juergen Spitzmueller
199fb4b934 set defaults for float_placement and float_alignment 2020-09-05 08:09:02 +02:00
Stephan Witt
45e8ea4acc #11756 Respect system preferences for tabbing on Mac 2020-09-04 23:28:27 +02:00
Enrico Forestieri
a9afdbb73c Personalize fonts
When the fonts distributed with texlive with same family name
as ours are also managed by fontconfig, Qt is not able to
discriminate ours by the style only. In order to be sure Qt
will load our fonts, we change the foundry name from 'PfEd'
to 'LyEd' and augment the font family name with this foundry
name. This only works on *nix, because adding a foundry name
seemingly breaks things on Windows. However, this is a *nix
only problem, seemingly.
2020-09-03 17:46:30 +02:00
Jean-Marc Lasgouttes
efc8d44d09 Fixup 2e784b2f: consider default layout too.
And simplify the test at the same time.
2020-09-03 12:56:33 +02:00
Juergen Spitzmueller
5c83c5c410 Foward-port tooltip addition from stable (3a7560dcb0) 2020-09-03 08:55:46 +02:00
Richard Kimberly Heck
5606e934ac Accelerators 2020-09-02 10:22:26 -04:00
Enrico Forestieri
8039b34802 Adjust debug output for fonts
This restores the debug output as it was intended before the
introduction of the LYXERR macro that was unconditionally outputing
an end of line. This is how this output was appearing until lyx 1.5:

Looking for font family cmr10 ... got: cmr10
 got it normal!

instead of as it was since lyx 1.6 and until now:

Looking for font family cmr10 ...
got: cmr10
 got it
normal!
2020-09-01 12:12:55 +02:00
Richard Kimberly Heck
1ba785f2c6 Localization 2020-09-01 01:41:10 -04:00
Richard Kimberly Heck
3c25899eab Improved fix for edit button 2020-08-31 11:20:49 -04:00
Richard Kimberly Heck
cf7e32ee8f Fix problem with edit button.
The previous implementation relied upon the cursor being immediately
in front of the inset. A bad idea.
2020-08-31 10:50:59 -04:00
Richard Kimberly Heck
a385b7dc2b Fix bug 4475.
Add ability to create child from the include dialog.
2020-08-31 10:20:52 -04:00
Jean-Marc Lasgouttes
d68f6f7f40 Add FIXME: do we need to update scrollbar at each draw()?
Related to ticket #11947.
2020-08-30 19:16:38 +02:00
Stephan Witt
292799a4bd #11756 cleanup the view menu on Mac
Using US english desktop language LyX's Mac OS adds some items to the view menu:
1. Show/Hide Tab Bar and
2. Enter Full Screen
These items won't work properly and it's better to hide them.
2020-08-30 15:35:02 +02:00
Stephan Witt
1c5a2fc0ec #11756 hide additional menu items in edit menu on Mac
Mac OS adds two extra menu entries to the edit menu.
These menu items are:
1. Start Dictation...
2. Emoji & Symbols
Both menu items don't work with LyX.
Therefore they shouldn't be present and the new code hides them.
2020-08-30 11:24:59 +02:00
Stephan Witt
784139da50 Remove unused leftover from Makefile. 2020-08-30 11:24:59 +02:00
Enrico Forestieri
80f94a9398 Use correct width for \fint
Both QTextLine::naturalTextWidth() and QTextLine::horizontalAdvance()
return the same value for \fint. However, examining esint10.ttf with
fontforge does not reveal any issue with the metrics. The fact that
\fint seems to be the only affected symbol might be due to its code
point, which corresponds to a space, so that maybe Qt makes some
assumptions on the metrics.

As QTextLine::naturalTextWidth() returns the width of the line that is
occupied by text, in the case of a single symbol we can obtain the
same value by using the width of the rectangle bounding the symbol.
2020-08-29 20:10:26 +02:00
Juergen Spitzmueller
6f476b960e Localize format prettyName in some more places (#11954) 2020-08-29 11:50:43 +02:00
Juergen Spitzmueller
3fc095e3bc Do not \protect label in subfloat caption (#11950) 2020-08-28 07:32:29 +02:00
Yuriy Skalko
3bd358a2f6 Prevent permanent disabling of comboboxes in Vertical/Horizontal space dialogs 2020-08-28 07:07:44 +02:00
Juergen Spitzmueller
4fdcf0e929 address deprecation warning 2020-08-27 14:43:23 +02:00
Pavel Sanda
28dd0e1f21 Fix Qt4 compilation. 2020-08-27 14:05:22 +02:00
Juergen Spitzmueller
bc76026da5 Disable citationSearchLE with citationSearchCB 2020-08-27 12:53:41 +02:00
Juergen Spitzmueller
39caa70100 Clear info_ cache if format changes 2020-08-27 12:41:40 +02:00
Juergen Spitzmueller
d44929ff81 Properly report back if showDirectory() doesn't succeed 2020-08-27 11:58:37 +02:00