Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve existing checkbox images, easier overrride for new images #67

Open
WinEunuuchs2Unix opened this issue Oct 24, 2020 · 2 comments

Comments

@WinEunuuchs2Unix
Copy link

Firstly, CheckboxTreeview() is awesome!

Secondly, the images for "checked", "unchecked" and "tristate" shown below in Gimp at 1600% magnification reveal shadows which shows up on our screens making it harder to tell the difference between images.

Lastly, can we make it easier to pass IM_CHECKED, IM_UNCHECKED and IM_TRISTATE keywords to init_ for the three images? My fonts are on HDPI monitors and such are about 40% larger than the checkboxes so I'll be creating new images. This code I believe needs to be changed to allow passing keyword image arguments:


# checkboxes are implemented with pictures
self.im_checked = ImageTk.PhotoImage(Image.open(IM_CHECKED), master=self)
self.im_unchecked = ImageTk.PhotoImage(Image.open(IM_UNCHECKED), master=self)
self.im_tristate = ImageTk.PhotoImage(Image.open(IM_TRISTATE), master=self)

Gimp screenshot of existing images zoomed to 1600%:

image

@RedFantom
Copy link
Member

a490457 contains changes to four lines of code that implement overrides for the state images of CheckboxTreeview, I think that is a good addition. However, I don't quite understand how the shadows make it harder to tell the differences between images. Could you perhaps elaborate on this a bit more?

Tkinter indeed does not offer HiDPI scaling by default, but there are methods to achieve scaling. However, if you do make new images and they can be licensed under GNU GPLv3, please do open a PR, as the addition of new images for HiDPI monitors would be a good enhancement.

@WinEunuuchs2Unix
Copy link
Author

@RedFantom I regret suggesting image shadows should be removed. Now I think they are fine. I did write code to generate new images on the fly as font size is increased for HiDPI monitors. I posted the solution in Stack Overflow: CheckboxTreeview() - scale size of checkboxes, change colors. At the same time I allowed changing checkbox outline color, fill color and checked / tristate color. An enhancement to this code would be options for style of check mark and tristate. Another enhancement would be the creation of shadows.

Sorry for delay in replying. I didn't get an email there was a comment here. gmail sends mail to "Forums" folder instead of in-box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants