1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:47:35 +00:00

LibGUI: More work on GInputBox.

- If the GInputBox has a parent and the parent is a GWindow, center the
  input box window within the parent window. This looks quite nice.

- Stop processing events in a nested event loop immediately after it's
  been asked to quit.

- Fix GWidget::parent_widget() behavior for non-widget parents.
This commit is contained in:
Andreas Kling 2019-03-19 02:20:00 +01:00
parent a6538feed1
commit f88e550998
9 changed files with 74 additions and 34 deletions

View file

@ -1,9 +1,12 @@
#pragma once
#include <LibGUI/GWindow.h>
#include <LibGUI/GEventLoop.h>
class GDialog : public GWindow {
public:
enum ExecResult { ExecOK = 0, ExecCancel = 1, ExecAborted = 2 };
virtual ~GDialog() override;
int exec();
@ -15,5 +18,6 @@ protected:
explicit GDialog(GObject* parent);
private:
int m_result { 0 };
OwnPtr<GEventLoop> m_event_loop;
int m_result { ExecAborted };
};