Size frame and canvas using config object