Commit 028cb2fd authored by Daniel Murphy's avatar Daniel Murphy Committed by Commit Bot

Revert "📰 Use standard styles for classic action items"

This reverts commit 93935b15.

Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=769403

(causing bot failures on newtabpage test)

Original change's description:
> 📰 Use standard styles for classic action items
> 
> Updates the SuggestionCardActionModern style to be more generic and
> be usable for classic cards, use it for the classic generic signin
> promo and the action item.
> 
> Preview: https://photos.app.goo.gl/GC9l01D8QI7YSLtI2
> Bug: None
> Change-Id: If1a007ad4288cc88511845b3ac89a9c8f2f1cbab
> Reviewed-on: https://chromium-review.googlesource.com/674691
> Commit-Queue: Nicolas Dossou-Gbété <dgn@chromium.org>
> Reviewed-by: Michael van Ouwerkerk <mvanouwerkerk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#504678}

TBR=mvanouwerkerk@chromium.org,dgn@chromium.org

Change-Id: Ife5676ada7e69b01c3b8fcb3002cd779527e93cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 769403
Reviewed-on: https://chromium-review.googlesource.com/688160
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504747}
parent 2083075a
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
android:padding="8dp"> android:padding="8dp">
<Button <Button
style="@style/SuggestionCardAction" style="@style/SuggestionCardActionModern"
android:id="@+id/action_button" android:id="@+id/action_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -30,11 +30,10 @@ ...@@ -30,11 +30,10 @@
tools:text="Status card body can be over multiple lines and quite wide" /> tools:text="Status card body can be over multiple lines and quite wide" />
<Button <Button
style="@style/SuggestionCardAction" style="@style/SuggestionCardActionModern"
android:id="@+id/status_action_button" android:id="@+id/status_action_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp"
tools:text="Action" /> tools:text="Action" />
</LinearLayout> </LinearLayout>
...@@ -14,17 +14,25 @@ ...@@ -14,17 +14,25 @@
android:padding="8dp" android:padding="8dp"
android:background="@drawable/card_single"> android:background="@drawable/card_single">
<!-- Using some standard metrics (minWidth, paddings) to override the
special ones used in ButtonCompatBorderless -->
<Button <Button
style="@style/SuggestionCardAction"
android:id="@+id/action_button" android:id="@+id/action_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:gravity="center_vertical"
android:text="@string/more" /> android:minWidth="0dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:text="@string/more"
android:textAllCaps="true"
android:textColor="@color/light_active_color"
style="@style/ButtonCompatBorderless" />
<org.chromium.chrome.browser.ntp.cards.ProgressIndicatorView <org.chromium.chrome.browser.ntp.cards.ProgressIndicatorView
android:id="@+id/progress_indicator" android:id="@+id/progress_indicator"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" /> android:layout_gravity="center_vertical"
/>
</FrameLayout> </FrameLayout>
...@@ -30,11 +30,18 @@ ...@@ -30,11 +30,18 @@
android:textColor="@color/snippets_text_color" android:textColor="@color/snippets_text_color"
chrome:leading="20dp" /> chrome:leading="20dp" />
<!-- Negative marginEnd to balance the parent's padding. Buttons are
supposed to have 8dp margin while we have a 16dp margin at the parent
level. -->
<Button <Button
style="@style/SuggestionCardAction" android:id="@+id/status_action_button"
android:id="@+id/status_action_button" style="@style/ButtonCompatBorderless"
android:layout_width="wrap_content" android:layout_marginTop="16dp"
android:layout_height="wrap_content" android:layout_marginEnd="-8dp"
android:layout_marginTop="16dp" /> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAllCaps="true"
android:textColor="@color/light_active_color"
android:textSize="15sp" />
</LinearLayout> </LinearLayout>
...@@ -746,10 +746,9 @@ ...@@ -746,10 +746,9 @@
<item name="android:ellipsize">end</item> <item name="android:ellipsize">end</item>
<item name="leading">16sp</item> <item name="leading">16sp</item>
</style> </style>
<style name="SuggestionCardAction" parent="ButtonCompatBorderless"> <style name="SuggestionCardActionModern" parent="ButtonCompatBorderless">
<item name="android:textAppearance">@style/BlueButtonText2</item> <item name="android:textAppearance">@style/BlueButtonText2</item>
<item name="android:paddingStart">16dp</item> <item name="android:layout_marginTop">16dp</item>
<item name="android:paddingEnd">16dp</item>
<!-- Negative marginEnd to balance the padding from the parent (SuggestionCardModern). <!-- Negative marginEnd to balance the padding from the parent (SuggestionCardModern).
Buttons are supposed to have 8dp margin while we have a 16dp margin at the parent Buttons are supposed to have 8dp margin while we have a 16dp margin at the parent
......
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