D23585: Add color and palette APIs for Grantlee
Volker Krause
noreply at phabricator.kde.org
Fri Aug 30 16:22:58 BST 2019
vkrause created this revision.
vkrause added reviewers: skelly, kde-pim.
Herald added a project: KDE PIM.
vkrause requested review of this revision.
REVISION SUMMARY
This aims at enabling us to do the entire CSS styling via Grantlee, by
providing access to palette colors, by offering color operations and by
allowing to convert colors to CSS compatible strings.
Most of this is fairly straightforward, the ugly one is the colorMix
operator. I didn't find a way to do a two argument filter with both
arguments referencing variables. Therefore it's done as a tag, which in
turn means we can't chain it to other operations, and the output format
is fixed. And while color mixing isn't used in the current messagelib CSS
generation, it's heavily used in the Breeze style code (which is what I'm
trying to follow for the itinerary plug-in at least).
This isn't complete, there's more color operations in use in styling
(such as desaturate or tint), and this still misses KColorScheme access.
All that should be doable in a very similar fashion though, as needed.
Using FilterExpression for the two inputs of the colorMix operator might
also be an interesting future extension.
This works with the last Grantlee release, on Grantlee master it fails
without https://github.com/steveire/grantlee/pull/56.
REPOSITORY
R77 PIM: Grantlee Theme
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D23585
AFFECTED FILES
CMakeLists.txt
autotest/CMakeLists.txt
autotest/data/themes/color/color.html
autotest/data/themes/color/color.testdesktop
autotest/data/themes/color/color_expected.html
autotest/grantleethemetest.cpp
src/plugin/CMakeLists.txt
src/plugin/color.cpp
src/plugin/color.h
src/plugin/kdegrantleeplugin.cpp
src/plugin/palette.cpp
src/plugin/palette.h
To: vkrause, skelly, kde-pim
Cc: fbampaloukas, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190830/d1caeb26/attachment.html>
More information about the kde-pim
mailing list