mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 844984: Remove overdraw in Awesomebar. [r=bnicholson]
This commit is contained in:
parent
886b6d7469
commit
e34d7b5105
@ -33,7 +33,6 @@ public class AwesomeBarTabs extends TabHost
|
||||
private View.OnTouchListener mListTouchListener;
|
||||
private boolean mSearching = false;
|
||||
private String mTarget;
|
||||
private Background mBackground;
|
||||
private ViewPager mViewPager;
|
||||
private AwesomePagerAdapter mPagerAdapter;
|
||||
|
||||
@ -138,8 +137,6 @@ public class AwesomeBarTabs extends TabHost
|
||||
}
|
||||
};
|
||||
|
||||
mBackground = (Background) findViewById(R.id.awesomebar_background);
|
||||
|
||||
mTabs = new AwesomeBarTab[] {
|
||||
new AllPagesTab(mContext),
|
||||
new BookmarksTab(mContext),
|
||||
@ -339,15 +336,15 @@ public class AwesomeBarTabs extends TabHost
|
||||
if (mTarget.equals(AwesomeBar.Target.CURRENT_TAB.name())) {
|
||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
||||
if (tab != null && tab.isPrivate())
|
||||
mBackground.setPrivateMode(true);
|
||||
((BackgroundLayout) findViewById(R.id.tab_widget_container)).setPrivateMode(true);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Background extends GeckoLinearLayout
|
||||
implements LightweightTheme.OnChangeListener {
|
||||
public static class BackgroundLayout extends GeckoLinearLayout
|
||||
implements LightweightTheme.OnChangeListener {
|
||||
private GeckoActivity mActivity;
|
||||
|
||||
public Background(Context context, AttributeSet attrs) {
|
||||
public BackgroundLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
mActivity = (GeckoActivity) context;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public final class GeckoViewsFactory implements LayoutInflater.Factory {
|
||||
mFactoryMap.put("AboutHomeContent$TopSitesGridView", AboutHomeContent.TopSitesGridView.class.getConstructor(arg1Class, arg2Class));
|
||||
mFactoryMap.put("AboutHomeSection", AboutHomeSection.class.getConstructor(arg1Class, arg2Class));
|
||||
mFactoryMap.put("AwesomeBarTabs", AwesomeBarTabs.class.getConstructor(arg1Class, arg2Class));
|
||||
mFactoryMap.put("AwesomeBarTabs.Background", AwesomeBarTabs.Background.class.getConstructor(arg1Class, arg2Class));
|
||||
mFactoryMap.put("AwesomeBarTabs$BackgroundLayout", AwesomeBarTabs.BackgroundLayout.class.getConstructor(arg1Class, arg2Class));
|
||||
mFactoryMap.put("BackButton", BackButton.class.getConstructor(arg1Class, arg2Class));
|
||||
mFactoryMap.put("BrowserToolbarBackground", BrowserToolbarBackground.class.getConstructor(arg1Class, arg2Class));
|
||||
mFactoryMap.put("BrowserToolbar$RightEdge", BrowserToolbar.RightEdge.class.getConstructor(arg1Class, arg2Class));
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/awesome_screen"
|
||||
style="@style/Screen">
|
||||
style="@style/Screen.Transparent">
|
||||
|
||||
<include layout="@layout/awesomebar_search"/>
|
||||
|
||||
|
@ -3,13 +3,15 @@
|
||||
- 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/. -->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/awesomebar_row_height"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="10dip">
|
||||
<view xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
class="org.mozilla.gecko.AwesomeBarTabs$BackgroundLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:minHeight="@dimen/awesomebar_row_height"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="10dip"
|
||||
android:background="@drawable/address_bar_bg">
|
||||
|
||||
<Gecko.TextView android:id="@+id/suggestions_prompt_title"
|
||||
android:layout_height="wrap_content"
|
||||
@ -45,4 +47,4 @@
|
||||
android:clickable="true"
|
||||
android:text="@string/button_no" />
|
||||
|
||||
</LinearLayout>
|
||||
</view>
|
||||
|
@ -8,16 +8,15 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<view class="org.mozilla.gecko.AwesomeBarTabs.Background"
|
||||
android:id="@+id/awesomebar_background"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/address_bar_bg">
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<LinearLayout android:id="@+id/tab_widget_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<view class="org.mozilla.gecko.AwesomeBarTabs$BackgroundLayout"
|
||||
android:id="@+id/tab_widget_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/address_bar_bg">
|
||||
|
||||
<View android:id="@+id/tab_widget_left"
|
||||
style="@style/AwesomeBarTabIndicatorCurve.Left"/>
|
||||
@ -28,7 +27,7 @@
|
||||
<View android:id="@+id/tab_widget_right"
|
||||
style="@style/AwesomeBarTabIndicatorCurve.Right"/>
|
||||
|
||||
</LinearLayout>
|
||||
</view>
|
||||
|
||||
<FrameLayout android:id="@android:id/tabcontent"
|
||||
android:visibility="gone"
|
||||
@ -40,6 +39,6 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"/>
|
||||
|
||||
</view>
|
||||
</LinearLayout>
|
||||
|
||||
</org.mozilla.gecko.AwesomeBarTabs>
|
||||
|
@ -54,6 +54,7 @@
|
||||
|
||||
<style name="Gecko.Light.AwesomeBar">
|
||||
<item name="android:actionBarStyle">@style/ActionBar.AwesomeBar</item>
|
||||
<item name="android:windowBackground">@null</item>
|
||||
</style>
|
||||
|
||||
<style name="Gecko.TitleBar.Preferences">
|
||||
|
@ -40,7 +40,9 @@
|
||||
<item name="android:windowBackground">@color/background_normal</item>
|
||||
</style>
|
||||
|
||||
<style name="Gecko.Light.AwesomeBar"/>
|
||||
<style name="Gecko.Light.AwesomeBar">
|
||||
<item name="android:windowBackground">@null</item>
|
||||
</style>
|
||||
|
||||
<style name="Gecko.TitleBar.Preferences"/>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user