fix(ui): correct Godot 4.6 size flag constants
SIZE_FLAGS_FILL → SIZE_FILL, SIZE_FLAGS_SHRINK_END → SIZE_SHRINK_END. The _FLAGS_ prefix was removed in Godot 4.6. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ func _init(text: String = "", color: Color = Color.TRANSPARENT) -> void:
|
||||
_color_override = color
|
||||
mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
size_flags_horizontal = Control.SIZE_FLAGS_FILL
|
||||
size_flags_horizontal = Control.SIZE_FILL
|
||||
|
||||
|
||||
func set_content(text_value: String, color: Color = Color.TRANSPARENT) -> void:
|
||||
|
||||
@@ -19,7 +19,7 @@ func _init(title: String = "", subtitle: String = "") -> void:
|
||||
|
||||
func _ready() -> void:
|
||||
add_theme_constant_override("separation", 0)
|
||||
size_flags_horizontal = Control.SIZE_FLAGS_FILL
|
||||
size_flags_horizontal = Control.SIZE_FILL
|
||||
_title_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
_subtitle_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
add_child(_title_label)
|
||||
|
||||
@@ -15,7 +15,7 @@ var _vbox: VBoxContainer
|
||||
|
||||
func _ready() -> void:
|
||||
# Constrain panel to its custom_minimum_size width
|
||||
size_flags_horizontal = Control.SIZE_FLAGS_SHRINK_END
|
||||
size_flags_horizontal = Control.SIZE_SHRINK_END
|
||||
clip_contents = true
|
||||
|
||||
_vbox = VBoxContainer.new()
|
||||
|
||||
@@ -15,7 +15,7 @@ func _init(content: String = "", max_lines: int = -1) -> void:
|
||||
scroll_active = false
|
||||
mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
size_flags_horizontal = Control.SIZE_FLAGS_FILL
|
||||
size_flags_horizontal = Control.SIZE_FILL
|
||||
|
||||
|
||||
func set_content(content: String, max_lines: int = -1) -> void:
|
||||
|
||||
Reference in New Issue
Block a user