It doesn't have to depend on the grid. You can select/highlight a group of icons or buttons. The button that is solid red is your anchor position. With your mouse you can left click and hit shift to change your anchor button. From there you can align the rest of the highlighted buttons to the same vertical or horizontal position. You can't just auto adjust all icons to fit. The align buttons are in the toolbar.
"Just when I thought you couldn't possibly be any dumber, you go and do something like this... and totally redeem yourself!"