Right. When you’re designing a dam, for example, the depth is used, while how long/big the river/lake is is not. The free body diagram will show the force on the dam as a triangle, with zero pressure on the top and rho g h (densityforce of gravitydepth (height) of the fluid).