Bug 852237: Tabs button pressed state with neutral highlight color. [r=mfinkle]

--HG--
extra : rebase_source : 1b686f50165419c641b15401260e081d558f9886
This commit is contained in:
Sriram Ramasubramanian 2013-03-18 14:44:39 -07:00
parent 6f909bce1c
commit 785189ac75
7 changed files with 28 additions and 15 deletions

View File

@ -63,8 +63,8 @@ public class MenuButton extends ShapedButton {
Resources resources = getContext().getResources();
StateListDrawable stateList = new StateListDrawable();
stateList.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(resources.getColor(R.color.highlight_dark)));
stateList.addState(new int[] { android.R.attr.state_focused }, new ColorDrawable(resources.getColor(R.color.highlight_dark_focused)));
stateList.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(resources.getColor(R.color.highlight_menu)));
stateList.addState(new int[] { android.R.attr.state_focused }, new ColorDrawable(resources.getColor(R.color.highlight_menu_focused)));
stateList.addState(new int[] { R.attr.state_private }, new ColorDrawable(Color.BLACK));
stateList.addState(new int[] {}, drawable);

View File

@ -170,14 +170,14 @@ public class TabsButton extends ShapedButton {
Resources resources = this.getContext().getResources();
StateListDrawable stateList1 = new StateListDrawable();
stateList1.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(resources.getColor(R.color.highlight_dark)));
stateList1.addState(new int[] { android.R.attr.state_focused }, new ColorDrawable(resources.getColor(R.color.highlight_dark_focused)));
stateList1.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(resources.getColor(R.color.highlight_tabs)));
stateList1.addState(new int[] { android.R.attr.state_focused }, new ColorDrawable(resources.getColor(R.color.highlight_tabs_focused)));
stateList1.addState(new int[] { R.attr.state_private }, new ColorDrawable(resources.getColor(R.color.background_tabs_light)));
stateList1.addState(new int[] {}, lightWeight1);
StateListDrawable stateList2 = new StateListDrawable();
stateList2.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(resources.getColor(R.color.highlight_dark)));
stateList2.addState(new int[] { android.R.attr.state_focused }, new ColorDrawable(resources.getColor(R.color.highlight_dark_focused)));
stateList2.addState(new int[] { android.R.attr.state_pressed }, new ColorDrawable(resources.getColor(R.color.highlight_tabs)));
stateList2.addState(new int[] { android.R.attr.state_focused }, new ColorDrawable(resources.getColor(R.color.highlight_tabs_focused)));
stateList2.addState(new int[] { R.attr.state_private }, new ColorDrawable(resources.getColor(R.color.background_tabs_dark)));
stateList2.addState(new int[] {}, lightWeight2);

View File

@ -10,11 +10,11 @@
<selector>
<item android:state_pressed="true"
android:drawable="@color/highlight_dark"/>
android:drawable="@color/highlight_tabs"/>
<item android:state_focused="true"
android:state_pressed="false"
android:drawable="@color/highlight_dark_focused"/>
android:drawable="@color/highlight_tabs_focused"/>
<item android:drawable="@color/background_tabs_light"/>
@ -27,11 +27,11 @@
<selector>
<item android:state_pressed="true"
android:drawable="@color/highlight_dark"/>
android:drawable="@color/highlight_tabs"/>
<item android:state_focused="true"
android:state_pressed="false"
android:drawable="@color/highlight_dark_focused"/>
android:drawable="@color/highlight_tabs_focused"/>
<item android:drawable="@color/background_tabs_dark"/>

View File

@ -10,11 +10,11 @@
<selector>
<item android:state_pressed="true"
android:drawable="@color/highlight_dark"/>
android:drawable="@color/highlight_menu"/>
<item android:state_focused="true"
android:state_pressed="false"
android:drawable="@color/highlight_dark_focused"/>
android:drawable="@color/highlight_menu_focused"/>
<item android:drawable="@android:color/black"/>

View File

@ -10,11 +10,11 @@
<selector>
<item android:state_pressed="true"
android:drawable="@color/highlight_dark"/>
android:drawable="@color/highlight_tabs"/>
<item android:state_focused="true"
android:state_pressed="false"
android:drawable="@color/highlight_dark_focused"/>
android:drawable="@color/highlight_tabs_focused"/>
<item android:drawable="@color/background_tabs_light"/>

View File

@ -22,6 +22,6 @@
android:padding="@dimen/browser_toolbar_button_padding"
android:src="@drawable/tab_new_level"
android:contentDescription="@string/new_tab"
android:background="@drawable/action_bar_button"/>
android:background="@drawable/action_bar_button_inverse"/>
</merge>

View File

@ -12,6 +12,19 @@
<color name="highlight_focused">#1A000000</color>
<color name="highlight_dark">#33FFFFFF</color>
<color name="highlight_dark_focused">#1AFFFFFF</color>
<!-- highlight on tabs button: 20% black over background_tabs_dark -->
<color name="highlight_tabs">#FF696D71</color>
<!-- highlight-focused on tabs button: 10% black over background_tabs_dark -->
<color name="highlight_tabs_focused">#FF565B60</color>
<!-- highlight on menu button: 20% black over black -->
<color name="highlight_menu">#FF333333</color>
<!-- highlight-focused on menu button: 10% black over black -->
<color name="highlight_menu_focused">#FF1A1A1A</color>
<color name="autocomplete_listitem_text">#000000</color>
<color name="splash_background">#000000</color>
<color name="splash_msgfont">#ffffff</color>