Fix applet centering by spacers
Prior to this fix, when using spacers to center an applet in a panel, the applet would be centered in the available space. However, the desired behavior is for the applet to be centered in the middle of the panel, just as it was in Plasma 5.27.
Inside of this bug report are screenshots to better describe the issue.
The reason of this bug are the api changes in KF6. Prior to this fix, the code would try to call nonexistent properties. Resulting in the optimalSize property being NaN.