Fix CCS vitals layout
This commit is contained in:
@@ -324,15 +324,20 @@ func _render_vitals(vitals: Dictionary) -> void:
|
||||
var rows := _build_vital_rows(vitals)
|
||||
for row in rows:
|
||||
var name_label := Label.new()
|
||||
name_label.custom_minimum_size.x = 230.0
|
||||
name_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
name_label.add_theme_font_size_override("font_size", 19)
|
||||
name_label.add_theme_color_override("font_color", Color(0.18, 0.25, 0.31))
|
||||
name_label.text = "%s:" % str(row.get("label", "Vital sign"))
|
||||
vitals_rows.add_child(name_label)
|
||||
var value_label := Label.new()
|
||||
value_label.custom_minimum_size.x = 230.0
|
||||
value_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
value_label.add_theme_font_size_override("font_size", 19)
|
||||
value_label.add_theme_color_override("font_color", Color(0.04, 0.09, 0.13))
|
||||
value_label.text = str(row.get("value", ""))
|
||||
value_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
value_label.autowrap_mode = TextServer.AUTOWRAP_OFF
|
||||
value_label.clip_text = true
|
||||
vitals_rows.add_child(value_label)
|
||||
vitals_rows.visible = not rows.is_empty()
|
||||
vitals_empty.visible = rows.is_empty()
|
||||
|
||||
Reference in New Issue
Block a user