Σελίδες

Monday, 24 August 2020

Latte Dock v0.10~ | Background Radius and Shadows

 


Hello everyone,

customizers will probably become too happy with this new feature of Latte Dock v0.10~ git version. [~, stands for rapid development, in your distro package repos is mentioned as git version]
 

- youtube presentation -


Contents;

Plenty of users were asking in the past to be able to adjust background roundness. This is very challenging because Latte relys on Plasma Themes that provide only svg files for their elements and at the same time panel background shadows are drawn from KWin compositor. So before this could be implemented plenty of things were needed to be supported first:

  • Client decorated shadows and background
  • Overlay Plasma Theme Background without the user noticing any difference [Outline option case]
  • Inform window manager about the real dock geometry [GTK_FRAME_EXTENTS case]
  • Inform window manager about the real window input mask [XCB_SHAPE case]
  • Easy way to draw shadowed background [Kirigami.ShadowedRectangle]
  • Provide mask region for Kirigami.ShadowedRectangle in order for Blur effect and no-compositing mode to work properly.

When all previous steps were supported it was time to expose Background Radius to users. You need latest Latte git version, kde frameworks >= 5.69 and more specific kirigami2 kde framework library installed for this to work properly.

- radius and shadow options -


- background with 100% radius -


As it appears, in my system Blur Effect with custom radius works faster compared to plasma theme approach probably because most of mask calculations are precomputed. So those of you that want blurred background to catch up parabolic effect and animations you can give one more go in custom radius.


2. Background Shadows

After using Kirigami ShadowedRectangle to provide background with different radius it was time to play with background shadows. So now you can adjust the background shadow size if you want. 

Notice: There is a bug with Kirigami.ShadowedRectangle; if the shadow size is bigger from any of the background width or height, the produced shadow is vastly in size. This is why Latte protects from the case and limits the shadow size to never exceed the mentioned case; more info at kde_bug#425745


- background with custom 50px. shadow -


For those that will probably ask to be able to adjust also background color like other docks are doing. Sorry it will not happen; Latte follows Plasma Theme almost everywhere and any extended features should not break the Plasma Theme designer decisions. Choosing a color palette for a theme is very important and this is why Latte follows it everywhere. Even Background Shadow mentioned previously is using original plasma theme panel background shadow that it  gets discovered through the relevant svg file.

If a user wants a different background color will probably mean that wants also different dialogs, dialog shadows, tooltips colors etc.... So in the end the solution is to create a new plasma theme.

Personally I do not think donations are necessary. Easier thing you can do is to just install from KDE Store the Latte related widgets, they work just fine even with plasma panels. KDE Store provides me some monthly beers because of this. Funny thing in that Latte Separator that I developed in a day provides me most of the beers and Latte Dock that I develop plenty of hours daily for the last three years provides me almost none.. :) I mention it as a funny fact, please do not take it differently.

In a case, if you still want to donate you can use the following:

You can find Latte at Liberapay ,     Donate using Liberapay


or you can split your donation between my active projects in kde store.