mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Add leftover scroll hints, and panels for scrollables without hints
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include "editor/settings/editor_settings.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
#include "scene/gui/separator.h"
|
||||
|
||||
#include "modules/modules_enabled.gen.h" // For mono.
|
||||
@@ -1326,11 +1327,15 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
|
||||
class_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
class_list->set_hide_root(true);
|
||||
class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
|
||||
class_list->set_scroll_hint_mode(Tree::SCROLL_HINT_MODE_BOTH);
|
||||
class_list->connect("cell_selected", callable_mp(this, &EditorBuildProfileManager::_class_list_item_selected));
|
||||
class_list->connect("item_edited", callable_mp(this, &EditorBuildProfileManager::_class_list_item_edited), CONNECT_DEFERRED);
|
||||
class_list->connect("item_collapsed", callable_mp(this, &EditorBuildProfileManager::_class_list_item_collapsed));
|
||||
|
||||
// It will be displayed once the user creates or chooses a profile.
|
||||
main_vbc->add_margin_child(TTR("Configure Engine Compilation Profile:"), class_list, true);
|
||||
MarginContainer *mc = main_vbc->add_margin_child(TTRC("Configure Engine Compilation Profile:"), class_list, true);
|
||||
mc->set_theme_type_variation("NoBorderHorizontalWindow");
|
||||
mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
description_bit = memnew(EditorHelpBit);
|
||||
description_bit->set_content_height_limits(80 * EDSCALE, 80 * EDSCALE);
|
||||
|
||||
@@ -1028,6 +1028,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
|
||||
property_list->set_hide_folding(true);
|
||||
property_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
|
||||
property_list->connect("item_edited", callable_mp(this, &EditorFeatureProfileManager::_property_item_edited), CONNECT_DEFERRED);
|
||||
property_list->set_theme_type_variation("TreeSecondary");
|
||||
// It will be displayed once the user creates or chooses a profile.
|
||||
property_list_vbc->hide();
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ void EditorLayoutsDialog::_post_popup() {
|
||||
if (name->is_visible()) {
|
||||
name->grab_focus();
|
||||
} else {
|
||||
layout_names->grab_focus();
|
||||
layout_names->grab_focus(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,24 +115,20 @@ EditorLayoutsDialog::EditorLayoutsDialog() {
|
||||
|
||||
layout_names = memnew(ItemList);
|
||||
layout_names->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
layout_names->set_auto_height(true);
|
||||
layout_names->set_custom_minimum_size(Size2(300 * EDSCALE, 50 * EDSCALE));
|
||||
layout_names->set_visible(true);
|
||||
layout_names->set_offset(SIDE_TOP, 5);
|
||||
layout_names->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
layout_names->set_select_mode(ItemList::SELECT_MULTI);
|
||||
layout_names->set_allow_rmb_select(true);
|
||||
layout_names->set_scroll_hint_mode(ItemList::SCROLL_HINT_MODE_BOTH);
|
||||
layout_names->connect("multi_selected", callable_mp(this, &EditorLayoutsDialog::_update_ok_disable_state).unbind(2));
|
||||
MarginContainer *mc = makevb->add_margin_child(TTR("Select existing layout:"), layout_names);
|
||||
|
||||
MarginContainer *mc = makevb->add_margin_child(TTRC("Select Existing Layout:"), layout_names);
|
||||
mc->set_custom_minimum_size(Size2(300 * EDSCALE, 50 * EDSCALE));
|
||||
mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
mc->set_theme_type_variation("NoBorderHorizontalWindow");
|
||||
|
||||
name = memnew(LineEdit);
|
||||
makevb->add_child(name);
|
||||
name->set_placeholder(TTR("Or enter new layout name"));
|
||||
name->set_placeholder(TTRC("Or enter new layout name."));
|
||||
name->set_accessibility_name(TTRC("New layout name"));
|
||||
name->set_offset(SIDE_TOP, 5);
|
||||
name->set_anchor_and_offset(SIDE_LEFT, Control::ANCHOR_BEGIN, 5);
|
||||
name->set_anchor_and_offset(SIDE_RIGHT, Control::ANCHOR_END, -5);
|
||||
name->connect(SceneStringName(gui_input), callable_mp(this, &EditorLayoutsDialog::_line_gui_input));
|
||||
name->connect(SceneStringName(focus_entered), callable_mp(this, &EditorLayoutsDialog::_deselect_layout_names));
|
||||
name->connect(SceneStringName(text_changed), callable_mp(this, &EditorLayoutsDialog::_update_ok_disable_state).unbind(1));
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "editor/themes/editor_scale.h"
|
||||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/gui/tree.h"
|
||||
@@ -677,12 +678,17 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
|
||||
input_list_search->connect(SceneStringName(text_changed), callable_mp(this, &InputEventConfigurationDialog::_search_term_updated));
|
||||
manual_vbox->add_child(input_list_search);
|
||||
|
||||
MarginContainer *mc = memnew(MarginContainer);
|
||||
mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
mc->set_theme_type_variation("NoBorderHorizontalWindow");
|
||||
manual_vbox->add_child(mc);
|
||||
|
||||
input_list_tree = memnew(Tree);
|
||||
input_list_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
input_list_tree->set_scroll_hint_mode(Tree::SCROLL_HINT_MODE_BOTH);
|
||||
input_list_tree->connect("item_activated", callable_mp(this, &InputEventConfigurationDialog::_input_list_item_activated));
|
||||
input_list_tree->connect(SceneStringName(item_selected), callable_mp(this, &InputEventConfigurationDialog::_input_list_item_selected));
|
||||
input_list_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
manual_vbox->add_child(input_list_tree);
|
||||
mc->add_child(input_list_tree);
|
||||
|
||||
input_list_tree->set_hide_root(true);
|
||||
input_list_tree->set_columns(1);
|
||||
|
||||
Reference in New Issue
Block a user