Commit 42335384 authored by newt@chromium.org's avatar newt@chromium.org

Update infobar assets.

This also removes the yellow "warning" background variation, so all
infobars now have the same background color.

BUG=375379
R=dfalcantara@chromium.org

Review URL: https://codereview.chromium.org/346853005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278877 0039d316-1c4b-4281-b951-d872f2087c98
parent 6d368af1
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="false"
android:state_focused="false"
android:drawable="@drawable/infobar_button_warning_floating_enabled" />
<item
android:drawable="@drawable/infobar_button_warning_floating_pressed" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="false"
android:state_focused="false"
android:drawable="@drawable/infobar_button_warning_full_left_enabled" />
<item
android:drawable="@drawable/infobar_button_warning_full_left_pressed" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="false"
android:state_focused="false"
android:drawable="@drawable/infobar_button_warning_full_right_enabled" />
<item
android:drawable="@drawable/infobar_button_warning_full_right_pressed" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#fffbfbfb"
android:endColor="#fff2f2f2"
android:angle="270" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="#ffffe991"
android:endColor="#fffee289"
android:angle="270" />
</shape>
......@@ -71,7 +71,7 @@
android:id="@+id/close_button"
android:contentDescription="@string/infobar_close"
android:adjustViewBounds="true"
android:src="@drawable/dismiss"
android:src="@drawable/infobar_close_button"
android:background="@drawable/app_banner_button_close"
android:padding="@dimen/app_banner_close_button_padding"
android:layout_width="wrap_content"
......
......@@ -5,10 +5,9 @@
-->
<resources>
<!-- Colors were copied from browser/views/infobars/infobars.cc -->
<color name="infobar_text">#000000</color>
<color name="infobar_info_background_separator">#afafaf</color>
<color name="infobar_warning_background_separator">#ccb771</color>
<color name="infobar_text">#333</color>
<color name="infobar_background">#fff</color>
<color name="infobar_background_separator">#afafaf</color>
<!-- Tab Switcher Colors -->
<color name="tab_switcher_background">#111111</color>
......
......@@ -27,21 +27,21 @@
<dimen name="edge_swipe_in_additional_slop">50dp</dimen>
<dimen name="edge_swipe_out_slop">18dp</dimen>
<!-- Infobar dimensions -->
<!-- Text size of the InfoBar message. -->
<!-- Infobar dimensions -->
<!-- Text size of the infobar message. -->
<dimen name="infobar_text_size">16sp</dimen>
<!-- Text size of text inside InfoBar buttons. -->
<!-- Text size of text inside infobar buttons. -->
<dimen name="infobar_button_text_size">16sp</dimen>
<!-- Minimum dimension (height or width) of the upper row of an InfoBar. -->
<!-- Minimum dimension (height or width) of the upper row of an infobar. -->
<dimen name="infobar_min_size">60dp</dimen>
<!-- Margin between items in an InfoBar. -->
<!-- Margin between items in an infobar. -->
<dimen name="infobar_margin">10dp</dimen>
<!-- Left/right padding for infobar button text. -->
<dimen name="infobar_button_horizontal_padding">30dp</dimen>
<!-- Minimum height for a touch target. -->
<dimen name="infobar_touch_target_height">40dp</dimen>
<!-- Dimension (height or width) of the InfoBar icon. -->
<dimen name="infobar_icon_size">31dp</dimen>
<!-- Height and width of the infobar icon. -->
<dimen name="infobar_icon_size">36dp</dimen>
<!-- App banner dimensions -->
<dimen name="app_banner_max_width">424dp</dimen>
......
......@@ -33,21 +33,25 @@ public class ConfirmInfoBar extends TwoButtonInfoBar {
public ConfirmInfoBar(InfoBarListeners.Confirm confirmListener, int backgroundType,
int iconDrawableId, String message, String primaryButtonText,
String secondaryButtonText) {
this(confirmListener, backgroundType, iconDrawableId, message, null, primaryButtonText,
this(confirmListener, iconDrawableId, message, primaryButtonText, secondaryButtonText);
}
public ConfirmInfoBar(InfoBarListeners.Confirm confirmListener, int iconDrawableId,
String message, String primaryButtonText, String secondaryButtonText) {
this(confirmListener, iconDrawableId, message, null, primaryButtonText,
secondaryButtonText);
}
public ConfirmInfoBar(InfoBarListeners.Confirm confirmListener, int backgroundType,
int iconDrawableId, String message, String linkText, String primaryButtonText,
String secondaryButtonText) {
this(0, confirmListener, backgroundType, iconDrawableId, message, linkText,
primaryButtonText, secondaryButtonText);
public ConfirmInfoBar(InfoBarListeners.Confirm confirmListener, int iconDrawableId,
String message, String linkText, String primaryButtonText, String secondaryButtonText) {
this(0, confirmListener, iconDrawableId, message, linkText, primaryButtonText,
secondaryButtonText);
}
public ConfirmInfoBar(long nativeInfoBar, InfoBarListeners.Confirm confirmListener,
int backgroundType, int iconDrawableId, String message, String linkText,
String primaryButtonText, String secondaryButtonText) {
super(confirmListener, backgroundType, iconDrawableId);
int iconDrawableId, String message, String linkText, String primaryButtonText,
String secondaryButtonText) {
super(confirmListener, iconDrawableId);
mMessage = message;
mLinkText = linkText;
mPrimaryButtonText = primaryButtonText;
......
......@@ -36,11 +36,8 @@ public class ConfirmInfoBarDelegate {
String linkText, String buttonOk, String buttonCancel) {
int drawableId = ResourceId.mapToDrawableId(enumeratedIconId);
// Apparently, yellow was the popular choice at the time these InfoBars were implemented
// because they stuck out more (hence the BACKGROUND_TYPE_WARNING) default.
ConfirmInfoBar infoBar = new ConfirmInfoBar(nativeInfoBar, null,
InfoBar.BACKGROUND_TYPE_WARNING, drawableId, message, linkText, buttonOk,
buttonCancel);
ConfirmInfoBar infoBar = new ConfirmInfoBar(nativeInfoBar, null, drawableId, message,
linkText, buttonOk, buttonCancel);
return infoBar;
}
}
This diff is collapsed.
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