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

Separating ttkthemes and tkimg #32

Closed
5 tasks done
RedFantom opened this issue May 20, 2018 · 2 comments
Closed
5 tasks done

Separating ttkthemes and tkimg #32

RedFantom opened this issue May 20, 2018 · 2 comments

Comments

@RedFantom
Copy link
Member

RedFantom commented May 20, 2018

As described in #22, separating tkimg from ttkthemes would improve platform compatibility, possibly negate issues with loading the library and still provide the possibility for all platforms to load all themes.

My design proposal is as follows:
Build a separate package named tkimg, that provides a function to load the tkimg library into a given Tcl interpreter (belonging to a Tk instance). This package could be installed with an installation parameter.
The themes can be split into two categories: plain GIF-themes, that always can be loaded by Tkinter, and PNG-themes. Currently, only theme arc is PNG-based. Its images should be converted to GIF-format (d2b75c9), then the artifacts should be fixed. Then the following folder structure could be used for the themes:

themes/
├ basic
|  ├ plastik
|  ├ kroc
|  └ basic.tcl (pkgIndex.tcl eq.)
├ gif
|  ├ arc (with GIF-files)
|  └ gif.tcl (pkgIndex.tcl eq.)
└ png
   ├ arc (with PNG-files)
   └ png.tcl (pkgIndex.tcl eq.)

Then, based on whether TkImg could be loaded or Tk 8.6 is present, either png.tcl or gif.tcl is evaluated.

Thus, in steps:

  • Build TkImg package and publish to PyPI
  • Fix conversion artifacts in arc theme
  • Build folder structure and write different package index files
  • Remove TkImg from ttkthemes and implement installation option
  • Implement TkImg check for set_theme_advanced
@RedFantom
Copy link
Member Author

This issue is progressing over here.

@RedFantom
Copy link
Member Author

Done and done!

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

1 participant