From f2ea0d994214345437d94e170b049fc1bc13d44b Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Mon, 4 Apr 2022 13:26:40 -0500 Subject: [PATCH] Maybe final container fill mode fix? --- lib/cyberarm_engine/ui/elements/container.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cyberarm_engine/ui/elements/container.rb b/lib/cyberarm_engine/ui/elements/container.rb index a45e01b..6c0baff 100644 --- a/lib/cyberarm_engine/ui/elements/container.rb +++ b/lib/cyberarm_engine/ui/elements/container.rb @@ -139,8 +139,8 @@ module CyberarmEngine space_available_width = ((@parent.content_width - (@parent.children.reject { |c| c.style.fill }).map(&:outer_width).sum) / fill_siblings).round space_available_height = ((@parent.content_height - (@parent.children.reject { |c| c.style.fill }).map(&:outer_height).sum) / fill_siblings).round - @width = space_available_width - inner_width if @parent.is_a?(Flow) - @height = space_available_height - inner_height if @parent.is_a?(Stack) + @width = space_available_width - noncontent_width if @parent.is_a?(Flow) + @height = space_available_height - noncontent_height if @parent.is_a?(Stack) # pp ["siblings: #{fill_siblings}", "parent is #{@parent.inspect}", [@parent.content_width, space_available_width, @width, outer_width], [@parent.content_height, space_available_height, @height, outer_height]] end