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

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

Issue 2969623004: RenderText: Allow strike-through line thickness to be customized. (Closed)
Patch Set: Address final nits. Created 3 years, 5 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/url_bar_texture.cc
diff --git a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
index e4e811110d59cdc2928112f44408ab44c6fa83df..30cc4440cc8ab46c9d987147dbe03786ca5d3a40 100644
--- a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
@@ -33,6 +33,7 @@ static constexpr float kSecurityIconSize = 0.03;
static constexpr float kUrlRightMargin = 0.02;
static constexpr float kSeparatorWidth = 0.002;
static constexpr float kChipTextLineMargin = kHeight * 0.3;
+static constexpr SkScalar kStrikeThicknessFactor = (SK_Scalar1 / 9);
using security_state::SecurityLevel;
@@ -403,6 +404,7 @@ void UrlBarTexture::ApplyUrlStyling(
render_text->ApplyColor(GetSchemeColor(security_level, color_scheme),
scheme_range);
if (security_level == SecurityLevel::DANGEROUS) {
+ render_text->SetStrikeThicknessFactor(kStrikeThicknessFactor);
render_text->ApplyStyle(gfx::TextStyle::STRIKE, true, scheme_range);
}
}

Powered by Google App Engine
This is Rietveld 408576698