Fix frame calculations for landscape orientation