Comment 28 for bug 1467252

Revision history for this message
Gilles-Philippe Leblanc (gilles-philippe-leblanc) wrote :

Oh, I see! I understand more now. We didn't test this case but the problem is not that the On switch is larger than the no one since the server use only the larger one.

See in htdocs/lib/form/elements/switchbox.php:
$strlength = max(strlen($onlabel), strlen($offlabel));
$width = floor((57 + (($strlength - 2) * 3.5) + pow(1.4, ($strlength - 2)))) . 'px';

My educated guess is that this formula is incorrect. I admit to do not understand it but if someone is able to explain it I'll be interested :)

I'm already into rewrite it and I'm pretty sure this will fix this.