mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
MacPDF: Pre-populate "Go to Page..." dialog with current page
This commit is contained in:
parent
e67d8cfb2a
commit
d2bda064da
Notes:
sideshowbarker
2024-07-17 09:48:50 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/d2bda064da Pull-request: https://github.com/SerenityOS/serenity/pull/21272
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
Reference in a new issue