mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-29 22:42:52 +00:00
LibGUI+Userland: Improve error and font handling for InputBox
Adds fallible factories, ports DeprecatedString, and rebuilds the layout to accomodate system font changes.
This commit is contained in:
parent
9c2bcffe83
commit
02a9e5d3f6
Notes:
sideshowbarker
2024-07-17 02:42:21 +09:00
Author: https://github.com/thankyouverycool
Commit: 02a9e5d3f6
Pull-request: https://github.com/SerenityOS/serenity/pull/18405
19 changed files with 135 additions and 124 deletions
|
@ -373,7 +373,7 @@ PDF::PDFErrorOr<void> PDFViewerWidget::try_open_file(StringView path, NonnullOwn
|
|||
auto document = TRY(PDF::Document::create(m_buffer));
|
||||
|
||||
if (auto sh = document->security_handler(); sh && !sh->has_user_password()) {
|
||||
DeprecatedString password;
|
||||
String password;
|
||||
while (true) {
|
||||
auto result = GUI::InputBox::show(window(), password, "Password"sv, "Password required"sv, GUI::InputType::Password);
|
||||
if (result == GUI::Dialog::ExecResult::OK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue