mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
MacPDF: Pre-populate "Go to Page..." dialog with current page
This commit is contained in:
parent
e67d8cfb2a
commit
d2bda064da
1 changed files with 1 additions and 1 deletions
|
@ -152,11 +152,11 @@
|
|||
[alert addButtonWithTitle:@"Go"];
|
||||
[alert addButtonWithTitle:@"Cancel"];
|
||||
|
||||
// FIXME: Pre-populate with current page.
|
||||
auto textField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 24)];
|
||||
NSNumberFormatter* formatter = [[NSNumberFormatter alloc] init];
|
||||
formatter.numberStyle = NSNumberFormatterNoStyle; // Integers only.
|
||||
[textField setFormatter:formatter];
|
||||
[textField setIntValue:[_pdfView page]];
|
||||
|
||||
alert.accessoryView = textField;
|
||||
alert.window.initialFirstResponder = textField;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue