lib/cyberarm_engine/ui/element.rb in cyberarm_engine-0.9.0 vs lib/cyberarm_engine/ui/element.rb in cyberarm_engine-0.10.0

- old
+ new

@@ -160,29 +160,37 @@ y.between?(@y, @y + height) end def width if visible? - (@style.border_thickness_left + @style.padding_left) + @width + (@style.padding_right + @style.border_thickness_right) + inner_width + @width else 0 end end def outer_width @style.margin_left + width + @style.margin_right end + def inner_width + (@style.border_thickness_left + @style.padding_left) + (@style.padding_right + @style.border_thickness_right) + end + def height if visible? - (@style.border_thickness_top + @style.padding_top) + @height + (@style.padding_bottom + @style.border_thickness_bottom) + inner_height + @height else 0 end end def outer_height @style.margin_top + height + @style.margin_bottom + end + + def inner_height + (@style.border_thickness_top + @style.padding_top) + (@style.padding_bottom + @style.border_thickness_bottom) end private def dimensional_size(size, dimension) raise "dimension must be either :width or :height" unless dimension == :width || dimension == :height if size && size.is_a?(Numeric) \ No newline at end of file