Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

For #12002: Show default tab background when thumbnail not available #12041

Merged
merged 1 commit into from
Jun 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/src/main/res/layout/tab_tray_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,20 @@
android:layout_height="69dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:backgroundTint="?tabTrayThumbnailItemBackground"
app:cardBackgroundColor="@color/photonWhite"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<ImageView
android:id="@+id/default_tab_thumbnail"
android:src="@drawable/mozac_ic_globe"
android:tint="?tabTrayThumbnailIcon"
android:padding="22dp"
android:importantForAccessibility="no"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<mozilla.components.browser.tabstray.thumbnail.TabThumbnailView
android:id="@+id/mozac_browser_tabstray_thumbnail"
android:layout_width="match_parent"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
<color name="tab_tray_item_media_background_normal_theme">@color/tab_tray_item_media_background_dark_theme</color>
<color name="tab_tray_heading_icon_normal_theme">@color/tab_tray_heading_icon_dark_theme</color>
<color name="tab_tray_heading_icon_inactive_normal_theme">@color/tab_tray_heading_icon_inactive_dark_theme</color>
<color name="tab_tray_item_thumbnail_background_normal_theme">@color/tab_tray_item_thumbnail_background_dark_theme</color>
<color name="tab_tray_item_thumbnail_icon_normal_theme">@color/tab_tray_item_thumbnail_icon_dark_theme</color>

<!--Top site colors -->
<color name="top_site_background">@color/top_site_background_dark_theme</color>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
<attr name="tabTrayItemMediaBackground" format="reference" />
<attr name="tabTrayHeadingIcon" format="reference" />
<attr name="tabTrayHeadingIconInactive" format="reference" />
<attr name="tabTrayThumbnailItemBackground" format="reference" />
<attr name="tabTrayThumbnailIcon" format="reference" />

<declare-styleable name="TrackingProtectionCategory">
<attr name="categoryItemTitle" format="reference" />
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
<color name="tab_tray_item_media_background_light_theme">#312A65</color>
<color name="tab_tray_heading_icon_light_theme">@color/ink_20</color>
<color name="tab_tray_heading_icon_inactive_light_theme">@color/ink_20_48a</color>
<color name="tab_tray_item_thumbnail_background_light_theme">@color/light_grey_10</color>
<color name="tab_tray_item_thumbnail_icon_light_theme">@color/light_grey_60</color>

<!-- Dark theme color palette -->
<color name="primary_text_dark_theme">#FBFBFE</color>
Expand Down Expand Up @@ -138,6 +140,8 @@
<color name="tab_tray_item_media_background_dark_theme">#9059FF</color>
<color name="tab_tray_heading_icon_dark_theme">@color/violet_50</color>
<color name="tab_tray_heading_icon_inactive_dark_theme">@color/violet_50_48a</color>
<color name="tab_tray_item_thumbnail_background_dark_theme">@color/dark_grey_50</color>
<color name="tab_tray_item_thumbnail_icon_dark_theme">@color/dark_grey_05</color>

<!-- Private theme color palette -->
<color name="primary_text_private_theme">#FBFBFE</color>
Expand Down Expand Up @@ -241,6 +245,8 @@
<color name="tab_tray_item_media_background_normal_theme">@color/tab_tray_item_media_background_light_theme</color>
<color name="tab_tray_heading_icon_normal_theme">@color/tab_tray_heading_icon_light_theme</color>
<color name="tab_tray_heading_icon_inactive_normal_theme">@color/tab_tray_heading_icon_inactive_light_theme</color>
<color name="tab_tray_item_thumbnail_background_normal_theme">@color/tab_tray_item_thumbnail_background_light_theme</color>
<color name="tab_tray_item_thumbnail_icon_normal_theme">@color/tab_tray_item_thumbnail_icon_light_theme</color>

<!-- Bookmark buttons -->
<color name="bookmark_favicon_background">#DFDFE3</color>
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
<item name="tabTrayItemMediaBackground">@color/tab_tray_item_media_background_normal_theme</item>
<item name="tabTrayHeadingIcon">@color/tab_tray_heading_icon_normal_theme</item>
<item name="tabTrayHeadingIconInactive">@color/tab_tray_heading_icon_inactive_normal_theme</item>
<item name="tabTrayThumbnailItemBackground">@color/tab_tray_item_thumbnail_background_normal_theme</item>
<item name="tabTrayThumbnailIcon">@color/tab_tray_item_thumbnail_icon_normal_theme</item>

<!-- Drawables -->
<item name="fenixLogo">@drawable/ic_logo_wordmark_normal</item>
Expand Down Expand Up @@ -208,6 +210,8 @@
<item name="tabTrayItemMediaBackground">@color/tab_tray_item_media_background_private_theme</item>
<item name="tabTrayHeadingIcon">@color/tab_tray_heading_icon_dark_theme</item>
<item name="tabTrayHeadingIconInactive">@color/tab_tray_heading_icon_inactive_dark_theme</item>
<item name="tabTrayThumbnailItemBackground">@color/tab_tray_item_thumbnail_background_normal_theme</item>
<item name="tabTrayThumbnailIcon">@color/tab_tray_item_thumbnail_icon_normal_theme</item>

<!-- Drawables -->
<item name="fenixLogo">@drawable/ic_logo_wordmark_private</item>
Expand Down