Scroll in selected split with PageUp and PageDown (#2081)

This commit is contained in:
pajlada 2020-10-18 13:15:47 +02:00 committed by GitHub
parent 39a0e69a3b
commit 812cbdf4f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View file

@ -22,6 +22,7 @@
- Minor: Show channels live now enabled by default - Minor: Show channels live now enabled by default
- Minor: Bold usernames enabled by default - Minor: Bold usernames enabled by default
- Minor: Improve UX of the "Login expired!" message (#2029) - Minor: Improve UX of the "Login expired!" message (#2029)
- Minor: PageUp and PageDown now scroll in the selected split (#2070, #2081)
- Bugfix: Fix bug preventing users from setting the highlight color of the second entry in the "User" highlights tab (#1898) - Bugfix: Fix bug preventing users from setting the highlight color of the second entry in the "User" highlights tab (#1898)
- Bugfix: Fix bug where the "check user follow state" event could trigger a network request requesting the user to follow or unfollow a user. By itself its quite harmless as it just repeats to Twitch the same follow state we had, so no follows should have been lost by this but it meant there was a rogue network request that was fired that could cause a crash (#1906) - Bugfix: Fix bug where the "check user follow state" event could trigger a network request requesting the user to follow or unfollow a user. By itself its quite harmless as it just repeats to Twitch the same follow state we had, so no follows should have been lost by this but it meant there was a rogue network request that was fired that could cause a crash (#1906)
- Bugfix: /usercard command will now respect the "Automatically close user popup" setting (#1918) - Bugfix: /usercard command will now respect the "Automatically close user popup" setting (#1918)

View file

@ -66,6 +66,10 @@ KeyboardSettingsPage::KeyboardSettingsPage()
form->addRow(new QLabel("Ctrl + P"), new QLabel("Open Settings menu")); form->addRow(new QLabel("Ctrl + P"), new QLabel("Open Settings menu"));
form->addRow(new QLabel("F5"), form->addRow(new QLabel("F5"),
new QLabel("Reload subscriber and channel emotes")); new QLabel("Reload subscriber and channel emotes"));
form->addItem(new QSpacerItem(16, 16));
form->addRow(new QLabel("PageUp"), new QLabel("Scroll up"));
form->addRow(new QLabel("PageDown"), new QLabel("Scroll down"));
} }
} // namespace chatterino } // namespace chatterino

View file

@ -450,6 +450,20 @@ void SplitInput::installKeyPressedEvent()
{ {
this->openEmotePopup(); this->openEmotePopup();
} }
else if (event->key() == Qt::Key_PageUp)
{
auto &scrollbar = this->split_->getChannelView().getScrollBar();
scrollbar.offset(-scrollbar.getLargeChange());
event->accept();
}
else if (event->key() == Qt::Key_PageDown)
{
auto &scrollbar = this->split_->getChannelView().getScrollBar();
scrollbar.offset(scrollbar.getLargeChange());
event->accept();
}
}); });
} }