GSoC: Libreoffice Theme (week - 1 update)
Sahil Gautam
printfdebugging at gmail.com
Mon May 27 04:48:08 UTC 2024
@Michael made a vaild point.
Haven't played around with the ColorConfig
much, (slow PC reasons), but this week I will go through that.
Things will be more clear then.
This is my take on it now.
- Read the colors from the widget toolkits and store it somewhere.
The entries in the `Color
ColorConfig::GetDefaultColor(ColorConfigEntry eEntry)`
are hard-coded, can be created on startup instead. Something like
having a vector
of structs with the default color values for different ENUMs
associated to
UI elements.
- Then the colors in the StyleSettings can be initialized based on theme
selection.
If it's "System Theme", then the colors saved in the point above can
be used to
initialize the StyleSettings. If it's some custom theme (extension),
then the
colors should be read from the expert configuration instead.
On 5/27/24 9:15 AM, Michael Weghorn wrote:
> On 2024-05-27 05:04, Sahil Gautam wrote:
>> The project is about not depending on the OS for colors and implement
>> "Themes"
>> in Libreoffice. So as per my understanding (opinions invited), all
>> the `Set...Color()`
>> calls in the `bool UpdateSettings(AllSettings& rSettings)` functions,
>> which take
>> colors from the OS and put them into the `StyleSettings` are to be
>> removed, and colors
>> should be passed to the widget toolkits, which were read from the
>> expert configuration.
>
> My take would be that colors should still be taken from the
> OS's/toolkit's current system theme/style by default, and only be
> overriden if explicitly configured so.
More information about the LibreOffice
mailing list