diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-08 15:30:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 15:30:51 +0200 |
commit | 5d69dd16315d892743cd56e64959ce83c4476f48 (patch) | |
tree | 03d1806c646b6c4746e4a50801b0cfb26aba19ce /editor/editor_properties.cpp | |
parent | c8cdc10902312e19fcdaa3a39755f783649d6c81 (diff) | |
parent | caa0cdaac66b97b5c2cdcddeb0cfa1820a6c22af (diff) |
Merge pull request #63173 from fire-forge/layers-grid
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r-- | editor/editor_properties.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 5e66d436fc..f434df3a1e 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1147,6 +1147,17 @@ void EditorPropertyLayersGrid::_bind_methods() { ADD_SIGNAL(MethodInfo("rename_confirmed", PropertyInfo(Variant::INT, "layer_id"), PropertyInfo(Variant::STRING, "new_name"))); } +void EditorPropertyLayers::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_ENTER_TREE: + case NOTIFICATION_THEME_CHANGED: { + button->set_normal_texture(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons"))); + button->set_pressed_texture(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons"))); + button->set_disabled_texture(get_theme_icon(SNAME("GuiTabMenu"), SNAME("EditorIcons"))); + } break; + } +} + void EditorPropertyLayers::_set_read_only(bool p_read_only) { button->set_disabled(p_read_only); grid->set_read_only(p_read_only); @@ -1283,9 +1294,9 @@ EditorPropertyLayers::EditorPropertyLayers() { grid->set_h_size_flags(SIZE_EXPAND_FILL); hb->add_child(grid); - button = memnew(Button); + button = memnew(TextureButton); + button->set_stretch_mode(TextureButton::STRETCH_KEEP_CENTERED); button->set_toggle_mode(true); - button->set_text("..."); button->connect("pressed", callable_mp(this, &EditorPropertyLayers::_button_pressed)); hb->add_child(button); |