mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Make bottom panel into available dock slot
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -278,6 +278,7 @@ class FindInFilesContainer : public MarginContainer {
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
void _notification(int p_what);
|
||||
|
||||
void _on_find_in_files_result_selected(const String &p_fpath, int p_line_number, int p_begin, int p_end);
|
||||
void _on_find_in_files_modified_files(const PackedStringArray &p_paths);
|
||||
|
||||
@@ -4555,7 +4555,6 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
||||
find_in_files->connect("result_selected", callable_mp(this, &ScriptEditor::_on_find_in_files_result_selected));
|
||||
find_in_files->connect("files_modified", callable_mp(this, &ScriptEditor::_on_find_in_files_modified_files));
|
||||
find_in_files->connect("close_button_clicked", callable_mp(this, &ScriptEditor::_on_find_in_files_close_button_clicked));
|
||||
find_in_files->hide();
|
||||
find_in_files_button->hide();
|
||||
|
||||
history_pos = -1;
|
||||
|
||||
Reference in New Issue
Block a user