Below you can see the front-view size comparison of the Canon G5 X and Panasonic GX7. The Canon G5 X is 11 mm narrower and 11 mm thinner than the Panasonic GX7 but it is also 5 mm taller.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.