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

Is it possible to change only specific widgets ? #92

Closed
YoussefEssalhi opened this issue Jun 27, 2023 · 5 comments
Closed

Is it possible to change only specific widgets ? #92

YoussefEssalhi opened this issue Jun 27, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@YoussefEssalhi
Copy link

Hy,

I would like to propose an enhancement theme based on my observations, instead Change Everything,
Change only specific widgets like Treeview or Scrollbar ! like this

from sv_ttk import SVTreeview

or

from sv_ttk import SVTreeview, SVScrollbar

Thus, it will not be affected the app When using other packages like Customthinker as an example.

By introducing this enhancement into the theme, users would gain the freedom to arrange and style the app in a manner that best aligns with their unique needs and visual preferences. This level of customization would greatly enhance the overall user experience and provide a more tailored solution for a wider range of projects.

Considering the potential impact and demand for such customization capabilities, I believe that this enhancement would not only benefit me but also a significant number of other users within the python community.

By The Way, Thanks @rdbende for this theme

@rdbende
Copy link
Owner

rdbende commented Jul 9, 2023

Hi Youssef!

It's not currently possible to apply the theme to specific widgets only. The theme is defined in a separate namespace and is evaluated in one piece. So importing the styles individually won't work, because all the other styles will be evaluated as well.
It would be possible to split it into individual styles, but that would be tedious, introduce bugs, and generally I don't think it's a good idea.

A theme is a theme after all. It gives a consistent style to all the widgets and makes them feel like they belong together.
I don't see any reason why you would want to mix two different widget styles. Things like "Oh, I kind of like this progressbar from ttkbootstrap, but I also want the scrollbar style from the Sun Valley theme" don't make sense to me. I understand that there are "unique needs and visual preferences", but that's not how UI works. Consistency is always a key to a good user experience._

People usually use this theme because they want their application to have a Windows 11 style, but mixing it with something else makes that imitation pointless. It will just look messy.
However, I understand that a lot of tkinter users don't care about good UX, only modern UI (no offense), so this feature might come in handy for them :D

I have a pretty bad opinion on Customtkinter, but I won't go into that here. sv_ttk is objectively superior to Customtkinter in almost every way, so I don't think you should mix them.
However, if you really want to, I believe you already can. Since Customtkinter implements a whole new widget set that works entirely differently, they won't pick up the sv_ttk styling, so you can safely put in some tkinter.ttk widgets, and only those will get the Sun Valley theme.

I could also be missing some points. There may be other reasons why this feature would still be useful.

@rdbende rdbende added the enhancement New feature or request label Jul 9, 2023
@YoussefEssalhi
Copy link
Author

Yeah, I Strongly agree with u

the main goal is to provide the best possible user experience

and yeah :D,

I appreciate your insights also and if any further points for this, please let me know. Thanks dude

@sumeshir26
Copy link
Contributor

@rdbende May I ask why you do not like Customtkinter?

@YoussefEssalhi YoussefEssalhi closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2023
@rdbende
Copy link
Owner

rdbende commented Jul 13, 2023

First of all, I have to say that I really like the idea, but the implementation is bad IMO.

So let's start with what I like about Customtkinter:

  • It is customizable (hence the name lol :D).
  • It has a great number of extension widgets that fit the style well.

But then here are my reasons why I don't like it:

  • It's a completely new toolkit.
    If you already have a tkinter/ttk application, you can't just apply a "Customtkinter theme" to it like you would do with ttk themes. It's a whole new set of widgets, and you have to migrate your app to it if you want to use it.
  • Not compatible with regular tkinter
    This wouldn't be a problem because ttk isn't compatible either. But as far as I can see, it kinda aims to be. Usually the widgets have the same methods/attributes, but sometimes they are buggy or don't work as intended, so it still feels a bit immature.
  • A canvas for each widget?
    I don't think this is really memory efficient, and it also makes the toolkit incredibly slow. Tkinter is really slow in itself, but with Customtkinter it's unbearable.
  • There is no antialiasing for the canvas in tkinter (except on macOS).
    This makes it look very bad (pixelated) on Windows and Linux.
  • Also the styling is kinda lame or eh?
    I just don't like the style. It looks clumsy and unprofessional.

Then what would I like to use instead?

Something like ttkbootstrap, but with more customization options. So a dynamically created ttk theme that is as customizable as Customtkinter, however such a theme would solve all my problems mentioned above (not a separate toolkit, you still use the same ttk widgets, no canvas-bloat and antialiasing).

@sumeshir26
Copy link
Contributor

First of all, I have to say that I really like the idea, but the implementation is bad IMO.

So let's start with what I like about Customtkinter:

  • It is customizable (hence the name lol :D).
  • It has a great number of extension widgets that fit the style well.

But then here are my reasons why I don't like it:

  • It's a completely new toolkit.
    If you already have a tkinter/ttk application, you can't just apply a "Customtkinter theme" to it like you would do with ttk themes. It's a whole new set of widgets, and you have to migrate your app to it if you want to use it.
  • Not compatible with regular tkinter
    This wouldn't be a problem because ttk isn't compatible either. But as far as I can see, it kinda aims to be. Usually the widgets have the same methods/attributes, but sometimes they are buggy or don't work as intended, so it still feels a bit immature.
  • A canvas for each widget?
    I don't think this is really memory efficient, and it also makes the toolkit incredibly slow. Tkinter is really slow in itself, but with Customtkinter it's unbearable.
  • There is no antialiasing for the canvas in tkinter (except on macOS).
    This makes it look very bad (pixelated) on Windows and Linux.
  • Also the styling is kinda lame or eh?
    I just don't like the style. It looks clumsy and unprofessional.

Then what would I like to use instead?

Something like ttkbootstrap, but with more customization options. So a dynamically created ttk theme that is as customizable as Customtkinter, however such a theme would solve all my problems mentioned above (not a separate toolkit, you still use the same ttk widgets, no canvas-bloat and antialiasing).

Interesting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants