Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4f135163 authored by Tiger's avatar Tiger
Browse files

Use the nav bar color as the scrim color with 80% alpha

To make the color of the 3-button nav bar scrim match the app's theme or
match the UI element (ex: panel, tool bar, ..., etc) docked on the nav
bar when the edge-to-edge policy is enforced, the logic of the scrim is
refined as follows:

If the nav bar color is specified, and
- alpha != 0, the scrim color will be the nav bar color with 80% alpha;
- alpha == 0, the scrim color logic will fallback to the existing one.

If the nav bar color is not specified, the scrim color will be the
window background color with 80% alpha. The icon color of nav bar will
be adjusted accordingly to ensure the contrast.

Bug: 309578419
Test: 1. Specify nav bar color via Java and see if the nav bar color is
         as expected in 3-button mode but transparent in gesture mode.
      2. Specify nav bar color via XML and see if the nav bar color is
         as expected in 3-button mode but transparent in gesture mode.
      3. Specify window background color and see if the nav bar color is
         as expected in 3-button mode but transparent in gesture mode.
Change-Id: Id3aea6cedc29732dcfe1a537c24312f184c956fe
parent 260d9c9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment