(Suggestion) Add the ability to pass custom dark and light themes to QGoodWindow (2.1)
kresimirko opened this issue · 9 comments
Hello again!
I'm loving the 2.1 update so far and I've noticed that QGoodWindow now has built in dark and light themes. However, as far as I know, these things are hardcoded and I think passing custom themes through an API call or two would be nice.
In fact, I might be able to implement this myself and create a pull request later.
@kresimirko: Hello again!
What I would like to recommend to you is create a fork of QGoodWindow, apply the changes you think appropriate and point me when the changes has been finished. So, when both we agree with the changes, you submit the pull request and if everything is OK, i will merge the request and release a new version of QGoodWindow with your changes.
This if you want to submit a pull request.
Thanks!
(Sorry, I replied with my old account.)
Thanks for responding.
I've realized that I probably shouldn't create a pull request of any kind for this sort of thing (even if it's something minor) since I'm really not that familiar with C++ and modifying source code in general. I also don't want to stray off too far from this library's style and structuring plus I haven't really collaborated with someone like this.
So, to sum up, I'm not gonna make a pull request for this (at least not for now). I'll leave the issue open, though.
@kresimirko: OK! I'm thinking on how to add your request to the library.
Thanks!
@kresimirko: By the way, if you want to set custom light and dark themes, simple dismiss the call of setAppDarkTheme()
and setAppLightTheme()
and set the style as following:
qApp->setStyle(new MyOwnStyle());
qApp->style()->setObjectName("fusion");
The style can be a modified version of the provided light and dark styles.
With this you achieve the customization wanted?
@kresimirko: OK! I'm thinking on how to add your request to the library.
Thanks!
My ideas were as follows:
- allow passing custom stylesheets and QPalettes into some sort of class that could then be used as a theme
- these classes could then be set as light/dark themes dynamically, which could then be applied
- there'd be an API call that enables automatic theme change on system theme change, just like in the GoodShowCase example
I might do something like this on my own separate from this library, but, again, I don't want to touch this library itself since I don't quite understand its structure and I've never really modified one's code.
@kresimirko: By the way, if you want to set custom light and dark themes, simple dismiss the call of
setAppDarkTheme()
andsetAppLightTheme()
and set the style as following:qApp->setStyle(new MyOwnStyle()); qApp->style()->setObjectName("fusion");
The style can be a modified version of the provided light and dark styles.
With this you achieve the customization wanted?
Thanks for telling me this, I don't know how I didn't think about this earlier. I'll try to remove those calls later.
@kresimirko: Actually I'm not planning to add an API for this and make the solution proposed here documented in the future.
Okay, I'm gonna close this issue then.