mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 10:11:41 -05:00
improved word skip in qtextedit
This commit is contained in:
parent
e6b867da57
commit
ac245b174d
5 changed files with 35 additions and 3 deletions
2
MSVC.md
2
MSVC.md
|
@ -142,7 +142,7 @@ There go to Qt directory
|
|||
|
||||
and after that run configure
|
||||
|
||||
configure -debug-and-release -opensource -confirm-license -static -I "D:\TBuild\Libraries\OpenSSL-Win32\include" -L "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -l Gdi32 -opengl desktop -openssl-linked OPENSSL_LIBS_DEBUG="D:\TBuild\Libraries\OpenSSL-Win32\lib\VC\static\ssleay32MTd.lib D:\TBuild\Libraries\OpenSSL-Win32\lib\VC\static\libeay32MTd.lib" OPENSSL_LIBS_RELEASE="D:\TBuild\Libraries\OpenSSL-Win32\lib\VC\static\ssleay32MT.lib D:\TBuild\Libraries\OpenSSL-Win32\lib\VC\static\libeay32MT.lib" -mp -nomake examples -nomake tests -platform win32-msvc2013
|
||||
configure -debug-and-release -opensource -confirm-license -static -I "D:\TBuild\Libraries\OpenSSL-Win32\include" -L "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -l Gdi32 -no-opengl -openssl-linked OPENSSL_LIBS_DEBUG="D:\TBuild\Libraries\OpenSSL-Win32\lib\VC\static\ssleay32MTd.lib D:\TBuild\Libraries\OpenSSL-Win32\lib\VC\static\libeay32MTd.lib" OPENSSL_LIBS_RELEASE="D:\TBuild\Libraries\OpenSSL-Win32\lib\VC\static\ssleay32MT.lib D:\TBuild\Libraries\OpenSSL-Win32\lib\VC\static\libeay32MT.lib" -mp -nomake examples -nomake tests -platform win32-msvc2013
|
||||
|
||||
to configure Qt build. After configuration is complete run
|
||||
|
||||
|
|
|
@ -69,6 +69,10 @@ _saveMsgStarted(0), _saveMsgOpacity(0)
|
|||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
setMouseTracking(true);
|
||||
|
||||
hide();
|
||||
psUpdateOverlayed(this);
|
||||
show();
|
||||
hide();
|
||||
|
||||
connect(&_close, SIGNAL(clicked()), this, SLOT(onClose()));
|
||||
|
@ -528,7 +532,7 @@ void MediaView::showPhoto(PhotoData *photo) {
|
|||
void MediaView::paintEvent(QPaintEvent *e) {
|
||||
QPainter p(this);
|
||||
QRect r(e->rect());
|
||||
|
||||
|
||||
QPainter::CompositionMode m = p.compositionMode();
|
||||
p.setCompositionMode(QPainter::CompositionMode_Source);
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
|||
#include "types.h"
|
||||
#include <zlib.h>
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
//#define DEBUG_MTPPRIME
|
||||
|
||||
#ifdef DEBUG_MTPPRIME
|
||||
|
|
|
@ -1786,7 +1786,7 @@ bool psSkipAudioNotify() {
|
|||
bool psSkipDesktopNotify() {
|
||||
QUERY_USER_NOTIFICATION_STATE state;
|
||||
if (useShellapi && SUCCEEDED(shQueryUserNotificationState(&state))) {
|
||||
if (state == QUNS_PRESENTATION_MODE || state == QUNS_RUNNING_D3D_FULL_SCREEN || state == QUNS_BUSY) return true;
|
||||
if (state == QUNS_PRESENTATION_MODE || state == QUNS_RUNNING_D3D_FULL_SCREEN/* || state == QUNS_BUSY*/) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -137,6 +137,31 @@ index 312320c..5e82318 100644
|
|||
}
|
||||
|
||||
// Make sure we're inside the viewport.
|
||||
diff --git a/qtbase/src/gui/text/qtextlayout.cpp b/qtbase/src/gui/text/qtextlayout.cpp
|
||||
index 1ac50d3..3c88caa 100644
|
||||
--- a/qtbase/src/gui/text/qtextlayout.cpp
|
||||
+++ b/qtbase/src/gui/text/qtextlayout.cpp
|
||||
@@ -643,7 +643,10 @@ int QTextLayout::nextCursorPosition(int oldPos, CursorMode mode) const
|
||||
while (oldPos < len && !attributes[oldPos].graphemeBoundary)
|
||||
oldPos++;
|
||||
} else {
|
||||
- if (oldPos < len && d->atWordSeparator(oldPos)) {
|
||||
+ while (oldPos < len && d->atSpace(oldPos))
|
||||
+ oldPos++;
|
||||
+
|
||||
+ if (oldPos < len && d->atWordSeparator(oldPos)) {
|
||||
oldPos++;
|
||||
while (oldPos < len && d->atWordSeparator(oldPos))
|
||||
oldPos++;
|
||||
@@ -651,8 +654,6 @@ int QTextLayout::nextCursorPosition(int oldPos, CursorMode mode) const
|
||||
while (oldPos < len && !d->atSpace(oldPos) && !d->atWordSeparator(oldPos))
|
||||
oldPos++;
|
||||
}
|
||||
- while (oldPos < len && d->atSpace(oldPos))
|
||||
- oldPos++;
|
||||
}
|
||||
|
||||
return oldPos;
|
||||
diff --git a/qtbase/src/gui/text/qtextlayout.h b/qtbase/src/gui/text/qtextlayout.h
|
||||
index 1e0ab9b..47972d3 100644
|
||||
--- a/qtbase/src/gui/text/qtextlayout.h
|
||||
|
|
Loading…
Add table
Reference in a new issue