summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-05-29 18:39:05 +0200
committerRémi Verschelde <remi@verschelde.fr>2016-05-29 18:39:05 +0200
commitc2b13156895ede907166c25098f4d01b7edc635b (patch)
tree68bff348bf6587ad6793e0956f940bd1d83514c3 /tools
parent96bdab6edfb2834a07add23cd3892a599ee9bfa4 (diff)
parent62de01ae3b9076682f7f19039c00f98fe7763625 (diff)
Merge pull request #4847 from Hinsbart/fix_icon_scale_new
Proper alignment and fixed scaling for TileMapEditor tile icons.
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index a5147851ac..6d5f2a519c 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -205,7 +205,9 @@ void TileMapEditor::_update_palette() {
if (tiles.empty())
return;
+
palette->set_max_columns(0);
+ palette->add_constant_override("hseparation", 6);
palette->set_icon_mode(ItemList::ICON_MODE_TOP);
palette->set_max_text_lines(2);
@@ -239,6 +241,8 @@ void TileMapEditor::_update_palette() {
palette->set_item_metadata(palette->get_item_count()-1, E->get());
}
+
+ palette->set_same_column_width(true);
if (selected != -1)
set_selected_tile(selected);
@@ -1210,10 +1214,7 @@ void TileMapEditor::_tileset_settings_changed() {
void TileMapEditor::_icon_size_changed(float p_value) {
if (node) {
- Size2 size = node->get_cell_size() * p_value;
- palette->set_min_icon_size(size + Size2(4, 0)); //4px gap between tiles
- palette->set_icon_stretch_to_max_size(true);
- palette->set_max_icon_size(size);
+ palette->set_icon_scale(p_value);
_update_palette();
}
}