Dynamicly changes margins depending on size of window in row-mode