kanryu / quickviewer

A image/comic viewer application for Windows, Mac and Linux, it can show images very fast
https://kanryu.github.io/quickviewer/
GNU General Public License v3.0
536 stars 63 forks source link

Theme selector and dark theme #100

Closed rurigk closed 5 years ago

rurigk commented 5 years ago

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 commented 5 years ago

It is necessary to correct some flaws in the themes

kanryu commented 5 years ago

@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 commented 5 years ago

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

rurigk commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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!