1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:37:35 +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:
Tim Ledbetter 2023-01-28 21:18:33 +00:00 committed by Sam Atkins
parent 2a32f8ad42
commit b983dc8807
4 changed files with 51 additions and 4 deletions

View 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();
}
}