mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibGUI: Fix keybind conflicts in TreeView
Changes the shortcut to expand and collapse subtrees from alt to ctrl+right/left arrows in TreeView. The current shortcuts conflict with applications that already have navigation controls bound to alt like file manager.
This commit is contained in:
parent
366d7e6d05
commit
332f349e07
Notes:
sideshowbarker
2024-07-19 04:52:07 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/332f349e07d Pull-request: https://github.com/SerenityOS/serenity/pull/2763 Reviewed-by: https://github.com/awesomekling
1 changed files with 2 additions and 2 deletions
|
@ -469,7 +469,7 @@ void TreeView::keydown_event(KeyEvent& event)
|
|||
|
||||
if (event.key() == KeyCode::Key_Left) {
|
||||
if (cursor_index.is_valid() && model()->row_count(cursor_index)) {
|
||||
if (event.alt()) {
|
||||
if (event.ctrl()) {
|
||||
collapse_tree(cursor_index);
|
||||
return;
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ void TreeView::keydown_event(KeyEvent& event)
|
|||
|
||||
if (event.key() == KeyCode::Key_Right) {
|
||||
if (cursor_index.is_valid() && model()->row_count(cursor_index)) {
|
||||
if (event.alt()) {
|
||||
if (event.ctrl()) {
|
||||
expand_tree(cursor_index);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue