mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 12:55:09 +00:00
LibGUI: Cycle through TabWidget tabs with Ctrl+Tab / Ctrl+Shift+Tab
Fixes #2022.
This commit is contained in:
parent
a9f6f862e2
commit
f2cdef5c47
2 changed files with 14 additions and 0 deletions
|
@ -332,4 +332,17 @@ void TabWidget::activate_previous_tab()
|
|||
set_active_widget(m_tabs.at(index).widget);
|
||||
}
|
||||
|
||||
void TabWidget::keydown_event(KeyEvent & event)
|
||||
{
|
||||
if (event.ctrl() && event.key() == Key_Tab) {
|
||||
if (event.shift())
|
||||
activate_previous_tab();
|
||||
else
|
||||
activate_next_tab();
|
||||
event.accept();
|
||||
return;
|
||||
}
|
||||
Widget::keydown_event(event);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue