Bug 403419 - [feature] - manually choose the dark/light color
Summary: [feature] - manually choose the dark/light color
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Plasma
Component: application (show other bugs)
Version: git (master)
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-20 07:15 UTC by trmdi
Modified: 2019-02-09 15:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
bottom dock painted from Latte (3.16 MB, image/png)
2019-02-07 07:58 UTC, Michail Vourlakos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description trmdi 2019-01-20 07:15:11 UTC
For example, this wallpaper: http://whvn.cc/275676
If I choose "Hide background..." and "Monochrome contents..." for both the panel and the dock, they will result in different colors as you see in this screenshot: https://i.imgur.com/Aijd0ul.jpg
(The panel: white, the dock: black)

Is there any way to make them have the same color? For the example wallpaper above, I think the dock's background should be white like the panel.

Some ideas:
- Set the dock color = the panel color
- Add an option to manually select the color, the user could choose between dark/light manually. I like this idea more, because with some wallpapers like this, Latte looks nice in both dark/light cases.
Comment 1 Michail Vourlakos 2019-01-20 19:01:24 UTC
(In reply to trmdi from comment #0)
> Is there any way to make them have the same color? For the example wallpaper
> above, I think the dock's background should be white like the panel.
>

yes this is possible. The current approach computes the brightness for each background edge separately. So the top edge and the bottom edge can have different brightness values based on the background image. It is very easy to make them choose the same brightness independent of edge. One approach could be the edge with the most brightness demands wins and after that all the edges will use the same brightness values
 
> - Add an option to manually select the color, the user could choose between
> dark/light manually. I like this idea more, because with some wallpapers
> like this, Latte looks nice in both dark/light cases.

In order to understand the approach I must first give some hints what Latte is doing. Because Latte new coloring is not complete in a way to provide everything a plasma theme provides and it tries to do the less damage from viewpoint as possible. What is going on is the following:

1. Latte determines the current plasma theme if it is light or dark. Let;s say for example LIGHT
2. After [1] Latte provides a reversed color palette  for the reversed case so a DARK color palette
3. In that step now Latte provides LIGHT and DARK palettes and at any case Latte decides which of the two the applets must use
4. BUT for the DARK palette only the color palette is available and nothing related to svg files etc.
5. BASED on the above when LIGHT is chosen Latte is not doing any painting because the plasma theme is already LIGHT BUT for DARK Latte can overlay the applets in order to provide them with a monochromatic view that takes into account only transparency levels and not at all the colors the applets use.


CONCERNS

1. If we provide a DARK/LIGHT mode the user will expect for both everything to look and behave nice but this is not the case because plasma applets and theme infrastructure are not prepared for this
2. Because coloring could break applet's appearance totally I have added an option at per applet level in order for the user to be able to disable coloring. If the user has enabled "Monochrome..." then in EditMode at the applet tooltip there is now a Coloring toggle button


So I would love to be able to provide a LIGHT/DARK option but because that would create expectations to the users that can not be met I do not think we must add it, so an alternative way should be found to solve this
Comment 2 Michail Vourlakos 2019-02-07 07:58:34 UTC
Created attachment 117909 [details]
bottom dock painted from Latte
Comment 3 Michail Vourlakos 2019-02-07 07:59:34 UTC
(In reply to Michail Vourlakos from comment #2)
> Created attachment 117909 [details]
> bottom dock painted from Latte

I will probably reconsider for this, the following screenshot can be achieved now, the bottom dock is painted in reverse colors from running plasma theme (Materia plasma theme)
Comment 4 Michail Vourlakos 2019-02-09 15:04:01 UTC
it is supported with latest master