Fixed element borders not always lining up when using dynamic width/height

This commit is contained in:
2019-12-19 11:17:31 -06:00
parent e59771e412
commit 52940d1cfe
2 changed files with 2 additions and 2 deletions

View File

@@ -212,7 +212,7 @@ module CyberarmEngine
raise "dimension must be either :width or :height" unless dimension == :width || dimension == :height
if size && size.is_a?(Numeric)
if size.between?(0.0, 1.0)
(@parent.send(:"content_#{dimension}") - self.send(:"noncontent_#{dimension}") - 1) * size
((@parent.send(:"content_#{dimension}") - self.send(:"noncontent_#{dimension}") - 1) * size).round
else
size
end

View File

@@ -112,7 +112,7 @@ module CyberarmEngine
height: 36,
background: 0xff111111,
fraction_background: [0xffc75e61, 0xffe26623],
border_thickness: 4,
border_thickness: 1,
border_color: [0xffd59674, 0xffff8746]
}
}.freeze