Code review comment for lp://staging/~gcollura/content-hub/fix-1384490

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

At this stage it'd be best to keep the design the same for use cases that already work in apps (i.e. with light coloured backgrounds). We can use the same technique the UITK uses to determine whether something has a light background or not via ColorUtils, so if it has a light background set a white apps area, otherwise leave it transparent for darker backgrounds, for example:

color: ColorUtils.luminance(Theme.palette.normal.background) >= 0.85 ? "#FFFFFF" : Qt.rgba(0, 0, 0, 0)

Should do the trick.

I still need to figure out what the UITK does with the background colour though, as the colour that gets set as Theme.palette.normal.background is modified in some way from the colour the user actually sets as the MainView's backgroundColor. It might end up being that we'll have to expose explicitly backgroundColor properties on the Peer Picker, but I want to make sure we can't do it automatically first.

« Back to merge proposal