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

Theme selector and dark theme #100

Merged
merged 3 commits into from
Apr 12, 2019
Merged

Theme selector and dark theme #100

merged 3 commits into from
Apr 12, 2019

Conversation

rurigk
Copy link
Contributor

@rurigk rurigk commented Apr 9, 2019

I only added a theme selector and a dark theme

Themes are loaded from a resource file

I forgot to put it as draft

@rurigk
Copy link
Contributor Author

rurigk commented Apr 9, 2019

It is necessary to correct some flaws in the themes

@kanryu
Copy link
Owner

kanryu commented Apr 10, 2019

@rurigk It's an interesting feature.
In order to actually introduce it, a new setting that switches on / off in the main menu or setting dialog is required. How did you implement it?

@rurigk
Copy link
Contributor Author

rurigk commented Apr 10, 2019

Take the other configurations as an example
It cost me a bit to know how that system worked since there are no comments

@rurigk
Copy link
Contributor Author

rurigk commented Apr 10, 2019

The only problem I saw when implementing it is that when you put an empty theme (Default) you lose styles of some elements

The dark theme is based on the subject of obs-studio with some small modifications
Do you have individually defined styles in the components?

@kanryu
Copy link
Owner

kanryu commented Apr 10, 2019

@rurigk In each ui file, some widgets customize their style sheets. If you change the overall display in the theme feature, you will need to be careful not to contradict it.

By the way, when I tried to build your repository, it seems that the symbol defined by Qt-5.12 called QPalette::PlaceholderText is used. I want to guarantee that I can build with Qt-5.9 for the time being, is it possible to fix your patch?

@rurigk
Copy link
Contributor Author

rurigk commented Apr 10, 2019

I will try to compile it in that version of qt
It will take me a while, my internet is not very fast

And for the styles, I think we can migrate the styles that are in the ui files to the themes

@rurigk
Copy link
Contributor Author

rurigk commented Apr 10, 2019

I could not make it work in my version of Qt Creator 4.8.2 with Qt 5.9

https://bugreports.qt.io/browse/QTBUG-72555

Could you try replacing optionsdialog.ui with the version of your branch and adding a combobox called comboBoxThemeSelector with "Default" and "Dark" items?
optionsdialog

@kanryu kanryu marked this pull request as ready for review April 12, 2019 07:04
@kanryu kanryu merged commit 895dff2 into kanryu:master Apr 12, 2019
@kanryu
Copy link
Owner

kanryu commented Apr 12, 2019

I confirmed that I can build at least qt-5.11 except where I pointed out, so I accept it once. I will fix it myself later.

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants