Commit Graph

27620 Commits

Author SHA1 Message Date
Juergen Spitzmueller
80cb0650e4 Clean up previous selections with empty searchstr on instant 2021-02-17 16:55:55 +01:00
Juergen Spitzmueller
ab1cc8e1c2 Consider case (in)sensitivity when querying special char insets 2021-02-17 15:50:54 +01:00
Juergen Spitzmueller
ca160da07d GuiSearch: separate findClicked() slot from more general function
the latter one is also accessed by different paths than clicking
2021-02-17 14:48:31 +01:00
Juergen Spitzmueller
180fca2fcd Fix Find button with search as you type 2021-02-17 14:32:26 +01:00
Juergen Spitzmueller
05004e138f FancyLineEdit: reformat using our indentation style
No change in function
2021-02-17 12:46:37 +01:00
Juergen Spitzmueller
50783d94a8 Advanced F&R: Improve code on Return key 2021-02-17 09:51:09 +01:00
Juergen Spitzmueller
a2a5656d07 Adv F&R: indicate search direction 2021-02-17 09:50:57 +01:00
Juergen Spitzmueller
5ed0dddcf2 Adv F&R: Fix accelerator conflicts 2021-02-17 09:49:25 +01:00
Juergen Spitzmueller
7ad70c908b Add accelerator 2021-02-17 09:08:26 +01:00
Jean-Marc Lasgouttes
3f093dd103 Fixup 824d1c99: do not change the semantics of leftMargin(pit_type)
In the row painter, when painting a centered label, one wants to get
the left/right margin of the non-first rows (without indent). It was a
bad idea to change leftMargin(pit) to do that, because its semantics
are unclear and the the code depends on the fact that this function does
strange things when the paragraph is empty...

Fixes bug #12118.
2021-02-16 20:27:48 +01:00
Juergen Spitzmueller
fe44b3c0fa GuiSpellchecker: resolve accelerator conflicts 2021-02-16 19:13:13 +01:00
Juergen Spitzmueller
76db3c3f85 GuiThesaurus: complement lyxfind options 2021-02-16 16:33:30 +01:00
Juergen Spitzmueller
109e98d945 GuiSearch: Properly delegate focus 2021-02-16 13:30:31 +01:00
Jean-Marc Lasgouttes
a7c1a39b5b Make selections vertically tighter.
Introduce a new Row::contents_dim(), which height is restricted to the
row contents and does not contain any extra vertical spacing.

Rely on this for painting selections: if the selection starts on row,
for example, the ascent of the contents dim is considered. If ot was
started above, then the full dim is used.

Fixes bug #3899.
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
090e9a6c36 Keep the useful parts of reverted commits
Keep from 907f0207 the introduction of BufferView::top/bottomMargin()
and the setting of the top/bottom margin of the document. The
difference is that the extra height is still added to the relevant
rows, and not only to the paragraph metrics.

Keep from f41ca959 the reduction of top/bottom margin for Adv F&R
workareas.
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
a40ca1430e Revert "Improve handling of top and bottom margin"
This reverts commit 907f020724.
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
810b86560a Revert "Reduce top/bottom margin for Adv F&R workareas"
This reverts commit f41ca959fd.
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
2c2ae5ecd8 Revert "Fix correction of row in getPitAndRowNearY"
This reverts commit 08a3405181.
2021-02-16 12:29:40 +01:00
Jean-Marc Lasgouttes
f6c87c63c1 Revert "Make sure that top/bottom margins are visible when needed"
This reverts commit a78eb4471f.
2021-02-16 12:29:40 +01:00
Juergen Spitzmueller
213a3bc557 Add/fix some tooltips 2021-02-16 10:02:47 +01:00
Juergen Spitzmueller
119e8c08d4 Fix replace all in selection with change tracking 2021-02-16 09:42:17 +01:00
Pavel Sanda
1ba3307226 GuiSearch did not work with num. keypad enter 2021-02-16 08:52:21 +01:00
Juergen Spitzmueller
5980afaee0 Add support for search/replace within selection (#2548) 2021-02-16 08:11:09 +01:00
Juergen Spitzmueller
df4da34836 GuiCitation: Add missing connection 2021-02-16 07:32:01 +01:00
Enrico Forestieri
a0a0119b48 Account for true dpi
We have to account for the physical rather than logical dpi.

See #12132.
2021-02-15 22:43:36 +01:00
Richard Kimberly Heck
01dc665a25 Make continuous spellcheck the default.
Convert old preferences to preserve previous setting, as well.
2021-02-15 11:03:43 -05:00
Richard Kimberly Heck
93e7ab1f3e Do not write \default_view_format if it is empty. 2021-02-15 10:55:37 -05:00
Juergen Spitzmueller
c4fbd0d913 Initialize F&R dialog with selected text (#8448) 2021-02-15 16:04:17 +01:00
Richard Kimberly Heck
bdd7e26b3e Fix warning 2021-02-15 09:48:37 -05:00
Juergen Spitzmueller
e5958e3ca8 GuiSearch: catch Esc 2021-02-15 15:37:58 +01:00
Juergen Spitzmueller
958213ee52 Improve instant search 2021-02-15 14:12:07 +01:00
Juergen Spitzmueller
f4a91f6e9e Correct tooltip 2021-02-15 11:32:42 +01:00
Juergen Spitzmueller
f59b8cb657 GuiSearch: Add auto-wrap option 2021-02-15 11:30:03 +01:00
Juergen Spitzmueller
22542700a7 Attempt at "search as you type" 2021-02-15 10:53:23 +01:00
Stephan Witt
3841304f80 Use explicit initialization for plain pointer to buffer view. 2021-02-15 10:03:39 +01:00
Juergen Spitzmueller
b2a317c037 Sett forward to true by default in search string parsing 2021-02-15 09:44:27 +01:00
Juergen Spitzmueller
d85c09ae14 GuiSearch: Replace icons on buttons by characters 2021-02-15 08:57:13 +01:00
Juergen Spitzmueller
7869437691 Forgot l7n flag 2021-02-15 08:42:15 +01:00
Pavel Sanda
b497baeea3 Guisearch Qt4 compatibility 2021-02-14 22:44:33 +01:00
Stephan Witt
d65e7a8c87 Additional check for clipboards find buffer support - otherwise Qt complains with unsupported clipboard mode 2021-02-14 22:18:07 +01:00
Jean-Marc Lasgouttes
5a58ca6576 Fix caret height when inserting new inset
For now, the simplest thing to do it to compute metrics in all cases
before calling setCurrentFont().

In 2.5, a better approach will be to add a new virtual function
InsetText::setFont that will set correctly TextMetrics::font_ (a cache
of the reference font).

Fixes bug #12126.
2021-02-14 21:39:15 +01:00
Jean-Marc Lasgouttes
8117172d8a Fixup 051b6ce6: fix drawing of EndLabelString
Fixes bug #12122.
2021-02-14 20:09:35 +01:00
Stephan Witt
3d616bfc79 #11925 Remove the gap between button frame and button background (by Daniel Ramoeller) 2021-02-14 19:04:52 +01:00
Juergen Spitzmueller
c4c62f7185 Remove duplicate header 2021-02-14 19:03:31 +01:00
Stephan Witt
a476cc4839 #8055 add support for system-wide find buffer on Mac
Command-E is standard for paste to find buffer on Mac. That's why the key binding is changed appropriately.
2021-02-14 18:56:25 +01:00
Stephan Witt
0bd9a8be3d Proper initialization of private member bv_ of GuiSearchWidget 2021-02-14 18:48:42 +01:00
Juergen Spitzmueller
4db1a08450 Let replace combo enabled if replace buttons are disabled. 2021-02-14 18:23:54 +01:00
Juergen Spitzmueller
1cc615fa95 Remove empty layout 2021-02-14 18:20:27 +01:00
Juergen Spitzmueller
234c6b5c8b Remove resolved FIXME 2021-02-14 18:15:33 +01:00
Juergen Spitzmueller
28239bf996 Frame takes less space than GroupBox 2021-02-14 18:12:38 +01:00
Richard Kimberly Heck
7c9eaa248d nullptr 2021-02-14 12:05:45 -05:00
Richard Kimberly Heck
fe38f02cde Update release notes for bookmark shortcuts 2021-02-14 11:46:27 -05:00
Richard Kimberly Heck
98f3ef0924 Amend 2baa3a46a6. 2021-02-14 11:41:25 -05:00
Juergen Spitzmueller
2baa3a46a6 Transform simple search dialog to dock widget (#2625)
Also solves #8054
2021-02-14 17:18:00 +01:00
Kornel Benko
48528d0ff0 FindAdv: Use global declaration for findOne() to be usefull for unit tests
cherry-pick from unit-test-adoption/dff4779b06b, author: Yuriy Skalko <yuriy.skalko@gmail.com>
2021-02-14 09:08:23 +01:00
Thibaut Cuvelier
25d3d16360 Amend ac98f21f 2021-02-14 05:36:37 +01:00
Thibaut Cuvelier
ac98f21f8c DocBook: for books only, create a preface around the first few elements so that the result is valid.
Books can only contain parts and chapters, not single sections or text after the abstract.
2021-02-14 05:20:36 +01:00
Enrico Forestieri
11392b7b33 Fix arrows at ends of math decorations
For math decorations with arrows at both ends the code was simply
stretching a prototype symbol, thus distorting the arrows.

Another drawing mode is introduced allowing to draw an element by
maintaining its aspect ratio also when it has to be drawn at the
other end of a decoration. An element drawn using this mode is simply
shifted to the other side by adding either the width or the height,
and a finer adjustment can be obtained by specifying an additional
horizontal or vertical shift.
2021-02-14 01:25:07 +01:00
Thibaut Cuvelier
d8c6bc7c1f Stop using a GCC extension for an unprintable character in regex. 2021-02-13 18:23:20 +01:00
Richard Kimberly Heck
c6dfc70367 Show python info in About LyX 2021-02-13 11:53:14 -05:00
Kornel Benko
fe792d7efe FindAdv: Tweak language settings
Language settings will be ignored if

a.) User selects if with setIgnoreFormat("language", true, true)
or
b.) The pattern does not contain lang-specs other than the default language of document
or
c.) The pattern contains math parts
2021-02-13 16:20:23 +01:00
Juergen Spitzmueller
f8021672ad Address some deprecation warnings 2021-02-13 15:23:45 +01:00
Juergen Spitzmueller
9089839055 Resolve accelerator conflicts 2021-02-13 07:57:10 +01:00
Thibaut Cuvelier
d18dff22b5 DocBook: add the DocBookNoFontInside layout configuration. 2021-02-13 05:09:59 +01:00
Stephan Witt
46bb8f22c9 #8055 correct processing of LFUN_WORD_FIND option flags for repeated search operations 2021-02-13 04:47:44 +01:00
Enrico Forestieri
400cb1b80f Fix small glitch with \underXXXarrow and \overXXXarrow
When the argument is long enough, the arrow in the on-screen representation
was not covering the first or the last glyphs. For example, using
\overrightarrow{abcdefghijklmnopqrstuvwxyz}
the 'a' was drawn outside the covering arrow.
2021-02-12 23:56:27 +01:00
Enrico Forestieri
2ba8ebab67 Slightly increase size of math decorations
Correspondingly tweak some shapes for better results.

Part of #12132.
2021-02-12 23:16:03 +01:00
Jean-Marc Lasgouttes
1cbbe5c3aa Do not redraw cursor twice with Page Up/Down
Just recompute metrics instead of triggering a full redraw. The old
behavior was that, when the document was less that one page long, the
cursor would blink to the top of the document before going to its
correct position.
2021-02-12 18:35:07 +01:00
Jean-Marc Lasgouttes
a78eb4471f Make sure that top/bottom margins are visible when needed
When the cursor is at the top, it is important to make sure that, not
only its row is visible, but also the extra margin at the beginning of
the document, that was added at 907f0207.

Fixes part of bug #12123.
2021-02-12 18:35:07 +01:00
Jean-Marc Lasgouttes
08a3405181 Fix correction of row in getPitAndRowNearY
Now that the ascent of the paragraph metrics is not necessarily the
ascent of the first row (see 907f0207), the test is too strict. Now it
is more symmetrical wrt the !up case.

Note that changing this part of code is associated with a
non-negligible risk of creating a bug elsewhere.

Fixes part of bug #12123.
2021-02-12 18:35:06 +01:00
Juergen Spitzmueller
b75fc70561 Adapt comment 2021-02-12 14:43:56 +01:00
Juergen Spitzmueller
7f90e3b7d2 Introduce search-string-set (#8055)
This stores its argument, the currently selected text or the word under
cursor in the search cache that is used by word-find[-backward|-forward]
if no argument is given to those.

Prerequisite for a feature apparently expected on the Mac.
2021-02-12 14:30:50 +01:00
Juergen Spitzmueller
fbef5e687a Use dialog-show in icon names
(and search for them also with dialog-toggle counterpart lfuns)

Fixes #12137
2021-02-12 12:18:51 +01:00
Juergen Spitzmueller
d1ea8a40af GuiSearch: catch global shortcuts to find forwards/backwards (#11170) 2021-02-12 10:50:47 +01:00
Juergen Spitzmueller
c24c82d986 Correctly handle internal clipboard in cell paste 2021-02-11 16:45:27 +01:00
Juergen Spitzmueller
59bead6dfa Properly fix broken cursor (part of #12134) 2021-02-11 14:53:02 +01:00
Kornel Benko
4cd80de69e FindAdv: Ignore math hull if searching for normal text
Helps to find strings inside math also if the pattern does not use math hull.
Needed due to the algorithm-change of searching text.
2021-02-11 14:03:46 +01:00
Juergen Spitzmueller
9721a5cc6b Set GUI name for local greyedouttext color (#12130) 2021-02-11 09:05:42 +01:00
Juergen Spitzmueller
456b2b0e8b Fix indentation 2021-02-11 08:08:37 +01:00
Juergen Spitzmueller
2175899f17 Re-initiate module filter after dialog re-opening (#12128) 2021-02-11 08:07:55 +01:00
Juergen Spitzmueller
ad1e7da1fb Assure filtered module items are not editable (#12127) 2021-02-11 07:57:09 +01:00
Richard Kimberly Heck
2874384414 Fix bug #10646. 2021-02-10 16:04:25 -05:00
Juergen Spitzmueller
65f96abfec Make delimiter icons a bit smaller 2021-02-10 11:40:56 +01:00
Jean-Marc Lasgouttes
939d25561d DEPM: do not fix cursor pit if it was in a different cell
This bug has been here forever.

Fixes bug #12117.
2021-02-10 10:22:36 +01:00
Jean-Marc Lasgouttes
d2f23c303c Remove left/right spacing around top/left buttons
This makes collapsible insets look better.

Fixes #10323.
2021-02-10 10:22:36 +01:00
Juergen Spitzmueller
c2822d684b Add LFUN_LYXFILES_OPEN
This opens the new templates/examples dialog and creates a view if
necessary (#12106).
2021-02-10 09:36:32 +01:00
Juergen Spitzmueller
e35574b3ce Store the AuthorList in the cut stack
Otherwise we crash when we paste text with markup into a different buffer
that has change tracking disabled (in this case, markup is now kept).
2021-02-09 16:54:21 +01:00
Juergen Spitzmueller
7cccfe5515 BulletsModule: disable size widget with custom bullet (#12011) 2021-02-09 11:01:45 +01:00
Juergen Spitzmueller
11b7714fc1 Use SVG icons in itemize bullet selector
This scales much better than the current png solution, is HiDPI- and
darkmode-ready
2021-02-09 10:32:16 +01:00
Richard Kimberly Heck
080b5107c7 Do not show completion cursor if completion is inactive 2021-02-08 18:48:06 -05:00
Jean-Marc Lasgouttes
c311451518 Fix math class code in InsetMathColor
The current code is too naïve and asserts on MC_UNKNOWN class.

See discussion here:
https://marc.info/?l=lyx-devel&m=161267112524889&w=2
2021-02-08 13:13:21 +01:00
Stephan Witt
80e20e86be #11682 amend change 4d4dc96b06 - check Qt version for all Qt::ApplicationState occurances 2021-02-08 09:04:18 +01:00
Stephan Witt
4d4dc96b06 #11682 open new window on Mac if there is none and LyX is activated via dock 2021-02-07 18:53:40 +01:00
Juergen Spitzmueller
233cfed333 GuiDelimiter: properly calculate widget width 2021-02-07 17:24:59 +01:00
Juergen Spitzmueller
0afae1f97d GuiDelimiter: fix tabstop access
DialogButtonBox not yet included, though.
2021-02-07 17:00:20 +01:00
Juergen Spitzmueller
fa56a5eb98 Adjust selection color of delimiter icons 2021-02-07 12:32:11 +01:00
Enrico Forestieri
3cf5a71463 Amend [5ed01cd6/lyxgit]
This commit takes into account also the case in which a prime follows
a superscript, a case not explicitly mentioned in bug 1633.
This case has to be accounted for in a different way. We cannot look
ahead when exporting, so we simply tell TeXMathStream to output an
empty group if we just output a superscript and a prime comes next.
2021-02-06 20:07:31 +01:00
Juergen Spitzmueller
5c1a6468ac GuiDelimiter: use highlight text color if icon is selected 2021-02-06 16:25:55 +01:00
Juergen Spitzmueller
7c33e2fc08 GuiDelimiter: store delimiter name in UserRole 2021-02-06 15:33:13 +01:00
Juergen Spitzmueller
1fe75ae72c GuiDelimiter: cleanup and fix crash 2021-02-06 15:09:54 +01:00