Closed noeliaSD closed 1 year ago
@noeliaSD not seen the case, but can't we use an image for this?
@noeliaSD not seen the case, but can't we use an image for this?
Do you mean an image instead of using the DropShadow
component to simulate the shadow in the dropdown?? If yes, maybe yes, we could try as well with this approach. In terms of cost, I'm not sure if it is better using an image or the approach that proposes @stefandunca based on Gradient
.
The current implementation works good and it looks now like premature optimisation. I propose to wait for the refactoring required to migrate to Qt6 and tackle it then.
DropShadow
is costly and forces layering which makes the entire component to be drawn twice every frame (one in the offscreen buffer, blending then on screen). Also DropShadow is done using high-quality gaussian blur and documentation says that for 60 FPS full image you need an advanced GPU. Also graphical effects are moved to compatibility module in Qt6.It will be great to experiment in the future with a generic component shadow based on
Gradient
applied in a rectangle, reusableRectangleWithShadow
StatusQ.Control. It will do the job for rectangular backgrounds like most of the cases._Originally posted by @stefandunca in https://github.com/status-im/StatusQ/pull/583#discussion_r839346110_