Make bottom panel into available dock slot

This commit is contained in:
kobewi 2025-11-15 13:31:08 +01:00
parent b79fe2e020
commit 67735cf213
30 changed files with 594 additions and 422 deletions

View file

@ -33,6 +33,7 @@
#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/os/os.h"
#include "editor/docks/editor_dock.h"
#include "editor/editor_node.h"
#include "editor/editor_string_names.h"
#include "editor/gui/editor_bottom_panel.h"
@ -1367,6 +1368,18 @@ void FindInFilesContainer::_bind_methods() {
ADD_SIGNAL(MethodInfo("close_button_clicked"));
}
void FindInFilesContainer::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
// TODO: Replace this hack once FindInFilesContainer is converted to a dock. It should be in the constructor.
EditorDock *parent = Object::cast_to<EditorDock>(get_parent());
if (parent) {
parent->set_clip_contents(false);
}
} break;
}
}
void FindInFilesContainer::_on_theme_changed() {
const Ref<StyleBox> bottom_panel_style = EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles));
if (bottom_panel_style.is_valid()) {