There are two parts in this patch :
1/ in the part where the cursor is already visible, replace calls to
scroll/scrollUp/scrollDown by direct manipulation of the anchor
vertical position. Reasoning in terms of new position rather than
amount of pixels to scroll makes work easier.
2/ in the part where the cursor is set to a new TOP or CENTER
position, move the code around in order to prepare for new ScrollType
enums.
No change intended, except that CENTER now relies on the contents
dimension of the row that holds the iterator, that is without spacing
and labels.
The code there that checks whether we scroll beyond the top/bottom of
document is not needed anymore, this is handled later by
BufferView::update(bool).
Note that this methods may disappear with time.
No change intended.
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.
This code is not necessary anymore after the fix to #13069.
Remove the first QString argument to createView(). Set the autoShow
parameter to false by default and rename createView(id) to
createAndShowView(id) to avoid member function overloading issues.
Remove optional <GEOMETRY> argument of window-new lfun.
Document the removal of the argument in release notes.
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.
Fixes ticket #13086.
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.
In classic babel, these varieties are only available via modifiers
or attributes, which means that they could only be used instead rather
than in addition to the default variety
This is the new(er) babel mechanism to load languages via babel *.ini
files.
Some languages (or varieties) are only supported this way, some work
better with unicode engines this way (for the latter case, we have
BabelProvide 2)