2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

alt-up and alt-down scroll through dialogs, fixed compile on windows

This commit is contained in:
John Preston
2015-01-28 16:29:01 +03:00
parent 89ce0ce1e2
commit 1c2289f2ce
3 changed files with 23 additions and 9 deletions

View File

@@ -547,10 +547,10 @@ void FlatTextarea::keyPressEvent(QKeyEvent *e) {
if (tc == textCursor()) {
bool check = false;
if (e->key() == Qt::Key_PageUp || e->key() == Qt::Key_Up) {
tc.movePosition(QTextCursor::Start);
tc.movePosition(QTextCursor::Start, e->modifiers().testFlag(Qt::ShiftModifier) ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor);
check = true;
} else if (e->key() == Qt::Key_PageDown || e->key() == Qt::Key_Down) {
tc.movePosition(QTextCursor::End);
tc.movePosition(QTextCursor::End, e->modifiers().testFlag(Qt::ShiftModifier) ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor);
check = true;
}
if (check) {