зеркало из https://github.com/mozilla/gecko-dev.git
Bug 582244 - Part 4: Change URL bar color for PB tabs. r=mfinkle
This commit is contained in:
Родитель
9ce68c7ba9
Коммит
988cb0c34a
|
@ -673,9 +673,14 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
|||
updateTabCount(Tabs.getInstance().getCount());
|
||||
updateBackButton(tab.canDoBack());
|
||||
updateForwardButton(tab.canDoForward());
|
||||
updateBackgroundColor(tab.isPrivate() ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateBackgroundColor(int level) {
|
||||
mAwesomeBar.getBackground().setLevel(level);
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
// The action-items views are reused on rotation.
|
||||
// Remove them from their parent, so they can be re-attached to new parent.
|
||||
|
|
|
@ -924,6 +924,7 @@ MOZ_ANDROID_DRAWABLES += \
|
|||
mobile/android/base/resources/drawable/action_bar_button.xml \
|
||||
mobile/android/base/resources/drawable/address_bar_bg.xml \
|
||||
mobile/android/base/resources/drawable/address_bar_bg_shadow_repeat.xml \
|
||||
mobile/android/base/resources/drawable/address_bar_url_level.xml \
|
||||
mobile/android/base/resources/drawable/autocomplete_list_bg.9.png \
|
||||
mobile/android/base/resources/drawable/awesomebar_tab_indicator.xml \
|
||||
mobile/android/base/resources/drawable/awesomebar_tab_selected.xml \
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- 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/. -->
|
||||
|
||||
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:maxLevel="0" android:drawable="@drawable/address_bar_url"/>
|
||||
|
||||
<item android:maxLevel="1" android:drawable="@color/private_browsing_color"/>
|
||||
|
||||
</level-list>
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
<Button android:id="@+id/awesome_bar"
|
||||
style="@style/AddressBar.Button"
|
||||
android:background="@drawable/address_bar_url"/>
|
||||
android:background="@drawable/address_bar_url_level"/>
|
||||
|
||||
<LinearLayout style="@style/AddressBar.Button"
|
||||
android:orientation="horizontal">
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
<Button android:id="@+id/awesome_bar"
|
||||
style="@style/AddressBar.Button"
|
||||
android:background="@drawable/address_bar_url"/>
|
||||
android:background="@drawable/address_bar_url_level"/>
|
||||
|
||||
<LinearLayout style="@style/AddressBar.Button"
|
||||
android:orientation="horizontal">
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:background="@drawable/address_bar_url"/>
|
||||
android:background="@drawable/address_bar_url_level"/>
|
||||
|
||||
<ImageButton android:id="@+id/forward"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:background="@drawable/address_bar_url"/>
|
||||
android:background="@drawable/address_bar_url_level"/>
|
||||
|
||||
<ImageButton android:id="@+id/forward"
|
||||
style="@style/AddressBar.ImageButton"
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
<Button android:id="@+id/awesome_bar"
|
||||
style="@style/AddressBar.Button"
|
||||
android:background="@drawable/address_bar_url"/>
|
||||
android:background="@drawable/address_bar_url_level"/>
|
||||
|
||||
<LinearLayout style="@style/AddressBar.Button"
|
||||
android:orientation="horizontal">
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
<Button android:id="@+id/awesome_bar"
|
||||
style="@style/AddressBar.Button"
|
||||
android:background="@drawable/address_bar_url"/>
|
||||
android:background="@drawable/address_bar_url_level"/>
|
||||
|
||||
<LinearLayout style="@style/AddressBar.Button"
|
||||
android:orientation="horizontal">
|
||||
|
|
|
@ -16,5 +16,6 @@
|
|||
<color name="url_bar_text_highlight">#FF9500</color>
|
||||
<color name="suggestion_primary">#dddddd</color>
|
||||
<color name="suggestion_pressed">#bbbbbb</color>
|
||||
<color name="private_browsing_color">#993399</color>
|
||||
</resources>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче