Sun-Valley-ttk-theme icon indicating copy to clipboard operation
Sun-Valley-ttk-theme copied to clipboard

Gif branch problems

Open xdanielc opened this issue 2 years ago • 9 comments

There's no documentation for how to install the gif brach, ~~replacing files didin't work for me.~~ I'm on windows 10, using python 3.10

Edit: Alright you have to replace the themes folder, nothing else Anyway, gif branch seems as slow when resizing, I would rename this to gif brach problems now.

xdanielc avatar Aug 08 '22 15:08 xdanielc

There's no documentation for how to install the gif brach

Yeah it isn't on Pypi, you can download it only from here.

Anyway, gif branch seems as slow when resizing, I would rename this to gif brach problems now.

Hmmm... Interesting. The point of making ttk themes with gif images is to increase its speed, so if even that is laggy, I can't really do much more to optimize it.

I don't experience any lagging on a 13-year-old computer running Debian, with either the png or gif versions, so this may be a limitation of the Windows port of Tkinter.

rdbende avatar Aug 08 '22 23:08 rdbende

Oh, so we use the theme the window will be laggy and thw window resize with be to slow (When my window resize the CPU using is high and exponential growth )?

littlewhitecloud avatar Aug 28 '22 10:08 littlewhitecloud

Even there is no doc to install the gif branch, but i successed, @xdanielc, you can see my github project "CodeNoteBook", i replace the png branch to gif branch, it looks great, the scrollerbar is good than png branch, but the window is still laggy, but CPU using is slow... okay, not really slow, just kick down a little.

littlewhitecloud avatar Aug 28 '22 11:08 littlewhitecloud

The CPU usage is indeed higher (like 40-50%) when resizing the window, but unfortunately I can't address that issue here. It's simply the nature of ttk. It uses png/gif images for widget parts, and cropping, copying and scaling them is just slow 😕

rdbende avatar Aug 29 '22 21:08 rdbende

Doing further experiments, I realized, that the 40-50% is not that bad compared to other, quite simple applications. For example my screenshot tool and emoji selector (both Qt-based) have around the same CPU-usage when resizing the window, though without lagging.

rdbende avatar Aug 29 '22 21:08 rdbende

Why can't thinter's author update tkinter and fix tkinter...

littlewhitecloud avatar Aug 30 '22 10:08 littlewhitecloud

Or just tkinter.ttk's author find a way to fix ttk widget image show

littlewhitecloud avatar Aug 30 '22 10:08 littlewhitecloud

Because it's not that easy. First, Tkinter uses an other GUI toolkit under the hood, called Tcl/Tk, so it cannot be fixed in Tkinter itself. And second, Tcl/Tk was originally written for X11 windowing systems, and uses an Xlib Emulation Layer (XLEL) on Windows to render stuff, which makes it slower.

rdbende avatar Aug 30 '22 10:08 rdbende

......ay

littlewhitecloud avatar Aug 30 '22 10:08 littlewhitecloud