Commit graph

46 commits

Author SHA1 Message Date
Ilya Fedin
183576ae65 Make a comment about the Qt's Caps Lock bug
In order to remember remove it once the bug is fixed
2022-04-14 09:07:40 +04:00
Ilya Fedin
f2c77daccc Use setContentMargins in QLineEdit-based input fields 2022-03-05 16:55:33 +04:00
23rd
2d54e9fd35 Fixed background display after untoggling spoilers in input fields. 2022-01-24 20:44:32 +03:00
23rd
7bd7ada3ff Split qt_adapters to separated files. 2022-01-24 19:29:36 +03:00
23rd
ee4a94c122 Added spoiler support to input field. 2021-12-24 15:49:02 +03:00
23rd
c06f0435c4 Moved splitting of tags to separated method. 2021-12-22 17:03:52 +03:00
John Preston
7efa1f9b2b Use base::unique_qptr for PopupMenu-s. 2021-12-09 21:55:19 +04:00
Ilya Fedin
397be4f175 Call QInputMethod::show on TouchEnd
Qt calls QInputMethod::show on mouseReleaseEvent, but tdesktop sets Qt::WA_AcceptTouchEvents, so Qt's callback is never called and the keyboard is never shown. Adding the same to TouchEnd event should synchornize the behavior.

QInputMethod::hide is called in QWidget::focusOutEvent and shouldn't be affected.
2021-10-25 08:47:23 +04:00
Ilya Fedin
ee36b1f451 Use StringViewMid adapter 2021-10-20 10:27:52 +04:00
Ilya Fedin
64e40913df Use new Qt 6 adapters 2021-10-19 19:28:45 +04:00
Ilya Fedin
8e5d35229a Simple replacements for Qt 6
QStringRef -> QStringView
QTextCursor constructor accepts a QTextDocument only
Some headers are moved, so paths are removed
QMatrix -> QTransform
Methods returning qsizetype are wrapped to int()s to allow compiler to deduce the type
2021-10-19 17:06:25 +04:00
John Preston
b35d2d257a Use base/random.h instead of openssl::RandomValue. 2021-09-15 13:16:44 +03:00
23rd
093e3129ab Replaced singleShot with InvokeQueued in InputField. 2021-09-06 13:19:32 +03:00
John Preston
ec3af38ad9 Attempt to fix a possible crash in InputField. 2021-09-01 18:50:00 +03:00
Ilya Fedin
b8485c0d8a Fix -Wunused-variable warnings 2021-07-13 21:24:22 +03:00
Ilya Fedin
f0c474c6ae Fix clang warnings
Fixes -Wrange-loop-construct and -Wdeprecated-enum-enum-conversion
2021-07-13 20:16:48 +03:00
Ilya Fedin
b0c950b02a Fix -Wunused-function warnings 2021-07-13 20:15:45 +03:00
John Preston
e73e1a6c0f Fix new formatting mixing with emoji. 2021-06-24 17:01:03 +04:00
John Preston
2d71162f4a Convert overlapping tags to entities and back. 2021-06-22 18:29:12 +04:00
John Preston
d3eff6f38a Add and remove tags without clearing markup. 2021-06-22 16:35:01 +04:00
John Preston
96b4c6c57a Allow several tags with '|' separator in InputField. 2021-06-22 14:42:57 +04:00
John Preston
ff0daf7d83 Fix breaking formatting tag on newline. 2021-06-22 11:08:04 +04:00
John Preston
b1d5ed4ab5 Always call raise() before activateWindow(). 2021-06-07 11:24:22 +04:00
John Preston
95ee92088e Allow choosing OpenGL / Raster in runtime. 2021-05-19 16:46:58 +04:00
John Preston
f288c5649c Add MaskedInputField::showErrorNoFocus. 2021-03-26 21:05:02 +04:00
Ilya Fedin
af41bff7e4 Build with QT_NO_KEYWORDS 2021-03-03 22:34:02 +04:00
John Preston
a5fb993721 Make a generic NumberInput from PortInput. 2021-01-22 21:49:12 +04:00
John Preston
b5fb343d6c Allow only Ctrl modifier for Backspace on Linux. 2020-12-30 17:51:26 +04:00
John Preston
dfc0f0b889 Change button round radius. 2020-12-08 11:12:46 +04:00
John Preston
e0fb1129d1 Allow custom PopupMenu style in InputField. 2020-11-30 14:19:38 +03:00
John Preston
4ef97b57f6 Guard against inputMethodEvent destroying the field. 2020-06-08 12:13:15 +04:00
John Preston
d71d2121b1 Move some methods out of the global scope. 2020-06-03 19:04:52 +04:00
John Preston
8e2cfbf303 Insert only paragraph separators in the field. 2020-05-12 19:12:33 +04:00
John Preston
6aa6a143bf Add a workaround for invalid Qt signal data. 2020-05-12 19:11:46 +04:00
John Preston
8e44fb7780 Fix tilde hack for non-empty styleName. 2020-05-10 17:02:37 +04:00
John Preston
cc9b7e2c2f Use Bold instead of Semibold by entities. 2020-05-08 11:51:41 +04:00
ilya-fedin
74889b8c21 Better algorithm for font choosing 2020-04-13 11:31:34 +04:00
23rd
983d6be8d4 Added rpl::event_stream for firing applied markdown tag to spellchecker. 2019-12-30 16:58:53 +03:00
John Preston
c68dceb189 Use selected text colors from the palette.
On macOS in Dark Mode + Graphite system settings have selected text color
'white' and selected text background color 'white+opacity'.

It looks fine if the control background is dark, but in case of custom color
themes with white control background the selected text becomes invisible.
2019-11-07 10:37:46 +03:00
John Preston
5723c2ba54 Fix workaround for Open Sans tilda bug. 2019-11-04 16:15:43 +03:00
23rd
ba12ebc67a Fixed firing of incorrect values to document changes rpl::event_stream. 2019-10-30 18:14:43 +03:00
23rd
ee44c5b89e Added ability to extend context menu of InputField via rpl. 2019-10-30 18:14:43 +03:00
23rd
24d69ee679 Added rpl::event_stream for document contents changes in InputField. 2019-10-30 18:14:43 +03:00
John Preston
37f777e230 Attempt to fix emoji layout in the InputField. 2019-10-20 14:21:08 +04:00
John Preston
84d68e48c0 Allow showing error without field focusing. 2019-09-26 11:10:03 +03:00
John Preston
85c83003ca Initial commit. 2019-09-17 17:48:58 +03:00