Commit a915d244 authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Download later: Use filled color for positive buttons.

There is a new property in modal dialog to control whether the positive
button is blue. For download later dialog and location dialog, the
positive button should be blue.

Bug: 1108865
Change-Id: I6ee6d6c1b3e190c9a7186dcfe31929f13b0c96cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315431Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Reviewed-by: default avatarHesen Zhang <hesen@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791505}
parent 4a2a0c4e
...@@ -132,6 +132,7 @@ public class DownloadLaterDialogCoordinator implements ModalDialogProperties.Con ...@@ -132,6 +132,7 @@ public class DownloadLaterDialogCoordinator implements ModalDialogProperties.Con
.with(ModalDialogProperties.CUSTOM_VIEW, mCustomView) .with(ModalDialogProperties.CUSTOM_VIEW, mCustomView)
.with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, context.getResources(), .with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, context.getResources(),
R.string.duplicate_download_infobar_download_button) R.string.duplicate_download_infobar_download_button)
.with(ModalDialogProperties.PRIMARY_BUTTON_FILLED, true)
.with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, context.getResources(), .with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, context.getResources(),
R.string.cancel) R.string.cancel)
.build(); .build();
......
...@@ -143,12 +143,12 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. ...@@ -143,12 +143,12 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties.
mDialogType, new File(mSuggestedPath), mTotalBytes, getTitle(mDialogType)); mDialogType, new File(mSuggestedPath), mTotalBytes, getTitle(mDialogType));
Resources resources = mContext.getResources(); Resources resources = mContext.getResources();
mDialogModel = mDialogModel = new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
.with(ModalDialogProperties.CONTROLLER, this) .with(ModalDialogProperties.CONTROLLER, this)
.with(ModalDialogProperties.CUSTOM_VIEW, mCustomView) .with(ModalDialogProperties.CUSTOM_VIEW, mCustomView)
.with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, resources, .with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, resources,
R.string.duplicate_download_infobar_download_button) R.string.duplicate_download_infobar_download_button)
.with(ModalDialogProperties.PRIMARY_BUTTON_FILLED, true)
.with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, resources, .with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, resources,
R.string.cancel) R.string.cancel)
.build(); .build();
......
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