From 55db8438bbf23ee0421e3b34d2485c9615619130 Mon Sep 17 00:00:00 2001 From: Face <69168154+face-hh@users.noreply.github.com> Date: Tue, 9 Sep 2025 17:47:48 +0300 Subject: [PATCH] fix div w-full --- flumi/Scripts/Engine/StyleManager.gd | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flumi/Scripts/Engine/StyleManager.gd b/flumi/Scripts/Engine/StyleManager.gd index 7cad2c0..9c96e8c 100644 --- a/flumi/Scripts/Engine/StyleManager.gd +++ b/flumi/Scripts/Engine/StyleManager.gd @@ -68,13 +68,18 @@ static func apply_element_styles(node: Control, element: HTMLParser.HTMLElement, if width == "100%": node.size_flags_horizontal = Control.SIZE_EXPAND_FILL node.custom_minimum_size.x = 0 + if node is PanelContainer and node.get_child_count() > 0: + var vbox = node.get_child(0) + if vbox is VBoxContainer: + vbox.size_flags_horizontal = Control.SIZE_EXPAND_FILL + node.set_meta("size_flags_set_by_style_manager", true) else: # For other percentages, convert to viewport-relative size var percent = float(width.replace("%", "")) / 100.0 var viewport_width = node.get_viewport().get_visible_rect().size.x if node.get_viewport() else 800 node.custom_minimum_size.x = viewport_width * percent - node.set_meta("size_flags_set_by_style_manager", true) - node.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN + node.set_meta("size_flags_set_by_style_manager", true) + node.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN else: node.custom_minimum_size.x = width node.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN