cc00bbb22010 tried to prevent the places panel from reopening with a
width reduced by 1px compared to the previous invocation of the file
While the patch worked on the surface when it was applied, the actual
reasoning was wrong: The difference was not because of "extra resize()
events", but because of a mismatch between what was read from the config
(placesViewWidth) and what was written to the config (sizes).
The actual reason placesViewWidth and sizes are different is
because of a previous error: It is assumed that the splitter sizes sum
up to availableWidth, while in reality this width also contains the
width of the splitter handle. Upon setSizes, Qt equally takes away
width from both sides of the splitter to make everything fit.
While for the Oxygen and Fusion styles (3px and 4px splitter handle
width, respectively) an adjustment of 1px did the trick, for Breeze with
its splitter handle width of only 1px this did not work anymore due to
rounding errors, it resulted in the config entry incrementing by 1px for
every invocation of the dialog.
To fix the problem for every style, we simply take the width of the
splitter handle into account and revert the previous fix. While we are
at it, we refactor to make everything more DRY.