mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:27:45 +00:00
Everywhere: Use 'decrease_slider_by()' method from AbstractSlider
The same idea as 'increase_slider_by()', it helps us to avoid repeating the pattern 'set_value(value() - delta)'.
This commit is contained in:
parent
d53e1fa1fa
commit
086615535f
8 changed files with 10 additions and 10 deletions
|
@ -215,7 +215,7 @@ void TerminalWidget::keydown_event(GUI::KeyEvent& event)
|
|||
m_cursor_blink_timer->start();
|
||||
|
||||
if (event.key() == KeyCode::Key_PageUp && event.modifiers() == Mod_Shift) {
|
||||
m_scrollbar->set_value(m_scrollbar->value() - m_terminal.rows());
|
||||
m_scrollbar->decrease_slider_by(m_terminal.rows());
|
||||
return;
|
||||
}
|
||||
if (event.key() == KeyCode::Key_PageDown && event.modifiers() == Mod_Shift) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue