mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add PgUp / PgDown for scrolling in the emote popup (#2607)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
bc334222c1
commit
b0fee78f2b
|
@ -44,7 +44,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)
|
- Minor: PageUp and PageDown now scroll in the selected split and in the emote popup (#2070, #2081, #2410, #2607)
|
||||||
- Minor: Allow highlights to be excluded from `/mentions`. Excluded highlights will not trigger tab highlights either. (#1793, #2036)
|
- Minor: Allow highlights to be excluded from `/mentions`. Excluded highlights will not trigger tab highlights either. (#1793, #2036)
|
||||||
- Minor: Flag all popup dialogs as actual dialogs so they get the relevant window manager hints (#1843, #2182, #2185, #2232, #2234)
|
- Minor: Flag all popup dialogs as actual dialogs so they get the relevant window manager hints (#1843, #2182, #2185, #2232, #2234)
|
||||||
- Minor: Don't show update button for nightly builds on macOS and Linux, this was already the case for Windows (#2163, #2164)
|
- Minor: Don't show update button for nightly builds on macOS and Linux, this was already the case for Windows (#2163, #2164)
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
#include "util/Shortcut.hpp"
|
#include "util/Shortcut.hpp"
|
||||||
#include "widgets/Notebook.hpp"
|
#include "widgets/Notebook.hpp"
|
||||||
|
#include "widgets/Scrollbar.hpp"
|
||||||
#include "widgets/helper/ChannelView.hpp"
|
#include "widgets/helper/ChannelView.hpp"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
@ -178,6 +179,20 @@ EmotePopup::EmotePopup(QWidget *parent)
|
||||||
createWindowShortcut(this, "CTRL+Shift+Tab", [=] {
|
createWindowShortcut(this, "CTRL+Shift+Tab", [=] {
|
||||||
notebook->selectPreviousTab();
|
notebook->selectPreviousTab();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Scroll with Page Up / Page Down
|
||||||
|
createWindowShortcut(this, "PgUp", [=] {
|
||||||
|
auto &scrollbar =
|
||||||
|
dynamic_cast<ChannelView *>(notebook->getSelectedPage())
|
||||||
|
->getScrollBar();
|
||||||
|
scrollbar.offset(-scrollbar.getLargeChange());
|
||||||
|
});
|
||||||
|
createWindowShortcut(this, "PgDown", [=] {
|
||||||
|
auto &scrollbar =
|
||||||
|
dynamic_cast<ChannelView *>(notebook->getSelectedPage())
|
||||||
|
->getScrollBar();
|
||||||
|
scrollbar.offset(scrollbar.getLargeChange());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmotePopup::loadChannel(ChannelPtr _channel)
|
void EmotePopup::loadChannel(ChannelPtr _channel)
|
||||||
|
|
Loading…
Reference in a new issue