mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Removed few-step scroll.
This commit is contained in:
parent
7122e47817
commit
1fcfd8b13a
2 changed files with 2 additions and 10 deletions
|
@ -481,15 +481,10 @@ void NotebookTab::mouseMoveEvent(QMouseEvent *event)
|
||||||
|
|
||||||
void NotebookTab::wheelEvent(QWheelEvent *event)
|
void NotebookTab::wheelEvent(QWheelEvent *event)
|
||||||
{
|
{
|
||||||
float mouseMultiplier = getSettings()->mouseScrollMultiplier;
|
if (event->delta() > 0) {
|
||||||
wheelValue += event->delta() * mouseMultiplier;
|
|
||||||
|
|
||||||
if (wheelValue > WHEEL_STEP) {
|
|
||||||
this->notebook_->selectNextTab();
|
this->notebook_->selectNextTab();
|
||||||
wheelValue = 0;
|
} else {
|
||||||
} else if (wheelValue < -WHEEL_STEP) {
|
|
||||||
this->notebook_->selectPreviousTab();
|
this->notebook_->selectPreviousTab();
|
||||||
wheelValue = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
#define NOTEBOOK_TAB_HEIGHT 28
|
#define NOTEBOOK_TAB_HEIGHT 28
|
||||||
#define WHEEL_STEP 240
|
|
||||||
|
|
||||||
// class Notebook;
|
// class Notebook;
|
||||||
class Notebook;
|
class Notebook;
|
||||||
|
@ -85,8 +84,6 @@ private:
|
||||||
bool mouseOverX_ = false;
|
bool mouseOverX_ = false;
|
||||||
bool mouseDownX_ = false;
|
bool mouseDownX_ = false;
|
||||||
|
|
||||||
float wheelValue = 0;
|
|
||||||
|
|
||||||
HighlightState highlightState_ = HighlightState::None;
|
HighlightState highlightState_ = HighlightState::None;
|
||||||
bool highlightEnabled_ = true;
|
bool highlightEnabled_ = true;
|
||||||
QAction *highlightNewMessagesAction_;
|
QAction *highlightNewMessagesAction_;
|
||||||
|
|
Loading…
Reference in a new issue