You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Make bottom panel into available dock slot
This commit is contained in:
@@ -614,8 +614,6 @@ void FileSystemDock::_notification(int p_what) {
|
||||
file_list_search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
|
||||
file_list_button_sort->set_button_icon(get_editor_theme_icon(SNAME("Sort")));
|
||||
|
||||
button_dock_placement->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
|
||||
|
||||
if (is_layout_rtl()) {
|
||||
button_hist_next->set_button_icon(get_editor_theme_icon(SNAME("Back")));
|
||||
button_hist_prev->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
|
||||
@@ -2796,10 +2794,6 @@ void FileSystemDock::_rescan() {
|
||||
EditorFileSystem::get_singleton()->scan();
|
||||
}
|
||||
|
||||
void FileSystemDock::_change_bottom_dock_placement() {
|
||||
EditorDockManager::get_singleton()->bottom_dock_show_placement_popup(button_dock_placement->get_screen_rect(), this);
|
||||
}
|
||||
|
||||
void FileSystemDock::_change_split_mode() {
|
||||
DisplayMode next_mode = DISPLAY_MODE_TREE_ONLY;
|
||||
if (display_mode == DISPLAY_MODE_VSPLIT) {
|
||||
@@ -4086,10 +4080,11 @@ MenuButton *FileSystemDock::_create_file_menu_button() {
|
||||
}
|
||||
|
||||
void FileSystemDock::update_layout(EditorDock::DockLayout p_layout) {
|
||||
horizontal = p_layout == EditorDock::DOCK_LAYOUT_HORIZONTAL;
|
||||
if (button_dock_placement->is_visible() == horizontal) {
|
||||
bool new_horizontal = (p_layout == EditorDock::DOCK_LAYOUT_HORIZONTAL);
|
||||
if (horizontal == new_horizontal) {
|
||||
return;
|
||||
}
|
||||
horizontal = new_horizontal;
|
||||
|
||||
if (horizontal) {
|
||||
path_hb->reparent(toolbar_hbc, false);
|
||||
@@ -4119,7 +4114,6 @@ void FileSystemDock::update_layout(EditorDock::DockLayout p_layout) {
|
||||
set_file_list_display_mode(new_file_display_mode);
|
||||
set_custom_minimum_size(Size2(0, 0));
|
||||
}
|
||||
button_dock_placement->set_visible(horizontal);
|
||||
}
|
||||
|
||||
void FileSystemDock::save_layout_to_config(Ref<ConfigFile> &p_layout, const String &p_section) const {
|
||||
@@ -4211,8 +4205,8 @@ FileSystemDock::FileSystemDock() {
|
||||
set_name(TTRC("FileSystem"));
|
||||
set_icon_name("Folder");
|
||||
set_dock_shortcut(ED_SHORTCUT_AND_COMMAND("docks/open_filesystem", TTRC("Open FileSystem Dock"), KeyModifierMask::ALT | Key::F));
|
||||
set_default_slot(EditorDockManager::DOCK_SLOT_LEFT_BR);
|
||||
set_available_layouts(DOCK_LAYOUT_VERTICAL | DOCK_LAYOUT_HORIZONTAL);
|
||||
set_default_slot(DockConstants::DOCK_SLOT_LEFT_BR);
|
||||
set_available_layouts(DOCK_LAYOUT_ALL);
|
||||
|
||||
ProjectSettings::get_singleton()->add_hidden_prefix("file_customization/");
|
||||
|
||||
@@ -4292,13 +4286,6 @@ FileSystemDock::FileSystemDock() {
|
||||
button_toggle_display_mode->set_theme_type_variation("FlatMenuButton");
|
||||
toolbar_hbc->add_child(button_toggle_display_mode);
|
||||
|
||||
button_dock_placement = memnew(Button);
|
||||
button_dock_placement->set_theme_type_variation("FlatMenuButton");
|
||||
button_dock_placement->set_accessibility_name(TTRC("Dock Placement"));
|
||||
button_dock_placement->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_change_bottom_dock_placement));
|
||||
button_dock_placement->hide();
|
||||
toolbar_hbc->add_child(button_dock_placement);
|
||||
|
||||
toolbar2_hbc = memnew(HBoxContainer);
|
||||
top_vbc->add_child(toolbar2_hbc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user