Merge pull request #106742 from bruvzg/about_to_popup
Call `PopupMenu` min. size calculations after `about_to_popup` signal processing.
This commit is contained in:
commit
8aac4a157f
4 changed files with 18 additions and 11 deletions
|
|
@ -1994,6 +1994,8 @@ void Window::popup(const Rect2i &p_screen_rect) {
|
|||
ERR_MAIN_THREAD_GUARD;
|
||||
emit_signal(SNAME("about_to_popup"));
|
||||
|
||||
_pre_popup();
|
||||
|
||||
if (!get_embedder() && get_flag(FLAG_POPUP)) {
|
||||
// Send a focus-out notification when opening a Window Manager Popup.
|
||||
SceneTree *scene_tree = get_tree();
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ private:
|
|||
static int root_layout_direction;
|
||||
|
||||
protected:
|
||||
virtual void _pre_popup() {} // Called after "about_to_popup", but before window is shown.
|
||||
virtual Rect2i _popup_adjust_rect() const { return Rect2i(); }
|
||||
virtual void _post_popup() {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue