Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2847)

Unified Diff: chrome/browser/ui/views/status_bubble_views.cc

Issue 1764003002: Remove COLOR_STATUS_BAR_TEXT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/status_bubble_views.cc
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index e2b21bd82bed9934fee28ac7f62c701ab3796094..826659a2f26e8282ffff0837101ae30764425c60 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -420,22 +420,25 @@ void StatusBubbleViews::StatusView::OnPaint(gfx::Canvas* canvas) {
rrect.setRectRadii(RectToSkRect(rect), (const SkVector*)rad);
canvas->sk_canvas()->drawRRect(rrect, paint);
- // Draw highlight text and then the text body. In order to make sure the text
- // is aligned to the right on RTL UIs, we mirror the text bounds if the
- // locale is RTL.
+ // Compute text bounds.
const gfx::FontList font_list;
int text_width =
std::min(gfx::GetStringWidth(text_, font_list),
width - shadow_size - kTextPositionX - kTextHorizPadding);
int text_height = height - shadow_size;
- gfx::Rect body_bounds(kShadowThickness + kTextPositionX,
+ gfx::Rect text_bounds(kShadowThickness + kTextPositionX,
kShadowThickness,
std::max(0, text_width),
std::max(0, text_height));
- body_bounds.set_x(GetMirroredXForRect(body_bounds));
+ // Make sure the text is aligned to the right on RTL UIs.
+ text_bounds.set_x(GetMirroredXForRect(text_bounds));
+
+ // Text color is the foreground tab text color at 50% alpha.
SkColor text_color =
- theme_provider_->GetColor(ThemeProperties::COLOR_STATUS_BAR_TEXT);
- canvas->DrawStringRect(text_, font_list, text_color, body_bounds);
+ theme_provider_->GetColor(ThemeProperties::COLOR_TAB_TEXT);
Evan Stade 2016/03/04 04:22:16 I tried this out on GTK theme mode and yea, it loo
Peter Kasting 2016/03/04 05:53:46 We use this intentionally because we're trying to
+ canvas->DrawStringRect(text_, font_list,
+ SkColorSetA(text_color, SkColorGetA(text_color) / 2),
+ text_bounds);
}
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698