Commit Graph

27784 Commits

Author SHA1 Message Date
Richard Kimberly Heck
942d3cab32 Change "Local Layout" button to "Local Class".
This is for choosing a local document class/layout file. The tooltip
uses the 'class' language already, and "Local Layout" conflicts with
the way that term is used elsewhere in the dialog.
2021-03-26 13:37:14 -04:00
Richard Kimberly Heck
affd6101bd By default, use an argument's menu string as its label string.
If one wants different label strings, then provide those first.
2021-03-26 13:37:14 -04:00
Jean-Marc Lasgouttes
9ff27f8ce0 Produce an error on bad debug level values
Add new funciton Debug::badValue, that returns the first bad value in a debug
setting string.

Use it to parse the -dbg comand line option and to control the
execution of the debug-level-set lfun.

Use range-based loops in a few places.
2021-03-26 17:55:54 +01:00
Jean-Marc Lasgouttes
0429b580e6 Fixup 4671214f: add comment 2021-03-26 14:26:15 +01:00
Kornel Benko
a9b0f5faae Cmake build with qt6 on MAC
Patch from P. De Visschere
Citing:
I also must exclude the QMacPasteboardMimeGraphics class in
GuiApplication.cpp since QMacPasteboard is not available anymore with qt6.

and add an #include <QStandardPaths> in support/Package.cpp (I suppose
this will pose no problem for qt5 but have not checked it, it's only
needed with USE_MACOSX_PACKAGING)
2021-03-26 13:11:44 +01:00
Daniel Ramoeller
4671214f3d Keep caret visible when small
Fix for ticket #12190.
2021-03-26 12:43:11 +01:00
Jean-Marc Lasgouttes
efbc37926f Set explicitly outer font when inserting text inset.
Now it is possible to set this font directly instead of relying on
metrics() side effects. Do that to avoid crashes due to bad
interactions.

This implements the new scheme that was mentionned in 5a58ca65.

Fixes bug #12204.
2021-03-25 11:26:44 +01:00
Jean-Marc Lasgouttes
06a7731274 Move code responsible to set TextMetrics outer font to InsetText
This code was previously in InsetCollapsible for no good reason.

Move it to a new function InsetText::setOuterFont, which can now be
called for other purposes.

Part of investigation of bug #12204.
2021-03-24 20:28:19 +01:00
Jean-Marc Lasgouttes
56bd50ea6c Move getFont and getLabelFont from InsetCollapsible to Inset
Also move around getLayout and isPassThru.

Part of investigation of bug #12204.
2021-03-24 20:04:27 +01:00
Scott Kostyshak
b2b68c3ee7 Update tex2lyx tests 2021-03-24 13:08:28 -04:00
Jean-Marc Lasgouttes
d03435bc77 Remove tweaks of [pm]i.base.font in InsetCaption
Captions do not reset font settings (try to insert caption in emph context).

Part of investigation of bug #12204.
2021-03-24 16:27:05 +01:00
Jean-Marc Lasgouttes
b37929fdb3 Remove unneeded InsetFootlike::metrics/draw() methods
The font is already set to the buffer font when called from
TextMetrics::redoParagraph and RowPainter::paintInset, because
inheritFont() is false.

Part of investigation of bug #12204.
2021-03-24 16:25:43 +01:00
Kornel Benko
92a50fa273 Cmake build Qt6: Remove some redundant statements. 2021-03-24 11:42:39 +01:00
Thibaut Cuvelier
6102327d3b Improve tool tip for the new DocBook MathML-prefix option. 2021-03-23 22:32:16 +01:00
Thibaut Cuvelier
7a1e048f44 Amend 0f782b0d: add the required changes to lyx2lyx. 2021-03-23 21:12:45 +01:00
Thibaut Cuvelier
6a5288e31e DocBook: add the MathML-namespace prefix in the GUI. 2021-03-23 00:32:45 +01:00
Thibaut Cuvelier
0f782b0ded DocBook: add a parameter to change the namespace prefix for MathML. 2021-03-23 00:32:45 +01:00
Kornel Benko
02a3705496 Amend 635a7d77: Allow compiling with Qt6 with cmake
Thanks Scott for checking.
TODO: Check compilation on Windows and Mac.
2021-03-22 16:19:10 +01:00
Enrico Forestieri
6fa973b377 Fix Qt6 deprecation warning about QString::fromUcs4 2021-03-21 17:15:08 +01:00
Juergen Spitzmueller
4a5ae39e8b Revert "Fix Qt6 deprecation warning (QString::fromUcs4(uint))"
This reverts commit 52dff70641.
2021-03-21 16:59:25 +01:00
Juergen Spitzmueller
2c553df178 Replace obsoleted signal
This has been obsoleted in Qt5 and dropped in Qt6
2021-03-21 12:51:38 +01:00
Juergen Spitzmueller
52dff70641 Fix Qt6 deprecation warning (QString::fromUcs4(uint)) 2021-03-21 12:38:47 +01:00
Juergen Spitzmueller
15c6d4c6b3 Fix Qt6 deprecation warning (QMouseEvent::x() ::y()) 2021-03-21 12:38:05 +01:00
Juergen Spitzmueller
cbc55548a3 Fix Qt6 deprecation warning (QEvent::globalPos()) 2021-03-21 12:37:17 +01:00
Juergen Spitzmueller
b7f983bc47 Address Qt6 deprecation warning (QLibraryInfo::location()) 2021-03-21 12:30:34 +01:00
Juergen Spitzmueller
9ccbc11bf3 Fix unused variable warning with Qt6 2021-03-21 12:30:01 +01:00
Eugene Chornyi
4421b721e4 Make all a synonym of any in cmd debug mode 2021-03-21 09:59:23 +01:00
Enrico Forestieri
34ffa80c4c Fix latex syntax highlighting with Qt6 2021-03-17 10:17:10 +01:00
Enrico Forestieri
968be3f209 Fix copy&paste error 2021-03-17 08:59:04 +01:00
Pavel Sanda
4e2f8dbbeb Qt4 compil fix 2021-03-16 09:39:05 +01:00
Enrico Forestieri
7cb2a10eb8 Amend 635a7d77
With a multiscreen setup and Qt6, make sure to get the geometry
of the screen containing the widget.
2021-03-15 18:35:58 +01:00
Enrico Forestieri
635a7d77dd Allow compiling with Qt6
This commit allows compiling LyX with Qt6 when using autotools.
For a successful compilation the following 2 conditions must be met.

1) The Qt6 qmake has to come first in PATH, so that the command
   "qmake -v | grep -o 'Qt version .'" returns "Qt version 6".
2) The --enable-qt6 switch has to be passed to the configure command.

If --enable-qt6 is used but Qt6 is not found, Qt5 is tried as a fallback.
If also Qt5 is not found, configuring for Qt4 is attempted.
If --enable-qt6 is not used, then things go as usual. This means that Qt5
is tried first and then Qt4, unless --disable-qt5 is used, in which case
Qt4 is directly attempted. This means that existing scripts should
continue working unmodified.

LyX should compile with Qt6 on windows and linux, and possibly also on
mac, but I could not test that. However, it is not guaranteed that it
works as it should. In particular I am not sure that I got right the
conversion from QRegExp to QRegularExpression. For sure, the syntax
highlighting seems to not work right. Someone in the know should take
a look at that. I am able to load documents and compile them but some
thourough testing is needed. However, when compiling for Qt5 or Qt4,
I tried to make sure that the functionality is preserved.
2021-03-15 17:09:09 +01:00
Juergen Spitzmueller
d5263f857e Amend [1bf53d47a5b8/lyxgit] 2021-03-14 16:48:04 +01:00
Juergen Spitzmueller
1bf53d47a5 Use customizable zoom context menu
Based on a proposal by Daniel (#12187)
2021-03-14 16:41:44 +01:00
Juergen Spitzmueller
d29d2f48fd Toom value: back to QLabel, this time with custom context menu 2021-03-14 12:04:12 +01:00
Juergen Spitzmueller
663f198001 Properly set minimum width with QToolButton 2021-03-14 09:42:28 +01:00
Juergen Spitzmueller
ac1b3f0ba2 Fix indentation 2021-03-13 12:17:31 +01:00
Juergen Spitzmueller
b272e4bfb0 Fix ct in table cell pasting 2021-03-12 17:44:33 +01:00
Juergen Spitzmueller
ae892bff98 Fix copy of multi-cells in table (#12196) 2021-03-12 17:44:33 +01:00
Jean-Marc Lasgouttes
ac8948b8e0 Fixup 86bfa10a: add checks before updating bookmarks
When doing cut and paste, it can happen that inset_owner_ is null, or
that the inset is not related to a buffer.
2021-03-12 17:42:02 +01:00
Yuriy Skalko
4ec5d33551 Set correct Windows console code page since all LyX output is in UTF-8 2021-03-12 18:15:33 +02:00
Juergen Spitzmueller
71268e859d Set zoom value after menu
Fixes initial size with styles that show a menu indicator
2021-03-12 16:30:50 +01:00
Juergen Spitzmueller
9f92fc92bd Yet another deprecation fix (this is the last one I am aware of) 2021-03-12 12:14:42 +01:00
Juergen Spitzmueller
934c6480c0 Add forgotten parent 2021-03-12 10:54:46 +01:00
Juergen Spitzmueller
10f4f2113a Fix deprecation warning (from|toTime_t) 2021-03-12 10:32:03 +01:00
Juergen Spitzmueller
26459a2cf5 Address another deprecation warning.
One left to go.
2021-03-12 10:10:33 +01:00
Juergen Spitzmueller
1a35afbe8f Fix deprecation warning 2021-03-11 19:06:03 +01:00
Juergen Spitzmueller
8a605ca8ad Add option to toggle zoom slider to zoom statusbar menu 2021-03-11 18:41:52 +01:00
Daniel Ramoeller
2710ec0840 Option to hide the zoom slider
Fix for bug #12187.
2021-03-11 18:41:52 +01:00
Juergen Spitzmueller
f525bded59 Add menu to statusbar zoom value 2021-03-11 18:14:46 +01:00
Juergen Spitzmueller
7a000652c0 Do not scale statusbar icons
This leads to stretched icons.
2021-03-11 17:24:19 +01:00
Juergen Spitzmueller
a49abd7383 Remove zoom slider ticks
This doesn't align well
2021-03-11 17:24:19 +01:00
Jean-Marc Lasgouttes
447a1056b4 Fix bookmarks-goto inside insets.
A stupid oversight, as far as I can see.
2021-03-11 16:16:11 +01:00
Jean-Marc Lasgouttes
86bfa10abb Adjust bookmark position when inserting/deleting from paragraph
Without this, bookmarks positions drift when editing.
2021-03-11 16:00:32 +01:00
Jean-Marc Lasgouttes
b87a81c394 Fixup fbf22bb3: really avoid screen-jumping with mouse click.
It turns out that the commit from gadmm's lyx-unstable has been
cherry-picked at the wrong place! However I believe that both changes
are necessary.

With this second patch, I do see that some screen jumping is avoided.

Fixes bug #7457.
2021-03-10 10:43:45 +01:00
Jean-Marc Lasgouttes
776807a536 Constification 2021-03-10 10:43:45 +01:00
Jean-Marc Lasgouttes
9a2b8c87cd Code reformatting. 2021-03-10 10:43:45 +01:00
Jean-Marc Lasgouttes
87e59caebe Constify some Paragraph::Private methods 2021-03-09 16:46:05 +01:00
Jean-Marc Lasgouttes
5d8f3a9307 Fix debug output of FunCode
Outputing the FuncCode enum to a stream using the << operator does not
work well. Actually I am not sure whether the << operator in LyXAction
is supposed to work (don't we need an enum class for that?).
2021-03-09 16:26:44 +01:00
Juergen Spitzmueller
dee329a21f Revert "Attempt to align slider and buttons in a widget"
This reverts commit ad44f4f448.
2021-03-09 14:50:23 +01:00
Juergen Spitzmueller
ad44f4f448 Attempt to align slider and buttons in a widget 2021-03-09 14:23:13 +01:00
Juergen Spitzmueller
f07a588b25 Fix cut and paste error 2021-03-09 13:03:33 +01:00
Pavel Sanda
f298072012 Revert 7e5c42593e.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg215733.html

Main issue is git log does not return >0 when file does not exists.
Other possible issues to check - cvs might want to connect to server
with cvs log. In large git archives reaching the proper record might take
longer time than ls-files.
2021-03-09 12:46:23 +01:00
Juergen Spitzmueller
f2e33b8c3e Use real minus char 2021-03-09 10:10:48 +01:00
Juergen Spitzmueller
ebb7ee7d5f Add +/- buttons to zoom slider 2021-03-09 08:42:27 +01:00
Daniel Ramoeller
3c43a01ba2 Smaller zoom slider on macOS
Fix for #12189.
2021-03-09 07:34:33 +01:00
Stephan Witt
6273c1f66d Amend change 07122f066b - correct string access. 2021-03-08 21:26:58 +01:00
Eugene Chornyi
167dfbc92c Fix bug 11998
If started from console, the console is the parent process, which can be attached. If started not from console, parent process does not exist and the block is skipped.
2021-03-08 19:35:18 +01:00
Juergen Spitzmueller
b9fb2a236e Keep zoom label width constant (#12186) 2021-03-08 07:33:37 +01:00
Juergen Spitzmueller
cf75003119 Disable zoom slider when there is no buffer open (#12185) 2021-03-07 19:15:57 +01:00
Juergen Spitzmueller
0a3f856bc1 Update zoom display after zoom has been set 2021-03-07 18:35:40 +01:00
Juergen Spitzmueller
c8feef2e23 Add way to remove items from document dictionary 2021-03-07 18:23:07 +01:00
Stephan Witt
07122f066b Refactoring: move check for match in spellignore() to buffer params. 2021-03-07 17:46:01 +01:00
Juergen Spitzmueller
430327152a Fix per-document dictionary with Mac 2021-03-07 17:25:31 +01:00
Juergen Spitzmueller
be6dc7dd5d Show zoom value in statusbar 2021-03-07 17:21:52 +01:00
Juergen Spitzmueller
bc300585f7 Properly set initial zoom value
This depends on settings
2021-03-07 17:09:03 +01:00
Juergen Spitzmueller
128346d03d Fix zoom slider with mouse wheel 2021-03-07 15:18:28 +01:00
Juergen Spitzmueller
9aad98836d Fix for Qt < 5.11 2021-03-07 14:33:13 +01:00
Juergen Spitzmueller
b07084df2d Add ticks to zoom slider 2021-03-07 14:29:55 +01:00
Jean-Marc Lasgouttes
610ea7f4f5 Fix display of emphasize in slanted text
Fixes bug #12175.
2021-03-07 13:32:34 +01:00
Juergen Spitzmueller
bdb006543b Zoom slider 2021-03-07 13:29:23 +01:00
Stephan Witt
2cf86771ed Amend 07396ab244 - fix compilation error for Apple spell checker. 2021-03-07 10:46:31 +01:00
Stephan Witt
3f75fb7a48 Amend 07396ab244 - fix white space. 2021-03-07 10:46:00 +01:00
Juergen Spitzmueller
a0a7ba7cce Update tex2lyx tests 2021-03-07 08:24:01 +01:00
Juergen Spitzmueller
0b42f77551 \\spellchecker_ignore: use LyX language name rather than langcode 2021-03-07 08:21:23 +01:00
Enrico Forestieri
7545698380 Fix bug #12181
The context menu for InsetMathRef is now usable.
InsetMathRef still misses support for RefStyle and thus the
corresponding entries are omitted from the menu. But this would
be a different bug.
2021-03-06 23:36:58 +01:00
Daniel Ramoeller
5d269df606 Do not toggle on (all) layouts in force plain
Fix for #12179.
2021-03-06 20:25:52 +01:00
Jean-Marc Lasgouttes
4210f4c9cc Compilation fix 2021-03-06 19:58:18 +01:00
Juergen Spitzmueller
31dc0acbb8 Layout fix 2021-03-06 17:45:06 +01:00
Juergen Spitzmueller
07396ab244 Meet per-document spelling dictionaries (fixes #86 [sic!])
Now who can beat that? ;-)
2021-03-06 16:53:33 +01:00
Juergen Spitzmueller
92c6c3b950 fix indendation 2021-03-06 16:15:10 +01:00
Enrico Forestieri
5a43b86141 Allow context menus in mathed
It is now possible to get a context menu for math insets.
InsetMathSpace was already providing a specific context menu,
but it was never triggered because the math hull inset is not
descendable. It is still so, but now when a context menu is
requested all the insets inside the math hull are examined.
If the inset under the cursor provides a context menu, it
is shown instead of the general math one.

Fixes #12100.
2021-03-05 21:21:41 +01:00
Juergen Spitzmueller
f1f475e1d3 Add LFUN_FONT_NO_SPELLCHECK 2021-03-05 18:23:38 +01:00
Jean-Marc Lasgouttes
4828dfb441 Indicate that we do not use a return value
Please Coverity.
2021-03-05 13:12:58 +01:00
Jean-Marc Lasgouttes
f5340fd6d9 Fix missing initialization
Spotted by Coverity.
2021-03-05 13:06:10 +01:00
Jean-Marc Lasgouttes
e6a7da3b22 Fix warning when not using Qt regexps 2021-03-05 11:54:11 +01:00
Juergen Spitzmueller
23fc1b270d Remove redundant call (amend 2b7fae04f3) 2021-03-05 07:54:17 +01:00
Juergen Spitzmueller
2b7fae04f3 Fix limiting of absurdly large input to thesaurus (#10528) 2021-03-05 07:51:49 +01:00
Juergen Spitzmueller
64095a0af2 Fix wrap with Spellchecker after ignore (#10383) 2021-03-04 18:02:04 +01:00
Juergen Spitzmueller
a57cdd0d30 Remove confusing and unusual "Find Next" button from spellchecker dialog (#8931) 2021-03-04 16:54:01 +01:00