Instead of Color, we have Light and Dark in the registry. So each theme extension
will specify dark and light color values for each "customizable element" like
DocColor etc. Under appearance we have three radio buttons - light/dark/system. If
system is selected then light/dark colors are switched based on the system's
theme. if explicitly light/dark is selected - that color is used from the
registry.
ColorConfigValue now has three entries nColor, nLightColor, nDarkColor. nColor is
used as a cache for the color being used at the moment. This is to avoid otherwise
expensive function calls + hundreds of modifications in the codebase just to
change nColor. nColor is cached either when the theme is loaded or when changes
are committed in `ColorConfig_Impl::ImplCommit()`.
Now, if Automatic theme is selected then themes is disabled and the application
uses the system colors. If some other scheme is selected like "CustomTheme" etc,
then LibreOffice themes/UI color customization is enabled and the theme colors are
used.
Instead of a scroll window, now we have a combobox for the registry entries and a
single color dropdown to select the color value. This color dropdown is for
convinience in case the user wants to change some specific color that's bothering
him. For themeing, theme extensions should be used.
API CHANGE
+ remove Color in favour of Light and Dark
+ AppBackground has additional two - BackgroundType and Bitmap
+ remove officecfg::Office::Common::Misc::Appearnce in favor of
officecfg::Office::Common::Appearance::ApplicationAppearance
+ move LibreofficeTheme under officecfg::Office::Common::Appearance
UI
+ it looks like https://i.imgur.com/UMxjfuC.png which is a little
different from how the [mockup] on the ticket describes it, and that's
because of lack of time due to upcomming feature freeze.
+ system/light/dark allow the user to switch between light/dark modes
based on either the system theme (system) or by manually specifying
light/dark.
+ ui themeing and color customization is disabled when automatic theme
is selected, and enabled otherwise.
[mockup]: https://bug-attachments.documentfoundation.org/attachment.cgi?id=197469
Change-Id: I1a7f70dfe44b81f863814f87e8d46e146c0e3d5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174835
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Reviewed-by: Sahil Gautam <sahil.gautam.extern@allotropia.de>