mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
MacPDF: Make up and down flip pages when PDF view has focus
Previously, it only reacted to arrow left andn arrow right, and to opt-up and opt-down.
This commit is contained in:
parent
627b152d49
commit
6528f6db26
1 changed files with 12 additions and 0 deletions
|
@ -164,6 +164,12 @@ static NSBitmapImageRep* ns_from_gfx(NonnullRefPtr<Gfx::Bitmap> bitmap_p)
|
||||||
[self interpretKeyEvents:@[ event ]];
|
[self interpretKeyEvents:@[ event ]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called on down arrow.
|
||||||
|
- (IBAction)moveDown:(id)sender
|
||||||
|
{
|
||||||
|
[self goToNextPage:self];
|
||||||
|
}
|
||||||
|
|
||||||
// Called on left arrow.
|
// Called on left arrow.
|
||||||
- (IBAction)moveLeft:(id)sender
|
- (IBAction)moveLeft:(id)sender
|
||||||
{
|
{
|
||||||
|
@ -176,6 +182,12 @@ static NSBitmapImageRep* ns_from_gfx(NonnullRefPtr<Gfx::Bitmap> bitmap_p)
|
||||||
[self goToNextPage:self];
|
[self goToNextPage:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called on up arrow.
|
||||||
|
- (IBAction)moveUp:(id)sender
|
||||||
|
{
|
||||||
|
[self goToPreviousPage:self];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - State restoration
|
#pragma mark - State restoration
|
||||||
|
|
||||||
- (void)encodeRestorableStateWithCoder:(NSCoder*)coder
|
- (void)encodeRestorableStateWithCoder:(NSCoder*)coder
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue