Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cr91 follow-up: Fix omnibox selection color. #15690

Closed
mkarolin opened this issue May 7, 2021 · 2 comments · Fixed by brave/brave-core#8749
Closed

Cr91 follow-up: Fix omnibox selection color. #15690

mkarolin opened this issue May 7, 2021 · 2 comments · Fixed by brave/brave-core#8749

Comments

@mkarolin
Copy link
Contributor

mkarolin commented May 7, 2021

This issue is for Windows and Linux only.

Due to cr91 upstream change https://source.chromium.org/chromium/chromium/src/+/c042fff0a7823aa4ebb0494d5b094f67f15aa4b3 the omnibox selection color is now the same color as the focus ring of the omnibox. Since we override the focus ring to be our brand color, the selection is now also the brand color, which we don't want.

Revert the omnibox selection color to what it was in cr90.

STR:

  1. Start browser
  2. Navigate to any page and wait for it to load
  3. Click into an empty space in the omnibox to select the URL (or Ctrl + L)
  4. Expected result: the selection color is blue
    image
  5. Actual result: the selection color is brave orange
    image

QA: Please, test both Light and Dark modes.

@mkarolin mkarolin self-assigned this May 7, 2021
mkarolin added a commit to brave/brave-core that referenced this issue May 7, 2021
Fixes brave/brave-browser#15690

Due to the cr91 upstream change below the omnibox selection color is
now the same color as the focus ring of the omnibox. Since we override
the focus ring to be our brand color, the selection is now also the
brand color, which we don't want.

This fix reverts the omnibox selection color to what it was in cr90
(kGoogleBlue200 for Light theme, kGoogleBlue800 for Dark).

Chromium changes:

This change redefined kColorId_TextfieldSelectionBackgroundFocused from
explicit colors (gfx::kGoogleBlue200 and gfx::kGoogleBlue800 ) to fall
back onto kColorId_LabelTextSelectionBackgroundFocused.

https://source.chromium.org/chromium/chromium/src/+/76f9ef872febca7e3630db31c699ad2c2ec4e7a5

commit 76f9ef872febca7e3630db31c699ad2c2ec4e7a5
Author: Peter Kasting <[email protected]>
Date:   Mon Feb 22 17:56:22 2021 +0000

    Convert existing color definitions to more canonical forms.

    This defines as many colors as possible in terms of a small number of
    core colors.  The primary benefit of this is to remove most dark mode
    color definitions (which will now be automatically correct).  It also
    makes some relationships clearer.

    No behavior change intended (yet).

    Bug: none

This change made kColorId_LabelTextSelectionBackgroundFocused fall back to
AlphaBlend(kColorId_ProminentButtonColor, kColorId_WindowBackground, gfx::kGoogleGreyAlpha500)
We redefine kColorId_ProminentButtonColor as kBraveColorBrand = RGB(0xfb, 0x54, 0x2b).

https://source.chromium.org/chromium/chromium/src/+/c042fff0a7823aa4ebb0494d5b094f67f15aa4b3

commit c042fff0a7823aa4ebb0494d5b094f67f15aa4b3
Author: Peter Kasting <[email protected]>
Date:   Wed Mar 24 21:10:08 2021 +0000

    Tweak existing systematized colors.

    Primarily, this adjusts menus, tables, trees, and textfields to all use
    the same blue to represent a selected item (and that blue now matches
    the focus ring).

    Bug: 1061127
@mkarolin mkarolin added this to the 1.26.x - Nightly milestone May 10, 2021
@stephendonner
Copy link

Verified FIXED using

Brave 1.26.18 Chromium: 91.0.4472.38 (Official Build) nightly (64-bit)
Revision 8155e7afab5d695cf0e028f4d77203287523cda9-refs/branch-heads/4472_35@{#6}
OS Windows 10 OS Version 2009 (Build 21376.1)

Steps:

  1. launched Brave
  2. navigated to brave.com
  3. clicked into an empty space in the omnibox to select the URL (or Ctrl + L)
  4. expected result: the selection color is blue

Confirmed text-selection color is blue in both dark and light themes.

dark light
dark-mode light-mode

@kjozwiak
Copy link
Member

This will be uplifted into 1.25.x with #15973.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants