status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
303 stars 79 forks source link

[StatusQ] Improve drop-down list of `StatusQ.Components.StatusListPicker` #7562

Closed noeliaSD closed 1 year ago

noeliaSD commented 2 years ago

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, reusable RectangleWithShadow 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_

alexandraB99 commented 2 years ago

@noeliaSD not seen the case, but can't we use an image for this?

noeliaSD commented 2 years ago

@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.

stefandunca commented 2 years ago

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.