mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Merge pull request #106780 from arkology/no-more-distraction
Add "Distraction Free Mode" button to `EditorBottomPanel` when bottom panel is expanded
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/gui/editor_toaster.h"
|
||||
#include "editor/gui/editor_version_button.h"
|
||||
#include "editor/scene/editor_scene_tabs.h"
|
||||
#include "editor/settings/editor_command_palette.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
@@ -186,6 +187,18 @@ void EditorBottomPanel::set_expanded(bool p_expanded) {
|
||||
|
||||
void EditorBottomPanel::_expand_button_toggled(bool p_pressed) {
|
||||
EditorNode::get_top_split()->set_visible(!p_pressed);
|
||||
|
||||
Button *distraction_free = EditorNode::get_singleton()->get_distraction_free_button();
|
||||
distraction_free->set_meta("_scene_tabs_owned", !p_pressed);
|
||||
EditorNode::get_singleton()->update_distraction_free_button_theme();
|
||||
if (p_pressed) {
|
||||
distraction_free->reparent(bottom_hbox);
|
||||
bottom_hbox->move_child(distraction_free, -2);
|
||||
} else {
|
||||
distraction_free->get_parent()->remove_child(distraction_free);
|
||||
EditorSceneTabs::get_singleton()->add_extra_button(distraction_free);
|
||||
}
|
||||
_theme_changed();
|
||||
}
|
||||
|
||||
void EditorBottomPanel::_update_center_split_offset() {
|
||||
|
||||
Reference in New Issue
Block a user