Commit Graph

86 Commits

Author SHA1 Message Date
tsujan 54044133ce Added modes for background image (#385)
* Added modes for background image

They are "None", "Stretch", "Zoom", "Fit" and "Center".

Some problems are fixed in the code for the following purposes:

  1. The background image isn't limited to translucent terminals.
  2. The background color isn't blended with the background image. Blending is not only ugly but unneeded. Instead, the user can use translucent images as the background.
  3. Image scaling is smooth and antialiasing.

A patch for QTerminal will follow this to use it.

* Just added some curly brackets
2021-03-01 01:25:54 +08:00
Chih-Hsuan Yen a35bf8db43 Pasting-related features should be in qtermwidget
Those were added to qterminal in [1], which makes fixing paste-related
issues harder.

[1] https://github.com/lxqt/qterminal/pull/309
2021-01-09 00:23:35 +08:00
Chih-Hsuan Yen b7b037430c Fix execution after paste when Ctrl is hold 2021-01-09 00:23:35 +08:00
Chih-Hsuan Yen 71f8049760 Properly implement the "Action after paste" feature
Scroll to end only when data is not from pasting

Fixes https://github.com/lxqt/qterminal/issues/43
Fixes https://github.com/lxqt/qterminal/issues/741
2021-01-09 00:23:35 +08:00
Tsu Jan 7514ebbe1a Added a QTermWidget method to disable bracketed paste mode
Will be followed and used by a QTerminal patch.
2020-12-24 12:34:46 +08:00
tsujan 8d85d99f8a Merge pull request #352 from lxqt/implement-keyboard-command-handling
Handle keyboard commands properly
2020-10-31 19:58:46 +03:30
Luís Pereira 4b32b62df3 Use const references where possible
Good practice and a minor performance improvement.
2020-10-23 21:34:33 +08:00
Yen Chi Hsuan c797ccf97d Handle keyboard commands properly
It was hard-coded in TerminalDisplay.cpp - Shift+Up always results in
ScrollLineUpCommand regardless of settings in *.keytab. Now those
commands are correctly parsed by KeyboardTranslator.

Fixes lxde/qterminal#348

This fix is similar to KDE/konsole@b88dfb402a
while I use signals and slots instead of introducing new pointers. That
sounds more reliable :)
2020-07-18 10:37:28 +08:00
Dmitry Matrokhin 9b12c21246 Fix flickering on font change
Root cause:
When font is changed paintEvent is called and we draw text "Mq" to
calculate font height. Then on next paintEvent we draw original content.
Since it's done in 2 steps we get flickering.
Fix:
Do calculating and redrawing in 1 step.
2019-08-17 20:49:13 +02:00
BlahGeek 88e57a57fc Use QRectF for cursor drawing, fix artifacts in hidpi 2019-07-15 22:39:40 +02:00
Chih-Hsuan Yen 64fef7ab3c Allow to disable drawing line chars 2019-07-15 22:39:00 +02:00
Chih-Hsuan Yen 2cb98f24b7 Don't set the selection clipboard if it's unsupported
Or there are warnings on macOS and Wayland. For example,

> Data set on unsupported clipboard mode. QMimeData object will be deleted.
2019-07-15 21:05:11 +02:00
Tsu Jan 3467ff6482 Completed the support for transient scrollbars
Transient scrollbars don't take space but that wasn't considered in a small part of the code. This patch completes https://github.com/lxqt/qtermwidget/commit/2b7c2b38edd69613f5c1ec67958c18f438d27e4f

I encountered a small problem during a big compilation (qt), made and applied the patch and, by chance, had another big compilation (qtcreator) afterward. The test was successful, as expected.
2019-05-18 23:26:22 +08:00
Zang MingJie fcf0ebc498 Fix TerminalDisplay::getCharacterPosition memory access violation
Fix: lxqt/qtermwidget#266
2019-04-22 22:03:02 +08:00
Luís Pereira b87de89767 Use braced initializer list in returns
Replaces explicit calls to the constructor in a return with a braced
initializer list.
2019-04-13 15:49:15 +02:00
Luís Pereira 5e44880a70 Port to C++ bool literals 2019-04-13 15:49:15 +02:00
Luís Pereira b8906f6b0c Port towards C++11 nullptr 2019-04-13 15:49:15 +02:00
Chih-Hsuan Yen b09e1d4882 Revert "Rework on memory management of filter-related objects"
This reverts commit 0154e036c7.
2019-01-14 13:17:00 +08:00
Chih-Hsuan Yen 8374bf9d31 Redraw cursor after cursor type changed (closes #161) 2018-10-09 22:49:27 +02:00
Tsu Jan 1e7e494229 Fixed link mouseover after recent changes
Closes https://github.com/lxqt/qtermwidget/issues/213, closes https://github.com/lxqt/qtermwidget/issues/209, supercedes https://github.com/lxqt/qtermwidget/pull/211

Also, @agaida's fix for an old issue in link mouseover is included.
2018-09-23 00:52:53 +02:00
Ecmel B. CANLIER 2b25bec3ad Fix getMargin 2018-09-02 17:31:12 +08:00
Ecmel B. CANLIER 8eba2e2d3b Implement methods to change padding 2018-09-02 17:31:12 +08:00
Ecmel B. CANLIER e331bd4c67 Make padding configurable 2018-09-02 17:31:12 +08:00
Ecmel B. CANLIER ac6581e24f Make margin variables non-const to allow modification 2018-09-02 17:31:12 +08:00
Luís Pereira c6880070e9 Don't use automatic string conversions
* Disables automatic conversions from 8-bit strings (char *) to unicode
  QStrings.
* Disables automatic conversion from QString to 8-bit strings (char *).
* Disables automatic conversions from QByteArray to const char * or const
  void *.
* Disables automatic conversions from QString (or char *) to QUrl.
* Use QStringBuilder for more efficient string creation.

It make us aware of string and encoding conversions.
2018-08-05 22:09:57 +08:00
Tsu Jan 3838728c22 Suppress compilation warnings 2018-07-16 17:24:13 +02:00
Yen Chi Hsuan 0154e036c7 Rework on memory management of filter-related objects 2018-06-28 12:20:07 +02:00
Tsu Jan 2b7c2b38ed Take transient scrollbars into account
Fixes https://github.com/lxqt/qterminal/issues/415

Because they are transient by definition (since Qt 5.5), the code should not spare an extra space for them (Konsole does not have this feature).

Apart from that, the code does not need to fill the area behind the scrollbar explicitly; it is enough to auto-fill it.

Naturally, no change will be seen with styles other than Kvantum.
2018-05-06 20:01:48 +02:00
Yen Chi Hsuan c648297792 Support UTF-32 characters correctly
By replacing QString/QChar or quint16 with std::wstring and wchar_t
2018-02-28 10:49:41 +01:00
Chih-Hsuan Yen 733f4b6e8f Finish SGR mouse protocol (1006)
Some codes in https://github.com/KDE/konsole/commit/c83e7b638dcc42b617a067e6dc23686eccf23b00
are missing. Backport all of them.

Fixes #164
2018-02-06 18:07:19 +01:00
Zang MingJie 1d4ddc8afd Expose bracket text function 2018-01-13 03:10:31 +01:00
Luís Pereira ba85185c40 Drop Qt foreach.
Replaced with the ranged-for loop.
Using QT_NO_FOREACH to enforce it.
Qt 5.7.1 required.
2018-01-12 20:16:19 +01:00
hoxnox 1da2661dc5 FIX: #46 fix vertical font truncation 2017-10-21 17:43:27 +02:00
Yen Chi Hsuan 3e7f8d7875 Handle DECSCUSR signals 2017-07-21 19:51:55 +02:00
Donnie West d84849b04b Backport Vt102 emulation fixes (#113)
Also pull in KeyboardTranslator and Character updates
2017-04-24 21:26:56 +02:00
Palo Kisa 42a2d78f2d TerminalDisplay: Make resizing "Size" translatable 2017-02-10 10:13:52 +01:00
Yen Chi Hsuan 58f96bacb3 Implement background images (#95) 2016-11-20 22:18:29 +01:00
Yen Chi Hsuan 9be45d6a61 Implement other BOX DRAWING characters (#98)
Porting of
https://github.com/KDE/konsole/commit/1a61aaa5915b5c4a5b205e87d35c38562f932fe0

Fixes https://github.com/lxde/qterminal/issues/277
2016-11-20 15:52:17 +01:00
Yen Chi Hsuan 000fc2e8cf Preparations for context menu actions on URLs (#97)
1. Define click-action so that QTermWidget clients can tell clicking
   from context menu actions
2. Expose filterActions
2016-11-20 15:26:14 +01:00
Pavel Khlebovich e27b89f4ef Remove widget size checks in setVTFont() (#86) 2016-10-04 11:37:43 +02:00
Igor e5dbf9a359 Delete unused tooltip code (#81) 2016-10-03 21:38:18 +02:00
Petr Vanek c576cf0dc9 Merge pull request #60 from f2404/48_bracketed_input
Bracketed paste mode implementation
2016-05-25 09:10:46 +02:00
Igor d1c22ac5da Avoid enums duplication 2016-05-23 17:27:17 +03:00
Igor c472676560 Bracketed paste mode implementation 2016-02-01 19:26:39 +03:00
rago1975 10e17968e4 Use function setWorldTranfer for Qpainter instead of setWorldMatrix 2016-01-08 00:00:30 +09:00
rago1975 5031c16a51 Modify treatment drawing double width character 2016-01-07 23:42:14 +09:00
Igor f9a7d4ac5d Avoid checking uninitialized member + simplify condition 2015-12-23 18:21:27 +03:00
Jerome Leclanche 90008c9db9 Remove support for Qt <= 5.4 2015-11-22 14:55:41 +02:00
Jerome Leclanche 72ffc262eb Clean up trailing whitespaces 2015-07-09 20:22:48 +02:00
Petr Vanek f6fdd81c78 Merge pull request #35 from raboof/proportionalFonts
Handle proportional fonts a bit better
2015-02-05 11:32:31 +01:00