papyros / qml-material

:book: Material Design implemented in QtQuick
GNU Lesser General Public License v2.1
2.57k stars 476 forks source link

Have a light/dark switch in the demo #160

Open marco-piccolino opened 9 years ago

marco-piccolino commented 9 years ago

Instead of having dark and light controls side by side, how about having a direct switch in the toolbar between light and dark? This would better highlight any missing styling and improve the naturalness of the demo.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ronjouch commented 8 years ago

Hi @marco-piccolino @iBeliever everybody. This demo bug proposes a boolean that style / darkBackground properties of all the demo's components would bind on.

I'm hijacking this bug to ask if, going further than the demo, you already discussed the introduction of an equivalent to qtquick2's "theme" dark/light enum?

I'm fiddling with qml-material after trying qtquick2 and realizing that qtquick2 is 1. young and 2. only focused on mobile for now. Qml-material seems more mature and also supports easily setting theme.{primaryColor, accentColor, backgroundColor} :+1: , but in qml-material there is no property letting me say like in qtquick2 "my app will be mostly dark, so please adjust all widgets to light text/widgets/icons on dark background, not the contrary".

Whereas in qtquick2 saying that is a matter of setting Material.theme: dark once, in qml-material I have to repeatedly specify style: "dark" and darkBackground: true properties everywhere. This results in:

→ Have you already discussed whether a theme: dark/light switch would make sense?