Scroll Using Click-and-Drag with Middle Mouse Button (#1559)
* ChannelView: Rename mouse event related members This is more in line with the naming of the other members as well as future members. * ChannelView: Add ability to scroll with middle mouse button * Add scrolling resources * Use custom icons for scroll cursor * Slightly refactor scrolling logic * Respect screen scaling when calculating scroll offset * Nicer scrolling UX This change allows scrolling to be feel smoother when close to the starting point. * Add scrolling with keeping middle mouse pressed This mimics the behavior of browsers as well. * Refactor ChannelView::enableScrolling * Disable drag-scrolling on left or right click
This commit is contained in:
@@ -30,6 +30,9 @@ Resources2::Resources2()
|
||||
this->error = QPixmap(":/error.png");
|
||||
this->icon = QPixmap(":/icon.png");
|
||||
this->pajaDank = QPixmap(":/pajaDank.png");
|
||||
this->scrolling.downScroll = QPixmap(":/scrolling/downScroll.png");
|
||||
this->scrolling.neutralScroll = QPixmap(":/scrolling/neutralScroll.png");
|
||||
this->scrolling.upScroll = QPixmap(":/scrolling/upScroll.png");
|
||||
this->settings.aboutlogo = QPixmap(":/settings/aboutlogo.png");
|
||||
this->split.down = QPixmap(":/split/down.png");
|
||||
this->split.left = QPixmap(":/split/left.png");
|
||||
@@ -50,4 +53,4 @@ Resources2::Resources2()
|
||||
this->twitch.vip = QPixmap(":/twitch/vip.png");
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
} // namespace chatterino
|
||||
@@ -1,5 +1,4 @@
|
||||
#include <QPixmap>
|
||||
|
||||
#include "common/Singleton.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
@@ -39,6 +38,11 @@ public:
|
||||
QPixmap error;
|
||||
QPixmap icon;
|
||||
QPixmap pajaDank;
|
||||
struct {
|
||||
QPixmap downScroll;
|
||||
QPixmap neutralScroll;
|
||||
QPixmap upScroll;
|
||||
} scrolling;
|
||||
struct {
|
||||
QPixmap aboutlogo;
|
||||
} settings;
|
||||
@@ -65,4 +69,4 @@ public:
|
||||
} twitch;
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
} // namespace chatterino
|
||||
Reference in New Issue
Block a user