Commit 54b75015 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[kdecoration] Refine shadows

Summary:
5.12 release introduced new decoration shadows. These new shadows are
bigger, centered, and they try to solve a problem related to depth.
Yet, there are still some problems:

* new(5.12) shadows are hard.
* lighting model is broken. Because 5.12 shadows have been centered and
  made bigger, they should be casted from north.

This change refines how decoration shadows look:
* shadows are casted from north(shadow under window is bigger and darker,
  side shadows are smaller, etc);
* shadows are made up of several separate shadows(one for overall shape,
  another for contrast). The separate shadows are produced by using box
  shadow helper(something similar to CSS box-shadow property, except there are
  no inset and spread properties);
* shadow sizes(e.g. Small, Medium, and so on) haven't changed.

Because GPUs can't be used for blurring images(in our case), the box shadow
helper is using CPU to blur images. More precisely, when blur radius is < 64,
images are blurred with "separable convolutions", otherwise, images are blurred
with a two-dimensional Fourier Transform.

{F5754389, layout=center, size=full}

Desktop experience with the refined shadows

{F5754390, layout=center, size=full}

Depends on D11198

Reviewers: #breeze, #vdg, hpereiradacosta

Reviewed By: hpereiradacosta

Subscribers: abetts, fabianr, hpereiradacosta, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D11069
parent bffe8faa
......@@ -28,6 +28,10 @@ endif()
################# configuration #################
configure_file(config-breeze.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-breeze.h )
################# includes #################
include_directories(${CMAKE_SOURCE_DIR}/libbreezecommon)
include_directories(${CMAKE_BINARY_DIR}/libbreezecommon)
################# newt target #################
### plugin classes
set(breezedecoration_SRCS
......@@ -71,6 +75,7 @@ target_link_libraries(breezedecoration
Qt5::Gui
Qt5::DBus
PRIVATE
breezecommon
KDecoration2::KDecoration
KF5::ConfigCore
KF5::CoreAddons
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
<group name="Common">
<entry name="ShadowStrength" type = "Int">
<default>90</default>
<default>255</default>
<min>25</min>
<max>255</max>
</entry>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment