Fix bug #9288: Cannot position cursor near the end of a line.
The problem was that some parts of the code assume that the right margin is part of the width of the row. This is not the case, only the left margin (Row::x) is counted.
The code has been fixed and documented to reflect this.
Stephan Witt [Sat, 18 Oct 2014 13:50:22 +0000 (15:50 +0200)]
#9130 Text in main work area isn't rendered with high resolution
Load images with search mode check_hidpi to read images with double size when present.
Stephan Witt [Sat, 18 Oct 2014 13:30:58 +0000 (15:30 +0200)]
#9130 Text in main work area isn't rendered with high resolution
Add display_pixel_ratio to buffer params to use it for displays with high resolution.
It holds the highest ratio between physical pixels and device-independent pixels of the LyX application.
Preview snippets will be generated using this value to get high resolution preview.
Stephan Witt [Sat, 18 Oct 2014 13:26:49 +0000 (15:26 +0200)]
#9130 Text in main work area isn't rendered with high resolution
Add pixel_ratio to graphics params to use it for displays with high resolution.
It holds the ratio between physical pixels and device-independent pixels of the graphics.
Stephan Witt [Sat, 18 Oct 2014 13:19:47 +0000 (15:19 +0200)]
#9130 Text in main work area isn't rendered with high resolution
Add search mode check_hidpi to ease the lookup for images with double size to use for displays with high resolution.
Stephan Witt [Sun, 12 Oct 2014 17:23:13 +0000 (19:23 +0200)]
#9130 Text in main work area isn't rendered with high resolution
Introduce the concept of pixel ratio: the ratio of physical and device independent pixels.
This is useful for rendering of content on Retina-displays of Mac hardware with high resolution.
Qt has real support for this starting with Qt5 - therefore it has to be compiled conditionally.
This change uses some work of Marcelo Galvão Póvoa, thank you.
What a selection spans several cells in mathed, and a deletion occurs though LFUN_CHAR_DELETE_FORWARD for example, only the case of a proper grid was handled. When no such grid exists, all cells between the first and the last index are cleared now.
Rewrite of change-related helpers
lyxfind.cpp(findNextChange, findPreviousChange, findChange, selectChange): factor the change-selection part out of the change-finding part
Text.cpp (acceptOrRejectChanges): call only selectChange
insets/InsetTabular.cpp (doDispatch): fix to #9291. The problem was simply that the default status for the cursor in the call to *::doDispatch is "dispatched".
insets/InsetTabular.cpp (edit): do not reset the selection
mathed/InsetMathHull.cpp (InsetMathHull::doDispatch): do not declare LFUN_FINISHED_* lfuns as undispatched after handling them
Fixes #9289, and an unreported cousin of #3900
Text2.cpp (checkAndActivateInset, checkAndActivateInsetVisual): activate insets on selection if the anchor is inside the inset.
insets/InsetText.cpp (InsetText::edit): do not reset the selection
Fixes #2346.
mhchem loads amsmath and needs therefore be loaded after it but before packages that redefine commands of amsmath. We already take care of esint but not of wasysym
Cmake export tests: Use unique file names for exported files
This should prevent possible errors for tests running in parallel.
We now also check for created export file.
complainer/feature requester: Scott Kostyshak
Cmake tex2lyx tests: Take care of initialized userdir
If we are testing tex2lyx the first time, then the userdir
is empty. We call now configure.py to initalize in case it is needed.
The algorithm to detect if reconfigure is needed mimics the lyx behaviour.
The check for a latex format is very fragile. Both libmagic and our
guessing from contents cannot distinguish the pstex and pdftex formats
used by the xfig external inset. Moreover, it may also happen that
lyx files are mistaken as latex ones. Thus, when the guessed format
is latex, the only solution is to give precedence to the format
determined by the file extension.
Replace Q_WS_WIN with appropriate guards to account for Qt5.
This commit replaces almost all occurrences of Q_WS_WIN to comply
with Qt5. The remaining occurrences should *not* be replaced,
because the guarded code won't compile on Qt5.
Fix the -geometry command line argument for Windows.
The command line argument -geometry WIDTHxHEIGHT±XOFF±YOFF
specifies a preferred size and location for the main window.
Currently, this is semi-broken on Windows. Indeed, only
specifying WIDTH and HEIGHT places the main window such that
the left and top borders are invisible such that the window cannot
be moved. Moreover, the XOFF and YOFF parts (when present) are
used to specify the distance of the window from the left and top
or right and bottom edges of the screen, when using '+' or '-',
respectively. However, -geometry 800x600-20-20, instead of placing
the window such that its bottom and right edges are at a distance
of 20 pixels from the corresponding screen edges, places the
window such that its left and top borders are out of the screen.
This is corrected by this commit, which also addresses the fact
that Qt5 does not define Q_WS_WIN anymore.
Kornel Benko [Mon, 25 Aug 2014 11:49:12 +0000 (13:49 +0200)]
keytests: add a timeout for LyX process to start
If the LyX window does not appear after a certain (conservative)
time, the keytest now fails. One reason that caused the LyX window
to never show up was when DISPLAY was not set. This particular case
has been fixed in <commit1hash>. This commit is meant for the more general
scenario.
(Collaboration with Scott Kostyshak)
Stephan Witt [Sun, 24 Aug 2014 18:29:52 +0000 (20:29 +0200)]
Remove special GlobalMenuBar class. As Patrick De Visschere pointed out it is not needed. The shortcut handling of Qt does it internally now what GlobalMenuBar was made for.