[Android] Migrate private NTP to Leo tokens and fix VPN icon visibility (#35905)

* [Android] Migrate private NTP to Leo tokens and fix VPN icon visibility

- Drop Brave-local duplicates of ic_product_vpn / ic_antenna /
  ic_product_private_window so the private NTP renders the Leo
  (Nala) icons via resource_overlay; tint the inner icon layer to
  primitive_private_window_60 in IncognitoNewTabPageView so the
  designed purple still wins on the fixed-dark surface.
- Remove Brave-local primitive_private_window_5/10/20/60/80/90 from
  brave_colors.xml; references now resolve through Leo's primitive
  scale (same hex for _60/80/90; slight neutral shift for _5/10/20).
- Remove the runtime setBackgroundColor on the scroll view that was
  masking the gradient drawable defined in the layout XML.
- Switch the private-tab logo to ic_social_brave_release_favicon_-
  fullheight_color (Leo) and size in dp (42 phone, 56 tablet) to
  match Figma and to stop scaling with accessibility font size.
- Resize circle drawable to 32x32 (was 32x33), constrain inner icon
  via new_tab_page_incognito_icon_inner_size (20dp / 24dp tablet),
  and grow circle to 48dp on tablets.
- Introduce per-form-factor style aliases (IncognitoNtpTitle /
  SectionTitle / SectionDescription / Cta) under values/ +
  values-sw600dp/ so phones and tablets land on the right Leo
  typography ramp without per-TextView attributes.
- Delete the now-dead ntp_bg_incognito and incognito_modern_-
  primary_color color entries.

Resolves: https://github.com/brave/brave-browser/issues/53958
This commit is contained in:
Serg
2026-04-27 10:22:07 -04:00
committed by GitHub
parent 7375d91fb6
commit 4864534b90
18 changed files with 82 additions and 80 deletions
@@ -48,7 +48,7 @@
android:layout_width="@dimen/new_tab_page_incognito_logo_size"
android:layout_height="@dimen/new_tab_page_incognito_logo_size"
android:contentDescription="@null"
android:src="@drawable/ic_brave_logo"
android:src="@drawable/ic_social_brave_release_favicon_fullheight_color"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintTop_toTopOf="@+id/title"
app:layout_constraintBottom_toBottomOf="@+id/title"
@@ -58,9 +58,8 @@
<TextView
android:id="@+id/title"
android:layout_marginTop="48dp"
android:textStyle="bold"
android:textSize="@dimen/new_tab_page_incognito_title_text_size"
style="@style/IncognitoNtpTitle"
android:layout_marginTop="96dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/brave_new_tab_private_header"
@@ -90,7 +89,7 @@
<TextView
android:id="@+id/tv_first_title"
style="@style/DefaultSemibold"
style="@style/IncognitoNtpSectionTitle"
app:layout_constraintWidth_max="460dp"
android:layout_marginBottom="4dp"
android:layout_width="0dp"
@@ -105,7 +104,7 @@
<TextView
android:id="@+id/tv_first_description"
style="@style/DefaultRegular"
style="@style/IncognitoNtpSectionDescription"
android:layout_marginBottom="32dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -133,7 +132,7 @@
<TextView
android:id="@+id/tv_second_title"
style="@style/DefaultSemibold"
style="@style/IncognitoNtpSectionTitle"
app:layout_constraintWidth_max="460dp"
android:layout_marginBottom="4dp"
android:layout_width="0dp"
@@ -148,7 +147,7 @@
<TextView
android:id="@+id/tv_second_description"
style="@style/DefaultRegular"
style="@style/IncognitoNtpSectionDescription"
android:layout_marginBottom="32dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -176,7 +175,7 @@
<TextView
android:id="@+id/tv_third_title"
style="@style/DefaultSemibold"
style="@style/IncognitoNtpSectionTitle"
app:layout_constraintWidth_max="460dp"
android:layout_marginBottom="4dp"
android:layout_width="0dp"
@@ -193,7 +192,7 @@
<TextView
android:id="@+id/tv_third_description"
style="@style/DefaultRegular"
style="@style/IncognitoNtpSectionDescription"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
@@ -209,7 +208,7 @@
<TextView
android:id="@+id/tv_try_vpn"
style="@style/DefaultSemibold"
style="@style/IncognitoNtpCta"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="start"
@@ -12,9 +12,9 @@
<dimen name="onboarding_2_animation_height">300dp</dimen>
<dimen name="onboarding_2_animation_width">500dp</dimen>
<dimen name="new_tab_page_incognito_title_text_size">40sp</dimen>
<dimen name="new_tab_page_incognito_logo_size">56sp</dimen>
<dimen name="new_tab_page_incognito_icon_size">48sp</dimen>
<dimen name="new_tab_page_incognito_logo_size">56dp</dimen>
<dimen name="new_tab_page_incognito_icon_size">48dp</dimen>
<dimen name="new_tab_page_incognito_icon_inner_size">24dp</dimen>
<!-- Match this value with the upstream for Accessibility -->
<dimen name="omnibox_search_engine_logo_composed_size">24dp</dimen>
-10
View File
@@ -124,12 +124,6 @@
<color name="systemfeedback_info_icon">#0154cc</color>
<color name="systemfeedback_info_text">#0154cc</color>
<color name="container_background">#ffffff</color>
<color name="primitive_private_window_5">#180339</color>
<color name="primitive_private_window_10">#22044b</color>
<color name="primitive_private_window_20">#390977</color>
<color name="primitive_private_window_60">#9973f8</color>
<color name="primitive_private_window_80">#cbc0f8</color>
<color name="primitive_private_window_90">#e5e1f9</color>
<!-- Sync colors -->
<color name="brave_sync_bg_color">@android:color/transparent</color>
@@ -175,13 +169,9 @@
<!-- Incognito mode colors -->
<color name="toolbar_background_primary_dark">@color/primitive_private_window_5</color>
<color name="toolbar_background_incognito">@color/primitive_private_window_5</color>
<color name="ntp_bg_incognito">@color/incognito_modern_primary_color</color>
<color name="brave_private_tabs_bg_color">#13052A</color>
<color name="brave_private_reauth_unlock_button_bg_color">#4B415D</color>
<!-- Incognito background and branding colors -->
<color name="incognito_modern_primary_color">#210950</color>
<color name="toolbar_text_box_background_incognito">@color/primitive_private_window_10</color>
<color name="compositor_tab_title_bar_text_incognito">@android:color/white</color>
+3 -3
View File
@@ -53,9 +53,9 @@
<dimen name="small_semibold">12sp</dimen>
<dimen name="monospace_small">12sp</dimen>
<dimen name="brave_toolbar_edge_padding_ntp">8dp</dimen>
<dimen name="new_tab_page_incognito_title_text_size">28sp</dimen>
<dimen name="new_tab_page_incognito_logo_size">42sp</dimen>
<dimen name="new_tab_page_incognito_icon_size">32sp</dimen>
<dimen name="new_tab_page_incognito_logo_size">42dp</dimen>
<dimen name="new_tab_page_incognito_icon_size">32dp</dimen>
<dimen name="new_tab_page_incognito_icon_inner_size">20dp</dimen>
<!-- Brave News cards-->
<dimen name="brave_news_ad_title_textsize">17sp</dimen>