Commit Graph

9 Commits

Author SHA1 Message Date
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Mikkel Krautz
63f2bd8e4e scripts: update to use LICENSE.header. 2016-05-10 22:42:04 +02:00
Stefan Hacker
73f6051d35 Modify generator for ApplicationPalette.h to fix warnings in that file 2015-10-25 19:40:10 +01:00
Will Tange
0fdb7c17e5 Mark shebanged files as executable 2015-05-12 18:51:23 +02:00
Stefan Hacker
cbe3956e40 Fix more ApplicationPalette aspects.
* Getters actually have to be working
* Have to be able to reset palette parts that
  aren't overridden by theme.
* Add search folder when setting theme
2014-10-26 23:24:19 +01:00
Stefan Hacker
38807bef1a Integrate some feedback to ApplicationPalette
* Changed naming scheme from "qproperty-<group>_<role>"
  to "qproperty-<role>_<group>".
* Introduced "qproperty-<group>" to set all roles of the
  group to the same brush
2014-10-26 17:44:09 +01:00
Stefan Hacker
291ed489d9 Add ApplicationPalette class which allows theming the QApplication::palette.
Qt allows setting custom QPROPERTY values from QSS themes. As we cannot
style QPalettes this class has a property for each color group and
color role in a palette and acts as a stand-in for QApplication::palette
in the theme. When setting a qproperty-<group>-<role> on it in QSS
the brush will be set on the application palette.

The ApplicationPalette is derived from QWidget but never visible.
It listens to style changes on itself as those indicate the
application palette should be updated again. Variables not set
in the QSS will not be touched in the palette.

There might be some interactions with system style or theme changes
that have not yet been explored. Those are edge cases though and
can be fixed later.

ApplicationPalette.h is generated from ApplicationPaletteTemplate.h using
the generate-ApplicationPalette-class.py script. While it isn't expected
that this file has to change a lot in the future auto-generation is much
easier than writing all that boilerplate from hand.

Fixes #1438
2014-10-26 15:21:30 +01:00