Unverified Commit f73411b9 authored by Tiger Oakes's avatar Tiger Oakes Committed by GitHub
Browse files

For #5499 - Unify CFR drawables and dimens (#12749)

parent 17cfbc39
......@@ -81,8 +81,8 @@ class TrackingProtectionOverlay(
}
val res = context.resources
val triangleWidthPx = res.getDimension(R.dimen.tp_onboarding_triangle_height)
val triangleMarginStartPx = res.getDimension(R.dimen.tp_onboarding_triangle_margin_start)
val triangleWidthPx = res.getDimension(R.dimen.cfr_triangle_height)
val triangleMarginStartPx = res.getDimension(R.dimen.cfr_triangle_margin_edge)
val toolbar = getToolbar()
val trackingProtectionIcon: View =
......
......@@ -2,19 +2,15 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<rotate
android:fromDegrees="45"
android:pivotX="-40%"
android:pivotY="87%"
android:toDegrees="45">
<shape android:shape="rectangle">
<stroke
android:width="10dp"
android:color="#0250BB" />
<solid android:color="#0250BB" />
</shape>
</rotate>
</item>
</layer-list>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="45"
android:pivotX="-40%"
android:pivotY="87%"
android:toDegrees="45">
<shape android:shape="rectangle">
<stroke
android:width="10dp"
android:color="#FFFFFF" />
<solid android:color="#FFFFFF" />
</shape>
</rotate>
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<rotate
android:fromDegrees="45"
android:pivotX="-40%"
android:pivotY="87%"
android:toDegrees="45">
<shape android:shape="rectangle">
<stroke
android:width="10dp"
android:color="#7542E5" />
<solid android:color="#7542E5" />
</shape>
</rotate>
</item>
</layer-list>
\ No newline at end of file
......@@ -9,12 +9,13 @@
android:orientation="vertical">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_width="@dimen/cfr_triangle_width"
android:layout_height="@dimen/cfr_triangle_height"
android:layout_gravity="end"
android:layout_marginEnd="16dp"
android:layout_marginEnd="@dimen/cfr_triangle_margin_edge"
android:importantForAccessibility="no"
app:srcCompat="@drawable/ic_pbm_triangle" />
app:srcCompat="@drawable/ic_cfr_triangle"
app:tint="#7542E5" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......
......@@ -13,11 +13,12 @@
<androidx.appcompat.widget.AppCompatImageView
android:visibility="gone"
android:id="@+id/drop_down_triangle"
android:layout_width="@dimen/tp_onboarding_triangle_width"
android:layout_height="@dimen/tp_onboarding_triangle_height"
android:layout_width="@dimen/cfr_triangle_width"
android:layout_height="@dimen/cfr_triangle_height"
android:importantForAccessibility="no"
android:rotation="0"
app:srcCompat="@drawable/ic_pbm_triangle"
app:srcCompat="@drawable/ic_cfr_triangle"
app:tint="#7542E5"
android:layout_gravity="center" />
<androidx.constraintlayout.widget.ConstraintLayout
......@@ -92,9 +93,10 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/pop_up_triangle"
android:layout_width="16dp"
android:layout_height="@dimen/tp_onboarding_triangle_height"
android:layout_height="@dimen/cfr_triangle_height"
android:importantForAccessibility="no"
android:rotation="180"
app:srcCompat="@drawable/ic_pbm_triangle"
app:srcCompat="@drawable/ic_cfr_triangle"
app:tint="#7542E5"
android:layout_gravity="center" />
</LinearLayout>
......@@ -11,12 +11,13 @@
<ImageView
android:visibility="gone"
android:id="@+id/drop_down_triangle"
android:layout_width="@dimen/tp_onboarding_triangle_width"
android:layout_height="@dimen/tp_onboarding_triangle_height"
android:layout_marginStart="@dimen/tp_onboarding_triangle_margin_start"
android:layout_width="@dimen/cfr_triangle_width"
android:layout_height="@dimen/cfr_triangle_height"
android:layout_marginStart="@dimen/cfr_triangle_margin_edge"
android:importantForAccessibility="no"
android:rotation="0"
app:srcCompat="@drawable/ic_triangle"
app:srcCompat="@drawable/ic_cfr_triangle"
app:tint="#0250BB"
android:layout_gravity="start" />
<androidx.constraintlayout.widget.ConstraintLayout
......@@ -36,7 +37,7 @@
android:focusable="true"
android:contentDescription="@string/onboarding_close"
app:srcCompat="@drawable/ic_close"
android:tint="@color/primary_text_dark_theme"
app:tint="@color/primary_text_dark_theme"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -60,11 +61,12 @@
<ImageView
android:id="@+id/pop_up_triangle"
android:layout_width="16dp"
android:layout_height="@dimen/tp_onboarding_triangle_height"
android:layout_marginStart="16dp"
android:layout_width="@dimen/cfr_triangle_width"
android:layout_height="@dimen/cfr_triangle_height"
android:layout_marginStart="@dimen/cfr_triangle_margin_edge"
android:importantForAccessibility="no"
android:rotation="180"
app:srcCompat="@drawable/ic_triangle"
app:srcCompat="@drawable/ic_cfr_triangle"
app:tint="#0250BB"
android:layout_gravity="start" />
</LinearLayout>
......@@ -42,9 +42,10 @@
<dimen name="context_menu_height">48dp</dimen>
<dimen name="context_menu_x_offset">8dp</dimen>
<dimen name="tp_onboarding_width">256dp</dimen>
<dimen name="tp_onboarding_triangle_height">16dp</dimen>
<dimen name="tp_onboarding_triangle_width">16dp</dimen>
<dimen name="tp_onboarding_triangle_margin_start">16dp</dimen>
<!-- Dimensions for the CFR (Contextual Feature Recommendation) tooltip triangle. -->
<dimen name="cfr_triangle_height">16dp</dimen>
<dimen name="cfr_triangle_width">16dp</dimen>
<dimen name="cfr_triangle_margin_edge">16dp</dimen>
<dimen name="tab_counter_box_width_height">24dp</dimen>
......
Supports Markdown
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