* Scrolls the text in the list up by one row or to the top. * @param toMax If true then scrolls to the top of the list. false => one row up * @param scrollByWheel If true then use wheel scroll, otherwise scroll normally. */
| 770 | * @param scrollByWheel If true then use wheel scroll, otherwise scroll normally. |
| 771 | */ |
| 772 | void TextList::scrollUp(bool toMax, bool scrollByWheel) |
| 773 | { |
| 774 | if (!_scrolling) |
| 775 | return; |
| 776 | if (_rows.size() > _visibleRows && _scroll > 0) |
| 777 | { |
| 778 | if (toMax) |
| 779 | { |
| 780 | scrollTo(0); |
| 781 | } |
| 782 | else |
| 783 | { |
| 784 | if (scrollByWheel) |
| 785 | { |
| 786 | scrollTo(_scroll - std::min((size_t)(Options::mousewheelSpeed), _scroll)); |
| 787 | } |
| 788 | else |
| 789 | { |
| 790 | scrollTo(_scroll - 1); |
| 791 | } |
| 792 | } |
| 793 | } |
| 794 | } |
| 795 | |
| 796 | /** |
| 797 | * Scrolls the text in the list down by one row or to the bottom. |
no outgoing calls
no test coverage detected