<table><tr><td style="">vkrause created this revision.<br />vkrause added reviewers: skelly, kde-pim.<br />Herald added a project: KDE PIM.<br />vkrause requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D23585">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This aims at enabling us to do the entire CSS styling via Grantlee, by<br />
providing access to palette colors, by offering color operations and by<br />
allowing to convert colors to CSS compatible strings.</p>

<p>Most of this is fairly straightforward, the ugly one is the colorMix<br />
operator. I didn't find a way to do a two argument filter with both<br />
arguments referencing variables. Therefore it's done as a tag, which in<br />
turn means we can't chain it to other operations, and the output format<br />
is fixed. And while color mixing isn't used in the current messagelib CSS<br />
generation, it's heavily used in the Breeze style code (which is what I'm<br />
trying to follow for the itinerary plug-in at least).</p>

<p>This isn't complete, there's more color operations in use in styling<br />
(such as desaturate or tint), and this still misses KColorScheme access.<br />
All that should be doable in a very similar fashion though, as needed.<br />
Using FilterExpression for the two inputs of the colorMix operator might<br />
also be an interesting future extension.</p>

<p>This works with the last Grantlee release, on Grantlee master it fails<br />
without <a href="https://github.com/steveire/grantlee/pull/56" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/steveire/grantlee/pull/56</a>.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R77 PIM: Grantlee Theme</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23585">https://phabricator.kde.org/D23585</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
autotest/CMakeLists.txt<br />
autotest/data/themes/color/color.html<br />
autotest/data/themes/color/color.testdesktop<br />
autotest/data/themes/color/color_expected.html<br />
autotest/grantleethemetest.cpp<br />
src/plugin/CMakeLists.txt<br />
src/plugin/color.cpp<br />
src/plugin/color.h<br />
src/plugin/kdegrantleeplugin.cpp<br />
src/plugin/palette.cpp<br />
src/plugin/palette.h</div></div></div><br /><div><strong>To: </strong>vkrause, skelly, kde-pim<br /><strong>Cc: </strong>fbampaloukas, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>