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

Unified Diff: chrome/browser/android/vr_shell/textures/system_indicator_texture.cc

Issue 2926643003: [VrShell] Centralize color handling and enable close button on fullscreen (Closed)
Patch Set: Created 3 years, 6 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
Index: chrome/browser/android/vr_shell/textures/system_indicator_texture.cc
diff --git a/chrome/browser/android/vr_shell/textures/system_indicator_texture.cc b/chrome/browser/android/vr_shell/textures/system_indicator_texture.cc
index f91a471d159d2cd15ab7cd2301cbaa052b4e094c..439b3ba3d32e06f50ed30c5a7f17a04caa5063b0 100644
--- a/chrome/browser/android/vr_shell/textures/system_indicator_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/system_indicator_texture.cc
@@ -19,8 +19,6 @@ namespace vr_shell {
namespace {
-const SkColor kBackgroundColor = SK_ColorWHITE;
-const SkColor kForegroundColor = 0xFF444444;
constexpr int kHeightWidthRatio = 8.0;
constexpr float kBorderFactor = 0.1;
constexpr float kIconSizeFactor = 0.7;
@@ -46,7 +44,7 @@ void SystemIndicatorTexture::Draw(SkCanvas* sk_canvas,
DCHECK(texture_size.height() * kHeightWidthRatio == texture_size.width());
size_.set_height(texture_size.height());
SkPaint paint;
- paint.setColor(kBackgroundColor);
+ paint.setColor(color_scheme().system_indicator_background);
base::string16 text = l10n_util::GetStringUTF16(message_id_);
@@ -54,9 +52,9 @@ void SystemIndicatorTexture::Draw(SkCanvas* sk_canvas,
GetFontList(size_.height() * kFontSizeFactor, text, &fonts);
gfx::Rect text_size(0, kTextHeightFactor * size_.height());
- std::vector<std::unique_ptr<gfx::RenderText>> lines =
- PrepareDrawStringRect(text, fonts, kForegroundColor, &text_size,
- kTextAlignmentNone, kWrappingBehaviorNoWrap);
+ std::vector<std::unique_ptr<gfx::RenderText>> lines = PrepareDrawStringRect(
+ text, fonts, color_scheme().system_indicator_foreground, &text_size,
+ kTextAlignmentNone, kWrappingBehaviorNoWrap);
DCHECK_LE(text_size.width(), kTextWidthFactor * size_.height());
// Setting background size giving some extra lateral padding to the text.
@@ -73,7 +71,7 @@ void SystemIndicatorTexture::Draw(SkCanvas* sk_canvas,
: size_.height() * kBorderFactor,
size_.height() * (1.0 - kIconSizeFactor) / 2.0));
PaintVectorIcon(canvas, icon_, size_.height() * kIconSizeFactor,
- kForegroundColor);
+ color_scheme().system_indicator_foreground);
canvas->Restore();
canvas->Save();

Powered by Google App Engine
This is Rietveld 408576698