Commit Graph

267 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
438fed6b62 Mac OS X is macOS these days 2024-10-23 14:14:04 +02:00
Jean-Marc Lasgouttes
23379bb1d5 Store spellchecker_esc_chars as a docstring
This is a minor optimization to avoid calling from_utf8() repeatedly
on a hot path.
2024-07-21 21:35:14 +02:00
Jean-Marc Lasgouttes
ed2e5554d8 missing quote in message 2024-07-12 19:04:18 +02:00
Jean-Marc Lasgouttes
c263463cad Move DrawStrategy enum to update_flags.h.
Introduce new drawStrategy() and drawStrategyDescription() methods to
frontend::Application.

Show the current draw strategy in About dialog.
2024-06-18 18:26:34 +02:00
Jean-Marc Lasgouttes
f48cf46101 Add "full" drawing strategy
With this patch, 3 draw strategies (set in prefs with
\draw_strategy partial|backingstore|full) are available:

- "partial": only draw the parts of text that have changed since last
  paint event (default for X11 and windows)

- "backingstore": the same, but drawing happens on an offspring
  pixmap; this breaks subpixel rendering (default for Wayland and
  macOS)

- "full": the screen is fully redrawn at each paint event and should
  therefore always be correct; this is presumably slower but
  introducing it will allow to test it.

This would deserve a proper UI eventually.
2024-06-11 15:17:22 +02:00
Jean-Marc Lasgouttes
2660df9b99 Move Lexer to support/ directory (and lyx::support namespace)
This requires quite a bit of trivial code shuffling.
2024-04-28 12:23:13 +02:00
Eugene Chornyi
d2132751a7 Implement ui style selection dialog 12832 attempt 2 2023-10-15 08:46:12 +02:00
Eugene Chornyi
a99a16ae58 Revert 072ba7bd and f1deb1c6 2023-10-11 23:22:17 +02:00
Eugene Chornyi
f1deb1c658 amend 072ba7bd 2023-10-11 22:03:29 +02:00
Eugene Chornyi
072ba7bd2e Implement ui style selection dialog 12832 2023-10-11 20:06:52 +02:00
Pavel Sanda
39fddce26e comment typo & one line 2023-02-21 11:29:40 +01:00
chillenb
22e5903bf3 adjust text display width in windowed mode 2022-10-27 17:49:43 +02:00
Jean-Marc Lasgouttes
c213eb7f75 Add lyxrc option to force the use of backing store
LyX relies on a a backing store to draw when running under macOS or
Wayland, because Qt arbitrarily overwrites parts of the workarea
before we paint (and we paint only the parts that need to be painted).
However it seems that this is also necessary on X11 when the WM theme
is translucid. Since there is no way that I know of to detect this
situation, this patch adds a LyXRC setting to manually select this
drawing strategy.

Note that using a backing store is not always a good solution, since
this disables subpixel aliasing.

At this point there is no UI for the variable.

Fixes bug #12119
2021-12-17 10:38:28 +01:00
Stephan Witt
436620a881 #12201 force open document in tabs on Mac when user preference is Always 2021-10-23 13:34:18 +02:00
Jean-Marc Lasgouttes
e33567cdcb Make fall through explixcit 2021-04-07 17:13:43 +02:00
Jean-Marc Lasgouttes
e96a656b4d Fixup 0f0ad1f7: cut and paste error 2021-04-07 16:23:29 +02:00
Jean-Marc Lasgouttes
0f0ad1f715 Make bookmarks display configurable
Introduce a GUI-less LyXRC member bookmarks_visibility. This is
experimental and will not be documented for 2.4.0. Having the code
present will allow to (1) improve it gradually and (2) fix the many
bookmarks bugs that it exposes.

The corresponding tag is \experimental:bookmarks_visibility, which is
intentionally weird.

Three possible values:

* none: no bookmark display
* margin: display the bookmark in margin
* inline: display the bookmark at cursor position.

The default margin has been made wider so that there is room for the
bookmark. This was necessary anyway. The margin bookmark is now
displayed correctly in full screen with limited text width.

Margin display still needs some improvements when several bookmarks
are on the same row.

Mostly fixes bug #2496.
2021-04-07 16:19:20 +02: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
Scott Kostyshak
eaebe404ae Fix a comparison of arrays to compare *contents*
The previous code was mistakenly comparing addresses of the arrays.
This issue was caught by a warning when compiling with Clang in
C++20 mode, since comparing array addresses in this way is
deprecated.

This commit should prevent some unnecessary dispatches of
LFUN_SCREEN_FONT_UPDATE.
2020-12-31 14:02:40 -05:00
Juergen Spitzmueller
704331fdcd Add dark theme colors to semantic colors (#8325) 2020-12-12 10:56:05 +01:00
Yuriy Skalko
196d9caeb0 Clean includes using the output of iwyu tool 2020-10-20 11:38:55 +03:00
Yuriy Skalko
cd933534bd Increment preferences format to 34: rename Cyrillic *.kmap files 2020-09-17 15:05:31 +02:00
Stephan Witt
45e8ea4acc #11756 Respect system preferences for tabbing on Mac 2020-09-04 23:28:27 +02:00
Juergen Spitzmueller
8365eabd6f Make paper search function accessible and customizable 2020-08-27 08:48:55 +02:00
Pavel Sanda
894ad70eba Enable Open Citation menu item iff citation contain locator information or external search script is available.
Per Juergen's request.
2020-08-23 22:19:34 +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
Richard Kimberly Heck
e1615f4107 Const-ness, and a missing Class declaration. I do not understand
why this ever worked.
2020-05-17 20:52:58 -04:00
Kornel Benko
478a303f4a Use c++11 to remove last char from a string
Thanks Scott.
2020-04-19 08:59:54 +02:00
Kornel Benko
333e023e82 Amend(4) 689f26d2: Add default path to server pipe (cmake build)
Rename the placeholde $$User to $$UserDir

Make it more readable. Suggestion from Stephan Witt.
2020-04-18 22:26:56 +02:00
Kornel Benko
237378477f Amend(3) 689f26d2: Add default path to server pipe (cmake build)
Omit duplicated separators if replacing string '$$User' with actual userdir
2020-04-18 16:32:24 +02:00
Kornel Benko
689f26d247 Add default path to server pipe (cmake build + unix)
Actually the change is affecting only builds if
1.) Using cmake build
2.) on unix

To use it on
  cygwin: one has to patch development/cygwin/lyxrc.dist.in
  MacOSX:     -//-         development/MacOSX/lyxrc.dist.in

We need also a Windows-version

Also the compilation with automake lacks the handling of development/unix/lyxrc.dist.in
2020-04-17 18:38:51 +02:00
Juergen Spitzmueller
5fc2662b13 Add pref to keep ct markup on copy/paste
Fixes #10278, #10128
2020-01-13 15:20:48 +01:00
Juergen Spitzmueller
39bff52797 Increase lyxrc format 2019-12-27 11:06:11 +01:00
Juergen Spitzmueller
8e62dcc20f Add pref option to disable underlining of added text (in workarea)
Addresses #10102
2019-12-27 10:35:52 +01:00
Juergen Spitzmueller
a08cbf41cf Provide way to add (optional) user initials
This makes it easier to hook the changes package into LyX's ct markup.
2019-12-24 14:31:08 +01:00
Juergen Spitzmueller
d76cef70a0 Allow to hide formats from menus
Fixes: #11657
2019-09-11 10:29:50 +02:00
Juergen Spitzmueller
b852df91bc Localize the default decimal separator
Do not blindly use (English) "." as default, but the locale default of
the current context language.

Fixes: #7204
2019-07-22 08:05:28 +02:00
Jean-Marc Lasgouttes
c476c3766c Add a pref to disable OS keyboard language support
By default, the behavior is the same as before, except that the
language of new document is not unconditionally en_US anymore.

The new checkbox "Respect OS keyboard language" (off by default)
governs this behavior.

Update prefs format to 30.
2019-07-20 12:57:16 +02:00
Jean-Marc Lasgouttes
2b1515a936 Rename LM_ST_* to *_STYLE and FONT_SIZE_* to *_SIZE
This makes code more uniform. This is typically something that is done
at end of cycle to limit backport issues later.
2019-06-14 17:05:49 +02:00
Jean-Marc Lasgouttes
7bb08f10b1 Move initial values of LyXRC members to the header
We use a C++11 construct that puts initial values of members along
with their definition. It is a good construct and now the out of line
constructor and the setDefaults() method can go.

This removes the need to define a dummy constructor in tex2lyx and
client.

The only needed change to the rest of code is a change of signature
for the user_(name|email) to return std::string. They are now called
explicitely from the constructor. We now have to include userinfo.h in
LyXRC.h, but this should not be too expensive.
2019-04-19 14:46:12 +02:00
Juergen Spitzmueller
2078a02ce9 Silence compiler warning 2019-03-08 16:48:49 +01:00
Jean-Marc Lasgouttes
954531f247 Update screen as needed when preferences are changed
This commit removes the adhoc code in GuiPrefs and moves it to LyXRC,
so that it triggers in every preference change.

The code has also been updated to trigger on more variables, e.g.
font_*_foundry.

Note that the actual function that are called have not been changed
(addPreviews and LFUN_SCREEN_FONT_UPDATE), although there are doubts
that they behave as needed (see FIXMEs).

Fixes bug #11498.
2019-02-26 16:53:14 +01:00
Enrico Forestieri
472bdf5910 Replace environment variables in PATH prefix
The PATH prefix modified through the GUI was set without
replacing embedded environment variables. This might have
caused problems on Windows with external python installations.
2019-01-11 18:15:40 +01:00
Jean-Marc Lasgouttes
9fe101e890 Remove support for pixmap cache
This code has issues and there is no evidence that it improves performance.

Remove LyXRC variable \use_pixmap_cache and update rc format to 29.

Now the global pixmap cache is only used by GuiCompleter. Therefore
there is no need to reset it when fonts change.
2018-10-07 14:56:55 +02:00
Juergen Spitzmueller
ed61ce74b7 So long, date-insert!
This function is superseded by info-insert date, which is much mightier
and more flexible.
2018-08-20 09:25:22 +02:00
Juergen Spitzmueller
8d45179403 More GuiInfo usability work 2018-08-01 09:28:03 +02:00
Juergen Spitzmueller
389352b3fb Add optional flavor flag to needaux
Also, use latex flavor if no flag is given rather than default output
format

Fixes: #9127
2018-04-25 13:51:40 +02:00
Richard Kimberly Heck
ae45a5de59 Add slightly improved error message.
(cherry picked from commit 4f0504d778)
2018-04-23 20:36:56 -04:00
Juergen Spitzmueller
26ea1e1496 Align fontenc with document fonts
Following a request by Günter, we consider the document fonts (only rm
for now) when selecting an appropriate font encoding.

See #9741

The new default font encoding setting "auto" does

* consider the font encoding needed by the language(s), which can now
  have fallback alternatives
* Consider which font encoding is provided by the document font

Thus, cm now will result in OT1 fontenc, if the language can deal with
that.

The font_enc pref is ditched: it is no longer needed.

The automatism is still very basic and is subject to extension.

File format and prefs format change.
2018-04-22 19:06:46 +02:00