Deprecate the cols and rows properties of Terminal

As cols and rows are read only (i.e. automatically determined by rect
and font size) there is no need for the properties to be exposed.
Instead, users can get the calculated cols and rows using the get_cols()
and get_rows() methods.
This commit is contained in:
Leroy Hopson 2022-08-15 10:35:01 +12:00
parent f49410838c
commit 6cd5facb98
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
8 changed files with 93 additions and 55 deletions

View file

@ -265,8 +265,8 @@ func _on_Panel_resized():
var size = tab_container.rect_size
if tabs.get_tab_count() > 0:
var terminal = tab_container.get_child(tabs.current_tab)
var cols = terminal.cols
var rows = terminal.rows
var cols = terminal.get_cols()
var rows = terminal.get_rows()
size_label.text = "Size: %d cols; %d rows\n(%d x %d px)" % [cols, rows, size.x, size.y]
else:
size_label.text = "Size:\n(%d x %d px)" % [size.x, size.y]