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
commit b983dc8807
Notes: sideshowbarker 2024-07-19 01:59:31 +09:00
4 changed files with 51 additions and 4 deletions

View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2023, Tim Ledbetter <timledbetter@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/BoxLayout.h>
#include <LibGUI/Widget.h>
namespace ImageViewer {
class MainWidget final : public GUI::Widget {
C_OBJECT(MainWidget)
public:
virtual ~MainWidget() override = default;
private:
MainWidget();
virtual void keydown_event(GUI::KeyEvent& event) final;
};
}