Add Continuous Auto-Scrolling (#7396)

* Initial Commit

* Refactor code and add new icons

* Fix logical error

* Add smooth scrolling to Song Editor

* Remove unused variable

* Fix scrolling speed and scrollbar width

* Remove QDebug and re-add a newline I deleted in an unrelated file

* Forgot to add files to commit

* Remove unused variable

* Fix Styling

* Fix Styling Again

* Fix Styling Again

* Fix Styling Again

* Add icons for classic theme

* Accidentally committed varying scroll speed with zoom -- removing

* Change abs to std::abs

Co-authored-by: saker <sakertooth@gmail.com>

* Change qMax to std::max and use static_cast

Co-authored-by: saker <sakertooth@gmail.com>

* Simplify stepped auto scrolling

Co-authored-by: saker <sakertooth@gmail.com>

* Remove unnecessary parentheses

* Remove return statement causing the play head line to stop

* Add specific tooltips to auto scrolling button states

* Remove `== true` from SongEditor.cpp

Co-authored-by: saker <sakertooth@gmail.com>

* Make tooltips translatable

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>

* Fix zooming position calculation

* Rename bars to ticks

* Fix rubberband rect size

---------

Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
This commit is contained in:
regulus79
2024-08-04 04:30:42 -04:00
committed by GitHub
parent 1c865843f7
commit ce17c95636
9 changed files with 59 additions and 47 deletions

View File

@@ -73,7 +73,8 @@ public:
enum class AutoScrollState
{
Enabled,
Stepped,
Continuous,
Disabled
};
@@ -212,7 +213,7 @@ private:
QCursor m_cursorSelectLeft = QCursor{embed::getIconPixmap("cursor_select_left"), 0, 16};
QCursor m_cursorSelectRight = QCursor{embed::getIconPixmap("cursor_select_right"), 32, 16};
AutoScrollState m_autoScroll = AutoScrollState::Enabled;
AutoScrollState m_autoScroll = AutoScrollState::Stepped;
// Width of the unused region on the widget's left (above track labels or piano)
int m_xOffset;