Commit Graph

37737 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
4f4383cac5 remove LyXRC::use_qimage
This is not needed anymore now that we do not need a backup pixmap.

Update LyXRC format to 23 and add conversion.
2017-09-08 16:58:21 +02:00
Jean-Marc Lasgouttes
3b404b0023 Update insets position in cache in more cases
This patch makes sure that, every time a ParagraphMetrics has its
position set, the inset positions for the insets held by this
paragraph are remembered too.

This is complementary to BufferView::updatePosCache, but I do not have
hard evidence that this is required other than to increase robustness.
It may help in some cases when scrolling the document (scrollbar,
cursor up/down, page up/down).
2017-09-08 16:57:22 +02:00
Jean-Marc Lasgouttes
b0737d2589 Rename more instances of "cursor" to "caret"
Thanks to Pavel for the hint.
2017-09-08 16:57:22 +02:00
Jean-Marc Lasgouttes
fb655725b7 Remove workaround that is not necessary anymore.
This code was necessary to handle cases where the insets positions
were not yet in cache. This cannot happen anymore thanks to the
nodraw stage.
2017-09-08 16:57:21 +02:00
Jean-Marc Lasgouttes
8edadee145 Update the painting process documentation 2017-09-08 16:57:21 +02:00
Jean-Marc Lasgouttes
14320e5b9a Make input methods support great again
This unbreaks input methods by splitting the part of the code that
does the actual drawing to a separate paintPreeditText() method which
is called from paintEvent().

The proper solution would have been to introduce the preedit string in
the Row object, like is done for completion, but this is too complex
to do at this point.

The only change in behavior is that now the commit string is inserted
in one fell swoop, intead of emulating a number of key events.
2017-09-08 16:57:21 +02:00
Jean-Marc Lasgouttes
1a7e342652 Cleanup and simplify WorkArea code
Rename cursor to caret to in order to avoid ambiguity. The caret is
now the blinking thing only.

Remove unused header contents, and some not so useful methods.

No intended change of behavior.
2017-09-08 16:57:21 +02:00
Jean-Marc Lasgouttes
e7fdce0b5a Fix caret painting
The trick is to remember in BufferView what has been done at the
previous draw, so that the row that contained the caret can be
repainted if needed.

To this end, add an argument paint_caret to BufferView, although
painting the caret is not the job of the BufferView (at this point).

BufferView::needRepaint will act as an interface with
TextMetrics::drawParagraph to know whether the painting of a given
row should be forced.

Currently everything is done at the top row level, so that, if the
caret is in a large table, the whole table will have to be repainted.
It is not clear yet that this is necessary.
2017-09-08 16:57:21 +02:00
Jean-Marc Lasgouttes
24c29908bd Do the actual drawing in the paint event
Historically, because of two-stage drawing, LyX has been painting on a
Pixmap, and this pixmap is copied to screen at paint event time.

Now that we have three-stage drawing, it is possible to delay the
painting to actual paint event and avoid the intermediate Pixmap.

Known bug: the cursor is never erased.
2017-09-08 16:55:11 +02:00
Jean-Marc Lasgouttes
efc7359015 three-stage drawing: add a nodraw stage
Normally the two stages of drawing are
1/ compute metrics of insets/rows/paragraphs/mathrow...
2/ draw the elements and cache their positions

Now the three stages are
1/ metrics
2/ nodraw: do not draw the elements, but cache their position
3/ draw the elements (and store again their position; it does not
   seems to hurt performance).

Revive the NullPainter: this replaces the setDrawingEnabled mechanism
with a painter that does nothing. The advantage is that updatePosCache
(renamed from setPosCache) does not need anymore to be invoked from
the frontend.

updatePosCache (the nodraw stage) is called at the end of
BufferView::updateMetrics.
2017-08-29 16:37:07 +02:00
Jean-Marc Lasgouttes
48f099d93a Fix Lexer::getLongString prefix pruning logic
This fixes 3 bugs:
1/ only spaces are considered as part of the prefix
2/ leading tabs are removed unconditionally
3/ off-by-one error in the removal

The new intended behavior is:

1/ find the prefix (sequence of spaces and tabs) before the first
   line; remove this prefix from the line
2/ on the next lines, check whether they start with the same prefix,
  and if they do, strip this prefix
2017-08-29 15:30:44 +02:00
Jean-Marc Lasgouttes
c5b8250604 Small update to README 2017-08-29 12:15:44 +02:00
Juergen Spitzmueller
fe61ef9c07 Minor corrections 2017-08-29 12:12:11 +02:00
Juergen Spitzmueller
3da5c23c59 de/Customization: some bits more translation 2017-08-29 12:11:32 +02:00
jpc
508f16cd10 Copy new paragrpah in section C.2.2.1 in localized UserGuide files
Remove CT, translate in French file  and update Changelog
2017-08-29 11:53:23 +02:00
Juergen Spitzmueller
702e5b8118 Minor corrections I did while translating 2017-08-28 15:35:13 +02:00
Juergen Spitzmueller
5e42076b7f de/Customization: some more translation 2017-08-28 15:34:36 +02:00
Jean-Marc Lasgouttes
c874641e95 Fix computation of string width when using a QTextLayout
It was not a good idea to rely on QTextLine::naturalTextWidth() to
compute a string width. The correct method is horizontalAdvance().

Also round the value to the nearest pixel, since this is what
QFontMetrics::width() does.

Fixes bug #10700 (and maybe others).
2017-08-28 14:05:45 +02:00
Juergen Spitzmueller
f4511485da EmbeddedObjects: More (minor) corrections to the Inkscape template decription.
Includes German translation.
2017-08-28 08:41:57 +02:00
Juergen Spitzmueller
933a7dee00 Improve the svg2*tex.py scripts.
The inkscape command was hardcoded, but it seems that we need the full
patch on Windows. Therefore we check in configure.py if inkscape is
installed and pass the proper name (and possibly path) to the scripts.

Should address problems mentioned in #10679
2017-08-28 08:05:29 +02:00
Juergen Spitzmueller
17b37c604c de/EmbeddedObjects: add and translate the Inkscape modifications. 2017-08-27 16:02:50 +02:00
Juergen Spitzmueller
d63b946466 de/Customization.lyx: Some updates and translations.
Still lots to do. This document is utterly outdated.
2017-08-27 15:34:16 +02:00
jpc
f12b1844a7 Copy new documentation of Insksscape external material
in localized files and remove change tracking
2017-08-27 14:46:17 +02:00
Juergen Spitzmueller
491cd48cfe EmbeddedObjects: Clarify the aim of the Inkscape external template
This should clear some confusion about the input format of the template
(see #10679).
2017-08-27 10:50:01 +02:00
Kornel Benko
b5ee08df4d Update sk.po 2017-08-27 10:43:37 +02:00
Pavel Sanda
0d9a11e4ef typo in colored-boxes.lyx 2017-08-27 04:27:38 +02:00
Pavel Sanda
ff572c752f * cs.po 2017-08-27 04:25:43 +02:00
Pavel Sanda
c917164456 Remerge cs.po 2017-08-27 03:30:39 +02:00
Pavel Sanda
bd284d9d9a * layouttranslations: ja checked by Koji (devlist, Sat, 10 Jun 2017) 2017-08-27 03:08:11 +02:00
Juergen Spitzmueller
9f5a55aadc Add proper author info and license header to the inkscape.xtemplate related files 2017-08-26 16:10:55 +02:00
Juergen Spitzmueller
3bbe082e06 de/EmbeddedObjects: minor spelling corrections. 2017-08-26 16:10:17 +02:00
Juergen Spitzmueller
7fc8bfc30d UserGuide: Add some notes about keysym syntax
Fixes: #10745
2017-08-26 13:23:31 +02:00
Juergen Spitzmueller
50ef5a17e4 Fix some oxygen icons
These had phantom elements that made them appear incorrectly in the info
insets.
2017-08-26 09:19:17 +02:00
Kornel Benko
2c4e109b96 Amend ddf2c2a9d4 2017-08-22 08:41:39 +02:00
Richard Heck
ddf2c2a9d4 Change backticks to preferred $(...) syntax.
Replace A && B || C syntax with if-then-else. Apparently, this can
fail, even if B is "echo ...", if STDOUT is for some reason closed.
See https://github.com/koalaman/shellcheck/wiki/SC2015.
2017-08-21 17:25:15 -04:00
Richard Heck
e6cb0c56ff Fix some issues found by the shellcheck script, and move an old
file to the attic.
2017-08-21 17:16:30 -04:00
Christian Ridderström
4c4db93645 Set n:o digits in abbrev. hash in script that checks commit log.
Expliclyt set n:o digits in abbrev. hash in script that checks the
commit log to make script behave the same way on different platforms.

Also improve help text.
2017-08-20 18:34:25 +02:00
Kornel Benko
854d7e1619 Windows only: A try to compile with LYX_CONSOLE again
The use of the value "FORCE" was wrong anyway, since LYX_CONSOLE
is of type "BOOL".
2017-08-18 12:07:03 +02:00
Tommaso Cucinotta
a0e95a2c1b generate_manuals_for_web: switch to xhtml, and use a random userdir while exporting, so no cached pic can be found. 2017-08-18 02:53:32 +02:00
Kornel Benko
491bf1db24 Update version in configure.ac 2017-08-17 11:21:53 +02:00
Kornel Benko
1d0794ee29 Fix compilation of es/Additional.lyx with (xe|lua)latex using for system fonts 2017-08-17 11:11:16 +02:00
Pavel Sanda
e8b324a984 oops, git is playing games with me. 2017-08-17 01:24:44 +02:00
Pavel Sanda
ca0813915c Push Tommaso's script for publishing mans. 2017-08-17 01:14:56 +02:00
Pavel Sanda
7f4e46440d Push Tommaso script for manuals generation. 2017-08-17 00:10:15 +02:00
Uwe Stöhr
a7c1496837 Win installer: updates for beta 1 2017-08-15 21:06:19 +02:00
Scott Kostyshak
50310de67b Back to development 2017-08-14 04:05:11 -04:00
Scott Kostyshak
8f872ef069 This is LyX 2.3.0beta1 2017-08-14 04:03:24 -04:00
Scott Kostyshak
18aca9dd00 Update a layout to 2.3.0beta1 format 2017-08-14 03:22:33 -04:00
Scott Kostyshak
b45be0ecf8 Update docs to 2.3.0beta1 format 2017-08-14 02:31:24 -04:00
Scott Kostyshak
9ce1a337d3 NEWS: remove some uninformative items
Noted by Pavel at

    https://www.mail-archive.com/search?l=mid&q=20170425002424.GC8883%40atrey.karlin.mff.cuni.cz
2017-08-14 02:18:21 -04:00