Commit 860b0dda authored by Becky Zhou's avatar Becky Zhou Committed by Commit Bot

[Snowflake] Unify infobar text styles

+ Infobar secondary text from #646464 to 54% black
+ Infobar big icon control message to 20sp
+ Conneciton info url from bold to medium
+ Conneciton info description line height to 20
+ Page info secure scheme "https" text to medium
+ Page info and connection info link text to #3367D6
+ Bluetooth dialog link text to #3367D6
+ Bluetooth dialog bottom margin to match button right margin

BUG=723044,723054

Change-Id: I59461f4d9a73da49d0370661a8d275f8b2699083
Reviewed-on: https://chromium-review.googlesource.com/581801Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Becky Zhou <huayinz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488743}
parent 2ecfa829
......@@ -29,13 +29,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/connection_info_padding_thin"
android:textStyle="bold"
style="@style/RobotoMediumStyle"
android:textColor="@color/connection_info_popup_text" />
<TextView
android:id="@+id/connection_info_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingExtra="6dp"
android:textColor="@color/connection_info_popup_text" />
</LinearLayout>
......
......@@ -9,7 +9,7 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingBottom="12dp"
android:paddingTop="20dp" >
<!-- The title at the top. -->
......
......@@ -44,7 +44,7 @@
<!-- Infobar colors -->
<color name="infobar_accent_blue">#4285f4</color>
<color name="infobar_descriptive_text_color">#646464</color>
<color name="infobar_descriptive_text_color">@color/black_alpha_54</color>
<!-- Snackbar colors -->
<color name="snackbar_background_color">#282C32</color>
......@@ -61,11 +61,11 @@
<!-- Connection Info Popup colors -->
<color name="connection_info_popup_reset_cert_decisions_button">#000000</color>
<color name="connection_info_popup_text">#444444</color>
<color name="connection_info_popup_text">@color/black_alpha_87</color>
<!-- Page Info Popup colors -->
<color name="page_info_popup_text">#444444</color>
<color name="page_info_popup_text_link">#4285f4</color>
<color name="page_info_popup_text">@color/black_alpha_87</color>
<color name="page_info_popup_text_link">@color/google_blue_700</color>
<!-- URL Emphasizer colors -->
<color name="url_emphasis_non_emphasized_text">#80333333</color>
......
......@@ -64,7 +64,7 @@
<!-- Text size of the infobar message and other controls. -->
<dimen name="infobar_text_size">16sp</dimen>
<!-- Text size of the infobar message when a big icon is shown. -->
<dimen name="infobar_big_icon_message_size">18sp</dimen>
<dimen name="infobar_big_icon_message_size">20sp</dimen>
<!-- Text size of descriptive controls on an infobar. -->
<dimen name="infobar_descriptive_text_size">14sp</dimen>
<!-- Padding surrounding the infobar. -->
......
......@@ -17,6 +17,7 @@ import android.location.LocationManager;
import android.support.graphics.drawable.VectorDrawableCompat;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.text.SpannableString;
import android.text.TextPaint;
import android.text.TextUtils;
import android.view.View;
......@@ -309,6 +310,13 @@ public class BluetoothChooserDialog
mContext = context;
}
@Override
public void updateDrawState(TextPaint textPaint) {
super.updateDrawState(textPaint);
textPaint.setColor(ApiCompatibilityUtils.getColor(
mContext.getResources(), R.color.google_blue_700));
}
@Override
public void onClick(View view) {
if (mNativeBluetoothChooserDialogPtr == 0) {
......
......@@ -31,6 +31,7 @@ import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.text.style.TextAppearanceSpan;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
......@@ -68,6 +69,7 @@ import org.chromium.chrome.browser.ssl.SecurityStateModel;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.util.UrlUtilities;
import org.chromium.components.location.LocationUtils;
import org.chromium.components.security_state.ConnectionSecurityLevel;
import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.browser.WebContentsObserver;
import org.chromium.ui.base.DeviceFormFactor;
......@@ -409,6 +411,14 @@ public class PageInfoPopup implements OnClickListener {
SpannableStringBuilder urlBuilder = new SpannableStringBuilder(mFullUrl);
OmniboxUrlEmphasizer.emphasizeUrl(urlBuilder, mContext.getResources(), mTab.getProfile(),
mSecurityLevel, mIsInternalPage, true, true);
if (mSecurityLevel == ConnectionSecurityLevel.SECURE) {
OmniboxUrlEmphasizer.EmphasizeComponentsResponse emphasizeResponse =
OmniboxUrlEmphasizer.parseForEmphasizeComponents(
mTab.getProfile(), urlBuilder.toString());
urlBuilder.setSpan(
new TextAppearanceSpan(mUrlTitle.getContext(), R.style.RobotoMediumStyle), 0,
emphasizeResponse.schemeLength, Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
}
mUrlTitle.setText(urlBuilder);
if (mParsedUrl == null || mParsedUrl.getScheme() == null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment