mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +00:00
Merge pull request #81939 from YuriSizov/gui-flat-and-depressed
Replace flat buttons with flat-styled buttons with a visible pressed state
This commit is contained in:
commit
8ddf73c74d
40 changed files with 291 additions and 212 deletions
|
|
@ -1291,14 +1291,14 @@ GridMapEditor::GridMapEditor() {
|
|||
search_box->connect("gui_input", callable_mp(this, &GridMapEditor::_sbox_input));
|
||||
|
||||
mode_thumbnail = memnew(Button);
|
||||
mode_thumbnail->set_flat(true);
|
||||
mode_thumbnail->set_theme_type_variation("FlatButton");
|
||||
mode_thumbnail->set_toggle_mode(true);
|
||||
mode_thumbnail->set_pressed(true);
|
||||
hb->add_child(mode_thumbnail);
|
||||
mode_thumbnail->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_THUMBNAIL));
|
||||
|
||||
mode_list = memnew(Button);
|
||||
mode_list->set_flat(true);
|
||||
mode_list->set_theme_type_variation("FlatButton");
|
||||
mode_list->set_toggle_mode(true);
|
||||
mode_list->set_pressed(false);
|
||||
hb->add_child(mode_list);
|
||||
|
|
|
|||
|
|
@ -245,24 +245,29 @@ ReplicationEditor::ReplicationEditor() {
|
|||
add_pick_button->connect("pressed", callable_mp(this, &ReplicationEditor::_pick_new_property));
|
||||
add_pick_button->set_text(TTR("Add property to sync..."));
|
||||
hb->add_child(add_pick_button);
|
||||
|
||||
VSeparator *vs = memnew(VSeparator);
|
||||
vs->set_custom_minimum_size(Size2(30 * EDSCALE, 0));
|
||||
hb->add_child(vs);
|
||||
hb->add_child(memnew(Label(TTR("Path:"))));
|
||||
|
||||
np_line_edit = memnew(LineEdit);
|
||||
np_line_edit->set_placeholder(":property");
|
||||
np_line_edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
np_line_edit->connect("text_submitted", callable_mp(this, &ReplicationEditor::_np_text_submitted));
|
||||
hb->add_child(np_line_edit);
|
||||
|
||||
add_from_path_button = memnew(Button);
|
||||
add_from_path_button->connect("pressed", callable_mp(this, &ReplicationEditor::_add_pressed));
|
||||
add_from_path_button->set_text(TTR("Add from path"));
|
||||
hb->add_child(add_from_path_button);
|
||||
|
||||
vs = memnew(VSeparator);
|
||||
vs->set_custom_minimum_size(Size2(30 * EDSCALE, 0));
|
||||
hb->add_child(vs);
|
||||
|
||||
pin = memnew(Button);
|
||||
pin->set_flat(true);
|
||||
pin->set_theme_type_variation("FlatButton");
|
||||
pin->set_toggle_mode(true);
|
||||
hb->add_child(pin);
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ NavigationMeshEditor::NavigationMeshEditor() {
|
|||
bake_hbox = memnew(HBoxContainer);
|
||||
|
||||
button_bake = memnew(Button);
|
||||
button_bake->set_flat(true);
|
||||
button_bake->set_theme_type_variation("FlatButton");
|
||||
bake_hbox->add_child(button_bake);
|
||||
button_bake->set_toggle_mode(true);
|
||||
button_bake->set_text(TTR("Bake NavigationMesh"));
|
||||
|
|
@ -142,7 +142,7 @@ NavigationMeshEditor::NavigationMeshEditor() {
|
|||
button_bake->connect("pressed", callable_mp(this, &NavigationMeshEditor::_bake_pressed));
|
||||
|
||||
button_reset = memnew(Button);
|
||||
button_reset->set_flat(true);
|
||||
button_reset->set_theme_type_variation("FlatButton");
|
||||
bake_hbox->add_child(button_reset);
|
||||
button_reset->set_text(TTR("Clear NavigationMesh"));
|
||||
button_reset->set_tooltip_text(TTR("Clears the internal NavigationMesh vertices and polygons."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue