digital_electricity: Adapt tools text size with button
Fix problem of "Tools" text size being bigger than the size of the
button, by adjusting the scale of the text if the paintedWidth exceeds
the width of the toolButton:
scale: paintedWidth > toolButton.width ? (toolButton.width / paintedWidth) : 1
Fixed objects moving longer distances while traversing in zoomed out
mode by correcting the offset by which the objects should be moved in
the opposite direction. Previously, we were not considering the value of
"currenZoom" variable while shifting the objects, due to which the shift
was uniform irrespective of the current zoom amount, which is fixed by
multiplying the amount moved by currentZoom
Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>