mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
ImageViewer: Make arrow key shortcuts work
The user can now navigate to the previous and next image using the left and right arrow keys respectively. These shortcuts were previously not working.
This commit is contained in:
parent
2a32f8ad42
commit
b983dc8807
4 changed files with 51 additions and 4 deletions
23
Userland/Applications/ImageViewer/MainWidget.cpp
Normal file
23
Userland/Applications/ImageViewer/MainWidget.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Tim Ledbetter <timledbetter@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "MainWidget.h"
|
||||
|
||||
namespace ImageViewer {
|
||||
|
||||
MainWidget::MainWidget()
|
||||
{
|
||||
set_fill_with_background_color(true);
|
||||
set_layout<GUI::VerticalBoxLayout>();
|
||||
layout()->set_spacing(2);
|
||||
}
|
||||
|
||||
void MainWidget::keydown_event(GUI::KeyEvent& event)
|
||||
{
|
||||
event.ignore();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue