Skip to content

Commit

Permalink
Fixed grid.cr compilation errors
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
FireG3cko authored Aug 16, 2018
1 parent 889d92b commit 48b7b1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hedron/ui/grid.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48b7b1f

Please sign in to comment.