fix: layer tree column widths are proportional
This commit is contained in:
parent
630641ceee
commit
ab300878cf
|
|
@ -25,8 +25,8 @@ void PrimitiveLayerList::generate_subtree(size_t idx, Ref<TerrainPrimitive> prim
|
|||
base->set_expand_right(ICON_COLUMN, false);
|
||||
|
||||
base->set_text(IDX_COLUMN, vformat("%d", idx));
|
||||
base->set_expand_right(IDX_COLUMN, false);
|
||||
base->set_editable(IDX_COLUMN, true);
|
||||
base->set_expand_right(IDX_COLUMN, false);
|
||||
|
||||
base->set_text(NAME_COLUMN, prim->get_name().is_empty() ? prim->get_class() : prim->get_name());
|
||||
base->set_editable(NAME_COLUMN, true);
|
||||
|
|
@ -49,6 +49,10 @@ void PrimitiveLayerList::regenerate_tree(Array array) {
|
|||
++i;
|
||||
}
|
||||
}
|
||||
set_column_expand(ICON_COLUMN, false);
|
||||
set_column_expand(IDX_COLUMN, false);
|
||||
set_column_custom_minimum_width(IDX_COLUMN, 32);
|
||||
set_column_expand(NAME_COLUMN, true);
|
||||
}
|
||||
|
||||
void PrimitiveLayerList::switch_index(size_t from, size_t to) {
|
||||
|
|
|
|||
|
|
@ -198,7 +198,10 @@ terrain = NodePath("../../../../../../TerrainMeshEditor")
|
|||
[node name="Tree" type="PrimitiveLayerList" parent="LeftPanel/VBoxContainer/Layers/Layers" unique_id=797700186 node_paths=PackedStringArray("terrain")]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
hide_root = true
|
||||
scroll_horizontal_enabled = false
|
||||
scroll_hint_mode = 2
|
||||
tile_scroll_hint = true
|
||||
terrain = NodePath("../../../../../TerrainMeshEditor")
|
||||
icons = {
|
||||
&"NoisePrimitive": ExtResource("5_eqbpn"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue