Commit Graph

9416 Commits

Author SHA1 Message Date
Yuriy Skalko
99b1488f0e Cleanup included headers 2020-11-30 13:04:54 +02:00
Kornel Benko
a171c651a6 Revert "Amend 3093789e for cmake build"
This reverts commit b3d43404f4.
2020-11-30 10:19:22 +01:00
Yuriy Skalko
89d05890bf Simplify KeyModifier 2020-11-30 10:44:28 +02:00
Yuriy Skalko
7779316e6c Include standard <regex> 2020-11-29 15:27:28 +02:00
Kornel Benko
b3d43404f4 Amend 3093789e for cmake build 2020-11-29 10:04:54 +01:00
Yuriy Skalko
9b0cd3c970 Fix buffer over-read on last Unicode code points 2020-11-29 00:25:24 +02:00
Yuriy Skalko
813eb0f9f7 Cleanup included headers 2020-11-29 00:25:14 +02:00
Jean-Marc Lasgouttes
3093789e8d remove most traces of boost::regex
1/ remove boost regex code from 3rdparty/boost. Only the cmake stuff remains.

2/ remove traces of BOOST_LIB since there is no need anymore to
   compile boost stuff.

3/ remove traces of boost regexp in config/lyxinclude.m4 and INSTALL

4/ require gcc 4.9 as minimal version in autoconf.

Unfortunately, the net gain is only 10% of included boost size (now 21M).
2020-11-28 19:59:17 +01:00
Yuriy Skalko
f3ec89cfa1 Always use std::regex
Since now minimum supported GCC is 4.9.
2020-11-27 12:39:59 +02:00
Yuriy Skalko
6a21ec854b Move several common types to support/types.h 2020-11-27 12:16:22 +02:00
Jean-Marc Lasgouttes
4b15d64f51 Remove deprecated enum value with Qt5 2020-11-27 10:23:49 +01:00
Jean-Marc Lasgouttes
c68be9a9be Improve some debug messages
The current code did not give much information.

I am not sure why the <<FontInfo operator is not defined in
FontInfo.h, but I figured that it was not necessary to understand that
now.
2020-11-26 11:09:17 +01:00
Yuriy Skalko
0a8d3c9887 Fix loop variable, amend d8e8a93a58 2020-11-25 23:16:51 +02:00
Yuriy Skalko
b3be47765b Fix memory leak 2020-11-25 02:43:26 +02:00
Yuriy Skalko
43b16548b4 Cleanup headers 2020-11-25 02:43:16 +02:00
Jean-Marc Lasgouttes
8673c5ac28 Forgot this. 2020-11-24 21:20:25 +01:00
Jean-Marc Lasgouttes
1b3ffa6627 Rewrite (again!) the code for caret drawing
The caret geometry is now computed in BufferView as a list of shapes
(caret, horizontal l-shape if needed, completion triangle if needed)
kept in a variable of type CaretGeometry.

The code in WorkArea.cpp only has to draw these shapes. The
CaretWidget (which never was a widget) in GuiWorkArea.cpp is gone
now.

As a consequence, the bounding box for the cursor is known precisely
and therefore rows should be repainted correctly now. This avoids
caret droppings.

Fixes bug #12024.
2020-11-24 20:12:42 +01:00
Jean-Marc Lasgouttes
ba8ca0e384 Correct caret position from the start 2020-11-21 19:39:48 +01:00
Yuriy Skalko
cbad214cdd Refactor checksum calculation 2020-11-21 20:32:43 +02:00
Yuriy Skalko
0b1e0b8610 Remove unused headers 2020-11-21 20:32:30 +02:00
Yuriy Skalko
7ca2f2b58d Use range-based loops 2020-11-21 20:32:16 +02:00
Pavel Sanda
4eb791ff18 Erase white frame in fullscreen mode.
Since Qt 5.9.4 one can't set negative margins unless explicitely
allowed by a new flag. This brought back the white frame in
fullscreen mode.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg214002.html
2020-11-21 16:02:54 +01:00
Yuriy Skalko
2941bc0198 Add more override specifiers 2020-11-21 00:32:40 +02:00
Kornel Benko
5474c3fb4b Missing '{' 2020-11-20 16:32:51 +01:00
Jean-Marc Lasgouttes
d8e8a93a58 Use range-based loops in GuiView 2020-11-20 15:14:21 +01:00
Sam Crawley
f457a32a13 Fix issue in running compare from the command line
Because Compare uses threads, we need to make sure it is finished when a
compare is executed from the command line. This was a problem for command
sequences, because the next command would start running before the compare
was done, and the buffer with differences was available.

So this commit adds the "run-blocking" parameter when using
LFUN_DIALOG_SHOW to run a Compare. When calling Compare with run-sync, the
LFUN will wait for the compare worker thread to finish before returning and
possibly running the next command.
2020-11-15 10:35:28 +01:00
Jean-Marc Lasgouttes
222a317dd2 Store correctly the window position with Wayland
To do this, hard-coded test for xcb had to be replaced with a call to
platformName(). Since this method does not exist in Qt4, we emulate
it.

Note that Qt5 uses xcb bindings for X11 system, while Qt4 relies on
older X11 bindings. We return platorm == "qt4x11" in this case.

Fixes bug #11746.
2020-11-14 17:55:59 +01:00
Richard Kimberly Heck
cfd19d86be whitespace and style 2020-11-02 11:45:09 -05:00
Yuriy Skalko
d38eddb397 Match header/source function argument naming 2020-11-01 22:23:44 +02:00
Yuriy Skalko
5061db891c Use const references 2020-11-01 22:23:26 +02:00
Yuriy Skalko
dbe35af542 Simplify with std::map::insert 2020-11-01 22:22:27 +02:00
Richard Kimberly Heck
ca3077b40b Change the logic of the indentation setting.
The option here is to NOT indent the paragraph, so make that clear.
As it was, we would set "Indent" to false in the case of paragraphs
that do not permit indentation and then write that, uselessly, to the
LyX file if we wrote any other option (and then keep writing it, even
if other options were removed). Now, we will write it only if it's been
explicitly set.
2020-10-30 13:34:36 -04:00
Richard Kimberly Heck
cc1d3b78c9 Const 2020-10-29 18:25:33 -04:00
Yuriy Skalko
f1926251c0 Move Windows-specific stuff into os_win32.h 2020-10-25 19:59:03 +02:00
Yuriy Skalko
10272e4747 Move include of own header to the top. Fix dependencies 2020-10-25 19:58:57 +02:00
Yuriy Skalko
4ece87c324 Fix obsoleted Qt values
All new values exist in Qt 4.8.7.
2020-10-25 09:28:46 +02:00
Yuriy Skalko
a7018252b7 Constify 2020-10-25 09:28:34 +02:00
Jean-Marc Lasgouttes
21422dd652 Replace QFontMetrics::width() by horizontalAdvance() in Qt>=5.11
The method horizontalAdvance() replaces width() starting with Qt 5.11.
To handle this, all direct calls to QFontMetrics::width() are replaced
by calls to GuiFontMetrics::width(), and the code for
GuiFontMetrics::width(QChar) uses horizontalAdvance on newer Qt
versions.
2020-10-24 19:52:18 +02:00
Pavel Sanda
8af747c9d9 Revert da8b5de97 because of MSVC 2017.
In GCC `min` is defined via including <vector>.
2020-10-24 12:06:54 +02:00
Yuriy Skalko
c928714b0b Unify naming of menu items 2020-10-23 10:23:01 +03:00
Yuriy Skalko
af29f02dd8 Reduce includes in header files (2) 2020-10-19 18:01:17 +03:00
Yuriy Skalko
d25c10ed81 Remove duplicate and unused header includes in .cpp files 2020-10-19 18:01:11 +03:00
Yuriy Skalko
65c88f0a0a Remove redundant const & for primitive types 2020-10-19 12:50:07 +03:00
Yuriy Skalko
ce0e192689 Move Cursor.h from TocWidget.h 2020-10-16 08:02:51 +03:00
Yuriy Skalko
fbefdb10a5 Move Cursor.h from Clipboard.h 2020-10-16 08:02:51 +03:00
Pavel Sanda
2b02b73f4a Move <QTimer> from TocWidget.h 2020-10-14 14:48:41 +02:00
Pavel Sanda
bd33601512 Move <QTimer> from GuiViewSource.h 2020-10-14 14:37:38 +02:00
Pavel Sanda
85eec10e4b Move <QKeyEvent> from DockView.h 2020-10-14 14:35:29 +02:00
Pavel Sanda
61824e057e Move GuiView.h from DockView.h 2020-10-14 14:28:47 +02:00
Pavel Sanda
57703d51c6 <QCloseEvent> DialogView.h -> DialogView.cpp 2020-10-14 13:57:30 +02:00
Pavel Sanda
f1b147cc97 include "GuiView.h": DialogView.h -> DialogView.cpp 2020-10-14 13:53:40 +02:00
Pavel Sanda
da8b5de973 Move <algorithm> from DocIterator.h 2020-10-14 13:01:30 +02:00
Jean-Marc Lasgouttes
310c94c48c Fix display of caret completion indicator
The zooming algorithm based on caret width was deeply flawed. It is
not replaced with a formula based on caret height.

Fixes bug #12000.
2020-10-13 17:09:33 +02:00
Yuriy Skalko
2a594d3e90 Remove unused forward declarations 2020-10-13 09:57:36 +03:00
Thibaut Cuvelier
92b9c82dea Fix compilation on Visual C++.
Without this patch, there would be errors like these (warnings turned into errors):

D:\LyX\lyx-unstable\src\frontends\qt\GuiView.cpp(2413): error C4101: 'e': unreferenced local variable
D:\LyX\lyx-unstable\src\frontends\qt\GuiView.cpp(4879): error C4101: 'ex': unreferenced local variable
2020-10-12 19:21:58 +02:00
Yuriy Skalko
238fd9ac50 Right exception rethrowing 2020-10-12 15:14:55 +02:00
Yuriy Skalko
919a06718a Constify 2020-10-12 15:06:16 +02:00
Richard Kimberly Heck
2dc4277452 Const 2020-10-10 17:12:50 -04:00
Yuriy Skalko
7d38a4d126 Loop refactoring 2020-10-09 09:04:20 +03:00
Pavel Sanda
ffbcac3dde Add few examples for lineno options.
It's actually pretty hard to get that from the manual.
2020-10-06 15:05:11 +02:00
Jean-Marc Lasgouttes
c46f3b8f31 remove unused variable 2020-10-05 15:11:51 +02:00
Yuriy Skalko
c5ae08f0b8 Amend efc0877f
Add the last `override`s.
2020-10-05 15:03:13 +02:00
Yuriy Skalko
fe85162a29 Refactoring 2020-10-05 14:55:00 +02:00
Yuriy Skalko
d82adc625b Amend efc0877f
Add more `override` specifiers. Replace `throw()` to `noexcept`.
2020-10-05 09:37:15 +02:00
Yuriy Skalko
14b0da28c2 Amend efc0877f 2020-10-03 21:17:17 +02:00
Yuriy Skalko
715b8cda54 Refactoring based on cppcheck suggestions 2020-10-03 13:39:51 +02:00
Yuriy Skalko
efc0877f8f Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
Jean-Marc Lasgouttes
7f1b1729b4 Cleanup the caret geometry code
Intended changes:

* code is shorter and cleaner

* caret scales better with zoom when cursor_width=0: completion
  indicator, l-shaped cursor...

Details:

* Rename BufferView::getPosAndHeight to getPosAndDim because ascent is
  needed too and width could in the future be set depending on font.

* Get rid of rect_ in CaretWidget and record a Dimension (and y value) instead.
  Remove also caret_width_ and slant_, replace rtl_ with dir.

* Make CaretWidget members public and lose the trailing _.

* change CaretWidget::update to read its parameters from current bufferview.
2020-10-01 13:17:01 +02:00
Pavel Sanda
ad475adfd3 amend 6d6fc761be 2020-09-28 16:44:12 +02:00
Pavel Sanda
6d6fc761be Qt4 compilable again 2020-09-28 16:34:42 +02:00
Yuriy Skalko
e47092044b Use real italic slope for slanted caret 2020-09-28 14:30:05 +02:00
Jean-Marc Lasgouttes
967f4d661e Remove default parameter of UndoGroupHelper constructor
This can lead to mistakes. If no buffer is required at the beginning,
it is better to pass 'nullptr' explicitly.

Fix a case of missing parameter in GuiCompleter (introduced at
f3656600). This avoids some spurious "There is no group open (creating
one)" messages.
2020-09-23 17:33:17 +02:00
Daniel Ramoeller
9a1f732664 Show slanted caret (cursor) when text style emphasis/italics/slanted.
Fixes for bug #11428. Emphasis is used regularly and it is helpful to
see whether the next text will be written emphasized directly from the
cursor.

This is also implemented in MS Word and Google docs but not in
LibreWriter.

Also fixes the caret for RTL languages whose width was previously
extended into the wrong direction.
2020-09-18 13:27:06 +02:00
Jean-Marc Lasgouttes
b96b876403 Revert "Show toolbar context menu only when clicking on the toolbar"
Something is wrong.

This reverts commit f25253f89a.
2020-09-16 16:54:33 +02:00
Daniel Ramoeller
f25253f89a Show toolbar context menu only when clicking on the toolbar
Previsouly it was on the whole application window, except on disabled toolbar
buttons.

Fix for bug #11949
2020-09-16 11:18:57 +02:00
Jean-Marc Lasgouttes
ae37caacdd Add method FontMetrics::italic()
This can be useful for ticket #11428.
2020-09-14 16:26:19 +02:00
Jean-Marc Lasgouttes
c1f8c6c26d Fixup 5202d44e: make caret geometry update lazy
Instead of working around crashes in update of caret geometry, only
request it as needed. The actual computation will take place just
before painting the caret.

It might be that this is overkill and that caret geometry should be
updated unconditionally. One would have to to some timing while idle to
ascertain that.

Fixes bug #11912.
2020-09-11 11:48:12 +02:00
Eugene Chornyi
46da0d9d4d Workaround Qtbug regarding the QAbstractScrollArea::mouseMoveEvent(...) (06969f9d) is only needed until Qt 5.15.1 as it was fixed there. 2020-09-10 20:40:48 +02:00
Enrico Forestieri
0762b52334 Try to use the right width for math symbols
The rules for typesetting math differ from the rules for typesetting
text. For example, two italic 'f' chars have to be typeset more closely
than two 'o' chars in text mode, but not in math mode. Qt provides a
method that returns the distance appropriate for drawing a subsequent
character in text mode, but nothing for math mode. Typically, the
distance appropriate for drawing the next character in math mode is
the actual width span by the character, corrected by the rules of
an appendix in the TeXbook. Recently, those rules are followed more
closely in LyX but not exactly, and we have to find a way to adapt to them.
Some symbols may need more spacing around them than the width they span.
So, we use the distance suggested by Qt, unless it is less than the
width of the rectangle bounding the symbol. Before Qt 5.11 the used method
was QFontMetrics::width(), but since then it has been declared obsolete
in favor of QFontMetrics::horizontalAdvance(), whose name conveys better
its meaning.
2020-09-08 22:30:02 +02:00
Jean-Marc Lasgouttes
b744c3e28a Revert "Fixup 5202d44e: make caret geometry update lazy"
Something is wrong with the cursor.

This reverts commit dc35f1ddf4.
2020-09-07 16:02:50 +02:00
Jean-Marc Lasgouttes
dc35f1ddf4 Fixup 5202d44e: make caret geometry update lazy
Instead of working around crashes in update of caret geometry, only
request it as needed. The actual computaiton will take place just
before painting the caret.

It might be that this is overkill and that caret geometry should be
updated unconditionally. One would have to to some timing while idle to
ascertain that.

Fixes bug #11912.
2020-09-07 15:52:43 +02:00
Enrico Forestieri
062d94c5da Fix on-screen display of special math fonts
Make sure that the on-screen representation of the special math fonts
mathbb, mathds, mathfrak, mathcal, and mathscr matches the latex output.
2020-09-06 18:16:04 +02:00
Juergen Spitzmueller
61739e5aef Add some hspacers 2020-09-05 08:23:56 +02:00
Enrico Forestieri
a9afdbb73c Personalize fonts
When the fonts distributed with texlive with same family name
as ours are also managed by fontconfig, Qt is not able to
discriminate ours by the style only. In order to be sure Qt
will load our fonts, we change the foundry name from 'PfEd'
to 'LyEd' and augment the font family name with this foundry
name. This only works on *nix, because adding a foundry name
seemingly breaks things on Windows. However, this is a *nix
only problem, seemingly.
2020-09-03 17:46:30 +02:00
Juergen Spitzmueller
5c83c5c410 Foward-port tooltip addition from stable (3a7560dcb0) 2020-09-03 08:55:46 +02:00
Richard Kimberly Heck
5606e934ac Accelerators 2020-09-02 10:22:26 -04:00
Enrico Forestieri
8039b34802 Adjust debug output for fonts
This restores the debug output as it was intended before the
introduction of the LYXERR macro that was unconditionally outputing
an end of line. This is how this output was appearing until lyx 1.5:

Looking for font family cmr10 ... got: cmr10
 got it normal!

instead of as it was since lyx 1.6 and until now:

Looking for font family cmr10 ...
got: cmr10
 got it
normal!
2020-09-01 12:12:55 +02:00
Richard Kimberly Heck
1ba785f2c6 Localization 2020-09-01 01:41:10 -04:00
Richard Kimberly Heck
3c25899eab Improved fix for edit button 2020-08-31 11:20:49 -04:00
Richard Kimberly Heck
cf7e32ee8f Fix problem with edit button.
The previous implementation relied upon the cursor being immediately
in front of the inset. A bad idea.
2020-08-31 10:50:59 -04:00
Richard Kimberly Heck
a385b7dc2b Fix bug 4475.
Add ability to create child from the include dialog.
2020-08-31 10:20:52 -04:00
Stephan Witt
292799a4bd #11756 cleanup the view menu on Mac
Using US english desktop language LyX's Mac OS adds some items to the view menu:
1. Show/Hide Tab Bar and
2. Enter Full Screen
These items won't work properly and it's better to hide them.
2020-08-30 15:35:02 +02:00
Stephan Witt
1c5a2fc0ec #11756 hide additional menu items in edit menu on Mac
Mac OS adds two extra menu entries to the edit menu.
These menu items are:
1. Start Dictation...
2. Emoji & Symbols
Both menu items don't work with LyX.
Therefore they shouldn't be present and the new code hides them.
2020-08-30 11:24:59 +02:00
Enrico Forestieri
80f94a9398 Use correct width for \fint
Both QTextLine::naturalTextWidth() and QTextLine::horizontalAdvance()
return the same value for \fint. However, examining esint10.ttf with
fontforge does not reveal any issue with the metrics. The fact that
\fint seems to be the only affected symbol might be due to its code
point, which corresponds to a space, so that maybe Qt makes some
assumptions on the metrics.

As QTextLine::naturalTextWidth() returns the width of the line that is
occupied by text, in the case of a single symbol we can obtain the
same value by using the width of the rectangle bounding the symbol.
2020-08-29 20:10:26 +02:00
Juergen Spitzmueller
6f476b960e Localize format prettyName in some more places (#11954) 2020-08-29 11:50:43 +02:00
Yuriy Skalko
3bd358a2f6 Prevent permanent disabling of comboboxes in Vertical/Horizontal space dialogs 2020-08-28 07:07:44 +02:00
Juergen Spitzmueller
4fdcf0e929 address deprecation warning 2020-08-27 14:43:23 +02:00
Pavel Sanda
28dd0e1f21 Fix Qt4 compilation. 2020-08-27 14:05:22 +02:00
Juergen Spitzmueller
bc76026da5 Disable citationSearchLE with citationSearchCB 2020-08-27 12:53:41 +02:00
Juergen Spitzmueller
d44929ff81 Properly report back if showDirectory() doesn't succeed 2020-08-27 11:58:37 +02:00
Juergen Spitzmueller
ff14d0bd00 Report back if citation target could not be opened 2020-08-27 11:52:52 +02:00
Juergen Spitzmueller
8365eabd6f Make paper search function accessible and customizable 2020-08-27 08:48:55 +02:00
Juergen Spitzmueller
d436a51024 About: Fix cutting of icon (#11946) 2020-08-26 10:01:53 +02:00
Jean-Marc Lasgouttes
ee3a711316 Forgotten break in switch found by coverity scan. 2020-08-24 17:21:04 +02:00
Pavel Sanda
44ede7ef4b Do not hardcode launching of lyxpaperview script. 2020-08-24 15:11:53 +02:00
Yuriy Skalko
c160e21c48 Split some UI strings for translations 2020-08-24 07:23:40 +02:00
Scott Kostyshak
4c0073cd03 Whitespace 2020-08-20 21:51:29 -04:00
Juergen Spitzmueller
c71551fd9d GuiAbout: some more polishment 2020-08-20 16:08:10 +02:00
Juergen Spitzmueller
1f92214d78 GuiAbout: use unformatted version info via Copy button 2020-08-20 15:50:31 +02:00
Pavel Sanda
e648202e7e Allow LyX to find pdfs and urls of citation references and follow them from context menu.
Currently tested:
- url & doi fields for bibtex.
- all documented eprinttypes of biblatex
- absolute paths of first entry of 'file' field for jabref and kbibtex
- external script searching for author + year pdf

Additional polishing will follow.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg212505.html
2020-08-20 09:12:54 +02:00
Yuriy Skalko
679c418b03 Fix UI string 2020-08-19 10:15:45 +02:00
Juergen Spitzmueller
d9f1f7e348 Remove now redundant string 2020-08-16 11:31:56 +02:00
Juergen Spitzmueller
5490e7545b Polish About dialog
(this might need adaptation with HiDPI)
2020-08-15 16:07:12 +02:00
Juergen Spitzmueller
cba24bb642 Fix deprecation warning 2020-08-15 16:06:56 +02:00
Juergen Spitzmueller
6fd566fbec Flag placeholder string nontranslatable
This is just wasted efforts for the translators, as this string never
appears in the GUI.
2020-08-15 13:18:19 +02:00
Yuriy Skalko
1cf86348dd Enable search in "LaTeX Log" dialog by pressing Enter 2020-08-15 07:52:55 +02:00
Yuriy Skalko
4c3139314b Correct Right Arrow key processing in Modules list 2020-08-14 10:12:13 +02:00
Yuriy Skalko
e1dd91e10e Disable editing of math package names in Document Settings 2020-08-14 10:05:11 +02:00
Daniel Ramoeller
c9bf179016 #10346 Amend change 01b2893f8b switch directory buttons 2020-08-13 21:43:23 +02:00
Stephan Witt
63fcb7b8e1 #10346 Amend change 01b2893f8b to make Qt4 compilable - again 2020-08-13 10:26:44 +02:00
Stephan Witt
4ddff8fe28 #10346 Amend change 01b2893f8b to make Qt4 compilable 2020-08-13 08:12:56 +02:00
Daniel Ramoeller
01b2893f8b Fix bug #10346.
Allow to open user and library directories from About LyX.
2020-08-12 14:25:36 -04:00
Juergen Spitzmueller
075d220d6e GuiLyXFiles: Fix crash and disabling with header selection
Fixes #11929
2020-08-11 19:26:23 +02:00
Juergen Spitzmueller
b57166f656 Nothing to translate here. 2020-08-10 10:03:42 +02:00
Richard Kimberly Heck
c9bb699457 Fix #10328.
Change title of LyX's windows to conform to the usual pattern.
2020-08-09 13:00:41 -04:00
Daniel Ramoeller
d3a04c089b Fix for bug #11926
Change comobox signal to user interaction only to avoid problems with "Apply changes immediately" aka "Immediate Apply". (See https://doc.qt.io/qt-5/qcombobox.html#currentIndexChanged and https://doc.qt.io/qt-5/qcombobox.html#activated.)
2020-08-09 12:51:45 +02:00
Yuriy Skalko
af7ffc7dfa Correct UI strings 2020-08-08 16:12:50 +02:00
Stephan Witt
d0ca7a383d Amend commit 3af8ff39fc - make it work with Qt 4.x - don't activate it there 2020-08-07 12:27:27 +02:00
Stephan Witt
3af8ff39fc Force a uniform style for group boxes, on Mac non-flat works better, on Linux flat is standard 2020-08-07 10:54:12 +02:00
Stephan Witt
0fa4b7e736 #9376 prepare use of Length in lyxrc - move the class Length to support 2020-08-07 09:24:31 +02:00
Enrico Forestieri
582296d79a Correctly compute metrics for single-char non-math fonts
As evidenced by the comment, this corrects a thinko.
2020-08-06 15:34:54 +02:00
Stephan Witt
6dcd4ca4f1 #10571 improved handling of WM's signal when switching from or to full-screen window 2020-08-04 15:24:09 +02:00
Juergen Spitzmueller
8415041b1f Use hexnames only for x11 colors
This prevents wrong color allocation with ambiguous names.

Fixes #11828

Patch by D. Ramöller with extensions by me.
2020-08-03 14:10:46 +02:00
Thibaut Cuvelier
d75ff9931d Revert "Support the mathbbm font."
This reverts commit e709a6626e.
2020-07-28 18:01:38 +02:00
Thibaut Cuvelier
e709a6626e Support the mathbbm font.
Should just be able to read formulae, not add it from the GUI, as it's mostly redundant with mathds and mathbb.
2020-07-27 03:15:00 +02:00
Enrico Forestieri
0b3e69167c Fix placement of limits with integral signs
Since be836909c5 the positioning of super- and subscripts
for symbol fonts has been broken because the metrics of the
font of the environment (rather than those of the symbol itself)
were used.
2020-07-24 12:32:24 +02:00
Thibaut Cuvelier
e302757476 Add support for CALS tables in DocBook. 2020-07-16 00:40:16 +02:00
Juergen Spitzmueller
097383f657 Fix comment 2020-07-14 15:52:20 +02:00
Juergen Spitzmueller
b8969d2e9c Reset CategorizedCombo filter when switching between non-TeX and TeX fonts 2020-07-14 15:49:15 +02:00
Jean-Marc Lasgouttes
32f06d01ec Revert "Improve handling of top and bottom margin"
It turns out this is not ready at all.

This reverts commit ff7cdf1b74.
2020-07-13 00:00:36 +02:00
Jean-Marc Lasgouttes
ff7cdf1b74 Improve handling of top and bottom margin
The 20px space on top and bottom of document have traditionally been
obtained by adding the to the ascent/descent of the first/last row.
This reads to annoyances like selections that are drawn in these
margins and issues with the nesting marker.

The change is to add the values to a separate member of the Row
object, and to add new Row::total(Ascent|Descent) methods that add the
effect of this padding.

Moreover, some methods are added to TextMetrics to simplify the
BufferView code.

Fixes bug #9545.
2020-07-12 20:32:04 +02:00
Jean-Marc Lasgouttes
77036f5434 Fix and simplify computation of painter monochrome mode
The old code in GuiPainter::filterColor did not work. Tricks with
colors should take place in HSV space, not RGB IMO.

Replace the code with a simpler one which maps the grayscale value
of the original color on the blend color. It works nin the case where
original color is red, but might not work as well when blend color is
not black. Time will tell.

Fixes bug #11904.
2020-07-12 00:01:46 +02:00
Jean-Marc Lasgouttes
2a80b0ac01 Set desktop name for Wayland
Fixes bug 11847.
2020-07-11 20:40:30 +02:00
Jean-Marc Lasgouttes
aaec8459bf Cleanup: remove trailing underscores
These ToobarItem members are public, not private.
2020-07-09 16:27:00 +02:00
Eugene Chornyi
06969f9dd4 Workaround Qtbug where QAbstractScrollArea::mouseMoveEvent(...) is called falsely when quickly double tapping on a touchpad of a notebook running Windows 2020-07-09 09:36:12 +02:00
Thibaut Cuvelier
25bb51c865 Remove DOCBOOK enum values, no more used. 2020-07-08 13:15:05 +02:00
Thibaut Cuvelier
fd6e14414f Remove GuiRef::nameAllowed, as the DocBook support no more uses it 2020-07-08 09:55:59 +02:00
Thibaut Cuvelier
3a24550765 Remove GuiRef::typeAllowed, as it is now always allowed. 2020-07-08 09:41:45 +02:00
Pavel Sanda
28968b1f0d Add required elements in the layouts to support DocBook.
Slightly modified patch from Thibaut Cuvelier.
2020-07-07 09:49:48 +02:00
Juergen Spitzmueller
e121bd04bb Support halfline and fullline also in vspace. 2020-06-28 18:27:59 +02:00