Skip to content

Commit

Permalink
Derive notification colors from background
Browse files Browse the repository at this point in the history
This brings back the expected behaviour and look of notifications by
basing the action buttons background and other colors on the background
color (which itself depends on the native OS theme color). This was
changed in crrev.com/c/2772143 and crrev.com/c/2860511 but using a
derived color makes notifications look better (#statusbar is typically
the same color as the window background and we're not drawing a
statusbar conceptually here).

Bug: 1203707
Change-Id: Icdf081aec40b2cfaec8749739e4fd01e28df9426
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2875218
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Richard Knoll <knollr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#881692}
  • Loading branch information
rknoll authored and Chromium LUCI CQ committed May 11, 2021
1 parent bf6854b commit c3e3a71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/gtk/gtk_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -747,11 +747,13 @@ base::Optional<SkColor> SkColorFromColorId(ui::ColorId color_id) {
case ui::kColorAvatarIconIncognito:
return GetFgColor("GtkLabel#label");
case ui::kColorBubbleFooterBackground:
case ui::kColorSyncInfoBackground:
return GetBgColor("#statusbar");
case ui::kColorNotificationActionsBackground:
case ui::kColorNotificationBackgroundActive:
case ui::kColorNotificationImageBackground:
case ui::kColorSyncInfoBackground:
return GetBgColor("#statusbar");
return color_utils::BlendTowardMaxContrast(GetBgColor(""),
gfx::kGoogleGreyAlpha100);

// FocusableBorder
case ui::kColorFocusableBorderFocused:
Expand Down

0 comments on commit c3e3a71

Please sign in to comment.