worm icon indicating copy to clipboard operation
worm copied to clipboard

Setting button-size larger than value at first render causes clipped image

Open lambdadog opened this issue 3 years ago • 2 comments

It took me a bit to hunt down exactly the circumstances of this bug, but what buttonSize is set to at first render seems to be a "max" for button-size changes without clipping after that.

Due to this, it's possible to increase button-size from 14 by setting it in your rcfile (which is executed before first render), but any increases at runtime cause the image to be clipped on the right side.

ex:

(with button-size set to 20 in rcfile) wormc20

(after wormc button-size 22 is run) wormc22

lambdadog avatar Apr 09 '22 20:04 lambdadog

If you don't set button-size in your rcfile this manifests as clipping for any button-size greater than 14, as 14 is the default initial value.

lambdadog avatar Apr 09 '22 20:04 lambdadog

~~This can actually be fixed by triggering a re-render by moving the window around or resizing it~~. The issue is I think the image is re-rendered without the window being resized in the section of the ClientMessage handler which sets button-size. I'll try to fix tomorrow.

codic12 avatar Apr 10 '22 05:04 codic12