diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-01 19:09:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 19:09:33 +0200 |
commit | 8c7be63588bf3e4ef4b780ff57936c68db5939c7 (patch) | |
tree | 781068f8e33aa1704f4fe9d9f4a238397fbee8f1 /scene/gui/popup.h | |
parent | dcd74563b64fb45323c5d99e1382125488b863e8 (diff) | |
parent | 15fd025f900de9ff45e60e4b07d8839352d5a1f4 (diff) |
Merge pull request #65192 from YuriSizov/control-customizable-cache-p2
Diffstat (limited to 'scene/gui/popup.h')
-rw-r--r-- | scene/gui/popup.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scene/gui/popup.h b/scene/gui/popup.h index 70eb8722d0..0d6ca25c18 100644 --- a/scene/gui/popup.h +++ b/scene/gui/popup.h @@ -43,6 +43,10 @@ class Popup : public Window { LocalVector<Window *> visible_parents; bool popped_up = false; + struct ThemeCache { + Ref<StyleBox> panel_style; + } theme_cache; + void _input_from_window(const Ref<InputEvent> &p_event); void _initialize_visible_parents(); @@ -52,6 +56,7 @@ protected: void _close_pressed(); virtual Rect2i _popup_adjust_rect() const override; + virtual void _update_theme_item_cache() override; void _notification(int p_what); static void _bind_methods(); @@ -69,8 +74,14 @@ class PopupPanel : public Popup { Panel *panel = nullptr; + struct ThemeCache { + Ref<StyleBox> panel_style; + } theme_cache; + protected: void _update_child_rects(); + + virtual void _update_theme_item_cache() override; void _notification(int p_what); virtual Size2 _get_contents_minimum_size() const override; |