Answer the question
In order to leave comments, you need to log in
Is it possible to bind the size of widgets to the grid?
I would like to make a pixel-perfect design with a beautiful background, etc. etc.
I set the desired grid size in the form designer, for example, 10 pixels. And I do the position and size of the element with reference to the grid (snap checkboxes are enabled). It can be seen that the position of the control is attached to the grid, and the dimensions are 1 pixel larger. And so with all controls. It turns out that if I insert a 30*30 pixel image into a 31*31 pixel button, the edge will stick out, or the image will stretch to this pixel and the result will be a non-pixel-perfect soap.
Picture button. In one case, the button is 1 pixel wider and taller than the image. Those. this is the real width of the control, and "minus 1 when rendering".
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question