diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /scene/gui/popup.cpp | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) | |
download | redot-engine-0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a.tar.gz |
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
Diffstat (limited to 'scene/gui/popup.cpp')
-rw-r--r-- | scene/gui/popup.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 6edafc65a0..7068e2e1e2 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -42,15 +42,12 @@ void Popup::_input_from_window(const Ref<InputEvent> &p_event) { } void Popup::_parent_focused() { - _close_pressed(); } void Popup::_notification(int p_what) { - switch (p_what) { case NOTIFICATION_VISIBILITY_CHANGED: { if (is_visible()) { - parent_visible = get_parent_visible_window(); if (parent_visible) { parent_visible->connect("focus_entered", callable_mp(this, &Popup::_parent_focused)); @@ -79,7 +76,6 @@ void Popup::_notification(int p_what) { } void Popup::_close_pressed() { - Window *parent_window = parent_visible; if (parent_visible) { parent_visible->disconnect("focus_entered", callable_mp(this, &Popup::_parent_focused)); @@ -99,7 +95,6 @@ void Popup::set_as_minsize() { set_size(get_contents_minimum_size()); } void Popup::_bind_methods() { - ADD_SIGNAL(MethodInfo("popup_hide")); } @@ -133,7 +128,6 @@ Rect2i Popup::_popup_adjust_rect() const { } Popup::Popup() { - parent_visible = nullptr; set_wrap_controls(true); @@ -149,7 +143,6 @@ Popup::~Popup() { } Size2 PopupPanel::_get_contents_minimum_size() const { - Ref<StyleBox> p = get_theme_stylebox("panel", get_class_name()); Size2 ms; @@ -171,7 +164,6 @@ Size2 PopupPanel::_get_contents_minimum_size() const { } void PopupPanel::_update_child_rects() { - Ref<StyleBox> p = get_theme_stylebox("panel", get_class_name()); Vector2 cpos(p->get_offset()); @@ -196,21 +188,17 @@ void PopupPanel::_update_child_rects() { } void PopupPanel::_notification(int p_what) { - if (p_what == NOTIFICATION_THEME_CHANGED) { panel->add_theme_style_override("panel", get_theme_stylebox("panel", get_class_name())); } else if (p_what == NOTIFICATION_READY || p_what == NOTIFICATION_ENTER_TREE) { - panel->add_theme_style_override("panel", get_theme_stylebox("panel", get_class_name())); _update_child_rects(); } else if (p_what == NOTIFICATION_WM_SIZE_CHANGED) { - _update_child_rects(); } } PopupPanel::PopupPanel() { - panel = memnew(Panel); add_child(panel); } |