mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Merge pull request #1544 from BigHeadGeorge/ctrl-end-resumes-scrolling
Control + End scrolls to the bottom of chat
This commit is contained in:
commit
14427fe5a9
1 changed files with 16 additions and 8 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "singletons/Theme.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/Scrollbar.hpp"
|
||||
#include "widgets/dialogs/EmotePopup.hpp"
|
||||
#include "widgets/helper/ChannelView.hpp"
|
||||
#include "widgets/helper/EffectLabel.hpp"
|
||||
|
@ -266,6 +267,13 @@ void SplitInput::installKeyPressedEvent()
|
|||
event->accept();
|
||||
}
|
||||
else if (event->key() == Qt::Key_End)
|
||||
{
|
||||
if (event->modifiers() == Qt::ControlModifier)
|
||||
{
|
||||
this->split_->getChannelView().getScrollBar().scrollToBottom(
|
||||
getSettings()->enableSmoothScrollingNewMessages.getValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
QTextCursor cursor = this->ui_.textEdit->textCursor();
|
||||
cursor.movePosition(
|
||||
|
@ -274,7 +282,7 @@ void SplitInput::installKeyPressedEvent()
|
|||
? QTextCursor::MoveMode::KeepAnchor
|
||||
: QTextCursor::MoveMode::MoveAnchor);
|
||||
this->ui_.textEdit->setTextCursor(cursor);
|
||||
|
||||
}
|
||||
event->accept();
|
||||
}
|
||||
else if (event->key() == Qt::Key_H &&
|
||||
|
|
Loading…
Reference in a new issue