Backed out changeset fa1f219e3eba (bug 1077755) for bustage CLOSED TREE
This commit is contained in:
@@ -6,14 +6,13 @@ package org.mozilla.gecko.menu;
|
|||||||
|
|
||||||
import org.mozilla.gecko.NewTabletUI;
|
import org.mozilla.gecko.NewTabletUI;
|
||||||
import org.mozilla.gecko.R;
|
import org.mozilla.gecko.R;
|
||||||
import org.mozilla.gecko.widget.ThemedImageButton;
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
|
||||||
public class MenuItemActionBar extends ThemedImageButton
|
public class MenuItemActionBar extends ImageButton
|
||||||
implements GeckoMenuItem.Layout {
|
implements GeckoMenuItem.Layout {
|
||||||
private static final String LOGTAG = "GeckoMenuItemActionBar";
|
private static final String LOGTAG = "GeckoMenuItemActionBar";
|
||||||
|
|
||||||
|
|||||||
@@ -3,40 +3,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
xmlns:gecko="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<item gecko:state_private="true"
|
|
||||||
android:state_pressed="true"
|
|
||||||
android:state_enabled="true">
|
|
||||||
|
|
||||||
<inset android:insetTop="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
|
|
||||||
android:insetBottom="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
|
|
||||||
android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
|
|
||||||
android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
|
|
||||||
<shape android:shape="rectangle">
|
|
||||||
<solid android:color="@color/new_tablet_highlight_pb"/>
|
|
||||||
<corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
|
|
||||||
</shape>
|
|
||||||
</inset>
|
|
||||||
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item gecko:state_private="true"
|
|
||||||
android:state_focused="true"
|
|
||||||
android:state_pressed="false">
|
|
||||||
|
|
||||||
<inset android:insetTop="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
|
|
||||||
android:insetBottom="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
|
|
||||||
android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
|
|
||||||
android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
|
|
||||||
<shape android:shape="rectangle">
|
|
||||||
<solid android:color="@color/new_tablet_highlight_focused_pb"/>
|
|
||||||
<corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
|
|
||||||
</shape>
|
|
||||||
</inset>
|
|
||||||
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item android:state_pressed="true"
|
<item android:state_pressed="true"
|
||||||
android:state_enabled="true">
|
android:state_enabled="true">
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import java.util.Arrays;
|
|||||||
import org.mozilla.gecko.R;
|
import org.mozilla.gecko.R;
|
||||||
import org.mozilla.gecko.Tab;
|
import org.mozilla.gecko.Tab;
|
||||||
import org.mozilla.gecko.Tabs;
|
import org.mozilla.gecko.Tabs;
|
||||||
import org.mozilla.gecko.menu.MenuItemActionBar;
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
@@ -122,13 +121,8 @@ abstract class BrowserToolbarTabletBase extends BrowserToolbar {
|
|||||||
@Override
|
@Override
|
||||||
public void setPrivateMode(final boolean isPrivate) {
|
public void setPrivateMode(final boolean isPrivate) {
|
||||||
super.setPrivateMode(isPrivate);
|
super.setPrivateMode(isPrivate);
|
||||||
|
|
||||||
backButton.setPrivateMode(isPrivate);
|
backButton.setPrivateMode(isPrivate);
|
||||||
forwardButton.setPrivateMode(isPrivate);
|
forwardButton.setPrivateMode(isPrivate);
|
||||||
for (int i = 0; i < actionItemBar.getChildCount(); ++i) {
|
|
||||||
final MenuItemActionBar child = (MenuItemActionBar) actionItemBar.getChildAt(i);
|
|
||||||
child.setPrivateMode(isPrivate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean canDoBack(final Tab tab) {
|
protected boolean canDoBack(final Tab tab) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#filter substitution
|
#filter substitution
|
||||||
#define VIEW_NAME_SUFFIX EditText
|
#define VIEW_NAME_SUFFIX EditText
|
||||||
#define BASE_TYPE android.widget.EditText
|
#define BASE_TYPE android.widget.EditText
|
||||||
#define STYLE_CONSTRUCTOR 1
|
|
||||||
#include ThemedView.java.frag
|
#include ThemedView.java.frag
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#filter substitution
|
#filter substitution
|
||||||
#define VIEW_NAME_SUFFIX ImageButton
|
#define VIEW_NAME_SUFFIX ImageButton
|
||||||
#define BASE_TYPE android.widget.ImageButton
|
#define BASE_TYPE android.widget.ImageButton
|
||||||
#define STYLE_CONSTRUCTOR 1
|
|
||||||
#include ThemedView.java.frag
|
#include ThemedView.java.frag
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#filter substitution
|
#filter substitution
|
||||||
#define VIEW_NAME_SUFFIX ImageView
|
#define VIEW_NAME_SUFFIX ImageView
|
||||||
#define BASE_TYPE android.widget.ImageView
|
#define BASE_TYPE android.widget.ImageView
|
||||||
#define STYLE_CONSTRUCTOR 1
|
|
||||||
#include ThemedView.java.frag
|
#include ThemedView.java.frag
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#filter substitution
|
#filter substitution
|
||||||
#define VIEW_NAME_SUFFIX RelativeLayout
|
#define VIEW_NAME_SUFFIX RelativeLayout
|
||||||
#define BASE_TYPE android.widget.RelativeLayout
|
#define BASE_TYPE android.widget.RelativeLayout
|
||||||
#define STYLE_CONSTRUCTOR 1
|
|
||||||
#include ThemedView.java.frag
|
#include ThemedView.java.frag
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#filter substitution
|
#filter substitution
|
||||||
#define VIEW_NAME_SUFFIX TextView
|
#define VIEW_NAME_SUFFIX TextView
|
||||||
#define BASE_TYPE android.widget.TextView
|
#define BASE_TYPE android.widget.TextView
|
||||||
#define STYLE_CONSTRUCTOR 1
|
|
||||||
#include ThemedView.java.frag
|
#include ThemedView.java.frag
|
||||||
|
|||||||
@@ -31,16 +31,7 @@ public class Themed@VIEW_NAME_SUFFIX@ extends @BASE_TYPE@
|
|||||||
private boolean mAutoUpdateTheme = true;
|
private boolean mAutoUpdateTheme = true;
|
||||||
|
|
||||||
public Themed@VIEW_NAME_SUFFIX@(Context context, AttributeSet attrs) {
|
public Themed@VIEW_NAME_SUFFIX@(Context context, AttributeSet attrs) {
|
||||||
this(context, attrs, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Themed@VIEW_NAME_SUFFIX@(Context context, AttributeSet attrs, int defStyle) {
|
|
||||||
#ifdef STYLE_CONSTRUCTOR
|
|
||||||
super(context, attrs, defStyle);
|
|
||||||
#else
|
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
#endif
|
|
||||||
|
|
||||||
mTheme = ((GeckoApplication) context.getApplicationContext()).getLightweightTheme();
|
mTheme = ((GeckoApplication) context.getApplicationContext()).getLightweightTheme();
|
||||||
|
|
||||||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LightweightTheme);
|
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LightweightTheme);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#filter substitution
|
#filter substitution
|
||||||
#define VIEW_NAME_SUFFIX View
|
#define VIEW_NAME_SUFFIX View
|
||||||
#define BASE_TYPE android.view.View
|
#define BASE_TYPE android.view.View
|
||||||
#define STYLE_CONSTRUCTOR 1
|
|
||||||
#include ThemedView.java.frag
|
#include ThemedView.java.frag
|
||||||
|
|||||||
Reference in New Issue
Block a user