Closed israel-dryer closed 3 years ago
40 pixels seems to be the optimum width of the image. I adjusted both the separator and the scale widget to be 40 pixels wide or high for the horizontal and vertical orientations, respectively.
Good catch! I haven't used any separators myself so never noticed this, but you're right that it does seem to affect the demo a lot. Have you checked what it's like when scrolling too?
I haven't noticed any issue when scrolling.
Great, using 40px looks like a good solution then
@daniilS , I was testing the performance of resizing the screen and noticed significant lag in resizing compared to the regular built-in themes when resizing the demo program. The culprit is the `ttk.Separator``, which I discovered when commenting out each widget to isolate the issue.
The think the reason this is happening is because tkinter replicates the image to fill in the additional space. With a 1x1 pixel image used as the source, it has to do this ALOT. Simply expanding the image size to 10x1 significantly improved performance. I'm still playing around the optimal size of this image, but this is something to keep in mind for future development.
This issue should only affect widgets which can be expanded... so this could also affects the Progress bar, technically. Though, I did not notice any performance issue with the Progress bar because the trough is already an 8x8 square. So the impact is felt less. Regardless, I'll test different sizes.