gui1: Reuse an unchanged max instead of recalculating it

Counts as a minor cleanup of commit
045bda037d78056866bdd918b51708d44d2bf515.