From 1a9c280dfccdb2cb6a4a00a729c00e41bfebb293 Mon Sep 17 00:00:00 2001 From: FireG3cko <35481250+FireG3cko@users.noreply.github.com> Date: Sun, 12 Aug 2018 17:36:21 -0400 Subject: [PATCH 1/2] Update grid.cr --- src/hedron/ui/grid.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hedron/ui/grid.cr b/src/hedron/ui/grid.cr index fcaa96a..d1704a9 100644 --- a/src/hedron/ui/grid.cr +++ b/src/hedron/ui/grid.cr @@ -10,7 +10,7 @@ module Hedron property align_x : Align property align_y : Align - def initialize(@size, @expand, @align); end + def initialize(@size, @expand, @align_x, @align_y); end end class Grid < Control From 48b7b1f6e866840649e586461b752c345602bac6 Mon Sep 17 00:00:00 2001 From: FireG3cko <35481250+FireG3cko@users.noreply.github.com> Date: Thu, 16 Aug 2018 02:20:05 -0400 Subject: [PATCH 2/2] Fixed grid.cr compilation errors Align_x and align_y were being interpreted as symbols. They're now specified as Aligns. @this was returning an error because it's supposed to be a Control*, not a Grid*. It's now casted using ui_control(). This patch compiles the grid_gallery.cr successfully on Linux. --- src/hedron/ui/grid.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hedron/ui/grid.cr b/src/hedron/ui/grid.cr index d1704a9..a03cfc1 100644 --- a/src/hedron/ui/grid.cr +++ b/src/hedron/ui/grid.cr @@ -10,12 +10,12 @@ module Hedron property align_x : Align property align_y : Align - def initialize(@size, @expand, @align_x, @align_y); end + def initialize(@size, @expand, @align_x : Align, @align_y : Align); end end class Grid < Control def initialize - @this = UI.new_grid + @this = ui_control(UI.new_grid) end def initialize(@this); end