Closes #647 - Private Mode Inherit from Dark Theme
parent
f22f3ec9e2
commit
7baafe2c37
|
@ -33,13 +33,14 @@ open class HomeActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
browsingModeManager = DefaultBrowsingModeManager(this)
|
||||
|
||||
setContentView(R.layout.activity_home)
|
||||
|
||||
setTheme(themeManager.currentTheme)
|
||||
DefaultThemeManager.applyStatusBarTheme(window, themeManager, this)
|
||||
|
||||
browsingModeManager = DefaultBrowsingModeManager(this)
|
||||
|
||||
setContentView(R.layout.activity_home)
|
||||
|
||||
if (intent?.extras?.getBoolean(OPEN_TO_BROWSER) == true) {
|
||||
openToBrowser()
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class HomeMenu(
|
|||
context.getString(R.string.browser_menu_settings),
|
||||
R.drawable.ic_settings,
|
||||
context.getString(R.string.browser_menu_settings),
|
||||
DefaultThemeManager.resolveAttribute(R.attr.browserToolbarMenuIcons, context)
|
||||
DefaultThemeManager.resolveAttribute(R.attr.iconColor, context)
|
||||
) {
|
||||
onItemTapped.invoke(HomeMenu.Item.Settings)
|
||||
},
|
||||
|
@ -38,7 +38,7 @@ class HomeMenu(
|
|||
context.getString(R.string.browser_menu_library),
|
||||
R.drawable.ic_library,
|
||||
context.getString(R.string.browser_menu_library),
|
||||
DefaultThemeManager.resolveAttribute(R.attr.browserToolbarMenuIcons, context)
|
||||
DefaultThemeManager.resolveAttribute(R.attr.iconColor, context)
|
||||
) {
|
||||
onItemTapped.invoke(HomeMenu.Item.Library)
|
||||
},
|
||||
|
@ -48,7 +48,7 @@ class HomeMenu(
|
|||
context.getString(R.string.browser_menu_help),
|
||||
R.drawable.ic_help,
|
||||
context.getString(R.string.browser_menu_help),
|
||||
DefaultThemeManager.resolveAttribute(R.attr.browserToolbarMenuIcons, context)
|
||||
DefaultThemeManager.resolveAttribute(R.attr.iconColor, context)
|
||||
) {
|
||||
onItemTapped.invoke(HomeMenu.Item.Help)
|
||||
})
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:fillColor="#0C0C0D"
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M8,15a7,7 0,1 1,7 -7,7 7,0 0,1 -7,7zM8,2a6,6 0,1 0,6 6,6 6,0 0,0 -6,-6zM8,12a1,1 0,0 1,-1 -1L7,8a1,1 0,0 1,2 0v3a1,1 0,0 1,-1 1zM8,6a1,1 0,1 1,1 -1,1 1,0 0,1 -1,1z" />
|
||||
</vector>
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="m12,7c1.3807,0 2.5,-1.1193 2.5,-2.5s-1.1193,-2.5 -2.5,-2.5 -2.5,1.1193 -2.5,2.5 1.1193,2.5 2.5,2.5zM4,9c0,-0.5523 0.4477,-1 1,-1h14c0.5523,0 1,0.4477 1,1s-0.4477,1 -1,1h-4v6,5c0,0.5523 -0.4477,1 -1,1s-1,-0.4477 -1,-1v-5h-2v5c0,0.5523 -0.4477,1 -1,1 -0.5523,0 -1,-0.4477 -1,-1v-5,-6h-4c-0.5523,0 -1,-0.4477 -1,-1z"
|
||||
android:fillColor="#0c0c0d" />
|
||||
android:fillColor="?attr/iconColor" />
|
||||
</vector>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8,6 +8,6 @@
|
|||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="@color/icons"
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:pathData="M13.326,12l4.337,-4.337a0.938,0.938 0,0 0,-1.326 -1.326L12,10.674 7.663,6.337A0.938,0.938 0,0 0,6.337 7.663L10.674,12 6.337,16.337a0.938,0.938 0,0 0,1.326 1.326L12,13.326l4.337,4.337a0.938,0.938 0,0 0,1.326 -1.326Z" />
|
||||
</vector>
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M22,6a2,2 0,0 1,-2.07 1.999l-3.164,5.062a2,2 0,1 1,-3.762 0.81l-3.117,-2.078A1.992,1.992 0,0 1,8.93 12l-3.164,5.06A2,2 0,1 1,4.07 16l3.164,-5.062a2,2 0,1 1,3.762 -0.81l3.117,2.078A1.992,1.992 0,0 1,15.07 12l3.164,-5.062A2,2 0,1 1,22 6z"
|
||||
android:fillColor="#0C0C0D"
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,9 +7,9 @@
|
|||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:fillColor="#0C0C0D"
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:pathData="M13.577,1H2.423A2.426,2.426 0,0 0,0 3.423v6.154A2.426,2.426 0,0 0,2.423 12H8.26l2.966,3.633A1,1 0,0 0,13 15v-3h0.577A2.426,2.426 0,0 0,16 9.577V3.423A2.426,2.426 0,0 0,13.577 1zM14,9.577a0.423,0.423 0,0 1,-0.423 0.423H12a1,1 0,0 0,-1 1v1.194l-1.491,-1.827A1,1 0,0 0,8.734 10H2.423A0.423,0.423 0,0 1,2 9.577V3.423A0.423,0.423 0,0 1,2.423 3h11.154a0.423,0.423 0,0 1,0.423 0.423z" />
|
||||
<path
|
||||
android:fillColor="#0C0C0D"
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:pathData="M11.5,5h-7a0.5,0.5 0,0 0,0 1h7a0.5,0.5 0,0 0,0 -1zM11.5,7h-7a0.5,0.5 0,0 0,0 1h7a0.5,0.5 0,0 0,0 -1z" />
|
||||
</vector>
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
<vector android:height="24dp" android:viewportHeight="16"
|
||||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#0C0C0D" android:pathData="M7.281,5H8.75A0.25,0.25 0,0 0,9 4.75V0.984a0.984,0.984 0,0 0,-1.969 0V4.75a0.25,0.25 0,0 0,0.25 0.25z"/>
|
||||
<path android:fillColor="#0C0C0D" android:pathData="M13.5,2H11a1,1 0,0 0,0 2h2.5a0.5,0.5 0,0 1,0.5 0.5v7a0.5,0.5 0,0 1,-0.5 0.5h-11a0.5,0.5 0,0 1,-0.5 -0.5v-7a0.5,0.5 0,0 1,0.5 -0.5H5a1,1 0,0 0,0 -2H2.5A2.5,2.5 0,0 0,0 4.5v7A2.5,2.5 0,0 0,2.5 14h11a2.5,2.5 0,0 0,2.5 -2.5v-7A2.5,2.5 0,0 0,13.5 2z"/>
|
||||
<path android:fillColor="#0C0C0D" android:pathData="M3.577,6L6.423,6A0.577,0.577 0,0 1,7 6.577L7,9.423A0.577,0.577 0,0 1,6.423 10L3.577,10A0.577,0.577 0,0 1,3 9.423L3,6.577A0.577,0.577 0,0 1,3.577 6z"/>
|
||||
<path android:fillColor="#0C0C0D" android:pathData="M9.5,7h3a0.5,0.5 0,0 0,0 -1h-3a0.5,0.5 0,0 0,0 1zM9.5,8a0.5,0.5 0,0 0,0 1h2a0.5,0.5 0,0 0,0 -1z"/>
|
||||
<path android:fillColor="?attr/iconColor" android:pathData="M7.281,5H8.75A0.25,0.25 0,0 0,9 4.75V0.984a0.984,0.984 0,0 0,-1.969 0V4.75a0.25,0.25 0,0 0,0.25 0.25z"/>
|
||||
<path android:fillColor="?attr/iconColor" android:pathData="M13.5,2H11a1,1 0,0 0,0 2h2.5a0.5,0.5 0,0 1,0.5 0.5v7a0.5,0.5 0,0 1,-0.5 0.5h-11a0.5,0.5 0,0 1,-0.5 -0.5v-7a0.5,0.5 0,0 1,0.5 -0.5H5a1,1 0,0 0,0 -2H2.5A2.5,2.5 0,0 0,0 4.5v7A2.5,2.5 0,0 0,2.5 14h11a2.5,2.5 0,0 0,2.5 -2.5v-7A2.5,2.5 0,0 0,13.5 2z"/>
|
||||
<path android:fillColor="?attr/iconColor" android:pathData="M3.577,6L6.423,6A0.577,0.577 0,0 1,7 6.577L7,9.423A0.577,0.577 0,0 1,6.423 10L3.577,10A0.577,0.577 0,0 1,3 9.423L3,6.577A0.577,0.577 0,0 1,3.577 6z"/>
|
||||
<path android:fillColor="?attr/iconColor" android:pathData="M9.5,7h3a0.5,0.5 0,0 0,0 -1h-3a0.5,0.5 0,0 0,0 1zM9.5,8a0.5,0.5 0,0 0,0 1h2a0.5,0.5 0,0 0,0 -1z"/>
|
||||
</vector>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -10,7 +10,6 @@
|
|||
<path
|
||||
android:pathData="M12,22C6.4772,22 2,17.5228 2,12C2,6.4772 6.4772,2 12,2C17.5228,2 22,6.4772 22,12C21.9939,17.5203 17.5203,21.9939 12,22L12,22ZM12,4C7.5817,4 4,7.5817 4,12C4,16.4183 7.5817,20 12,20C16.4183,20 20,16.4183 20,12C19.995,7.5838 16.4162,4.005 12,4ZM16.5,13L11.5,13C11.2239,13 11,12.7761 11,12.5L11,7.5C11,7.2239 11.2239,7 11.5,7C11.7761,7 12,7.2239 12,7.5L12,12L16.5,12C16.7761,12 17,12.2239 17,12.5C17,12.7761 16.7761,13 16.5,13Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#202340"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#0C0C0D"
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M5,4a1,1 0,1 0,-2 0v16a1,1 0,1 0,2 0L5,4zM9,7a1,1 0,1 0,-2 0v13a1,1 0,1 0,2 0L9,7zM12,5a1,1 0,0 1,1 1v14a1,1 0,1 1,-2 0L11,6a1,1 0,0 1,1 -1zM16.452,5.694a1,1 0,1 0,-1.904 0.612l4.5,14a1,1 0,1 0,1.904 -0.612l-4.5,-14z" />
|
||||
</vector>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -7,6 +7,6 @@
|
|||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:pathData="M8,0C4.3,0 2,2.107 2,5.5c0,2.372 2.065,4.268 3,5L5,14c0,1.476 1.616,2 3,2s3,-0.524 3,-2v-3.5c0.935,-0.736 3,-2.632 3,-5C14,2.107 11.7,0 8,0zM9,12L7,12v-1h2zM8,14a3.086,3.086 0,0 1,-1 -0.172L7,13h2v0.828A3.047,3.047 0,0 1,8 14zM9.445,9.168A1,1 0,0 0,9 10L7,10a1,1 0,0 0,-0.444 -0.831C5.845,8.691 4,7.1 4,5.5 4,2.607 6.175,2 8,2s4,0.607 4,3.5c0,1.6 -1.845,3.191 -2.555,3.668z" />
|
||||
</vector>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -8,6 +8,6 @@
|
|||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="@color/icons"
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:pathData="M21.457,20.043l-6,-6a7.528,7.528 0,1 0,-1.414 1.414l6,6a1,1 0,0 0,1.414 -1.414ZM9.5,15A5.5,5.5 0,1 1,15 9.5,5.507 5.507,0 0,1 9.5,15Z" />
|
||||
</vector>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12,7 +12,7 @@
|
|||
</item>
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="#FFFFFF" />
|
||||
<solid android:color="?attr/pillWrapperBackground" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
android:id="@+id/navigationToolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:background="@color/off_white"
|
||||
android:background="?attr/toolbarColor"
|
||||
android:elevation="8dp"/>
|
||||
|
||||
<fragment
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
<item
|
||||
android:id="@+id/librarySearch"
|
||||
android:icon="@drawable/ic_search"
|
||||
android:iconTint="@color/icons"
|
||||
android:iconTint="?attr/iconColor"
|
||||
android:title="@string/library_search"
|
||||
app:showAsAction="always"
|
||||
tools:targetApi="o" />
|
||||
<item
|
||||
android:id="@+id/libraryClose"
|
||||
android:icon="@drawable/ic_close"
|
||||
android:iconTint="@color/icons"
|
||||
android:iconTint="?attr/iconColor"
|
||||
android:title="@string/mozac_close_button_description"
|
||||
app:showAsAction="always"
|
||||
tools:targetApi="o" />
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
<attr name="searchBarColor" format="reference"/>
|
||||
<attr name="fenixPrimary" format="reference"/>
|
||||
<attr name="iconColor" format="reference"/>
|
||||
<attr name="toolbarColor" format="reference"/>
|
||||
|
||||
<!-- Home fragment -->
|
||||
<attr name="homeBackgroundTopGradient" format="reference"/>
|
||||
|
|
|
@ -22,9 +22,14 @@
|
|||
<color name="search_text">#0C0C0D</color>
|
||||
<color name="off_white">#f9f9fa</color>
|
||||
<color name="url_box_view">#E9E9ED</color>
|
||||
<color name="icons">#20233E</color>
|
||||
<color name="session_border_color">#2f26c1</color>
|
||||
|
||||
<color name="icons_light_mode">#20233E</color>
|
||||
<color name="icons_dark_mode">@color/off_white</color>
|
||||
|
||||
<color name="toolbar_light_mode">@color/off_white</color>
|
||||
<color name="toolbar_dark_mode">@color/private_browsing_top_gradient</color>
|
||||
|
||||
<color name="session_list_empty_bg">#1A665BFD</color>
|
||||
<color name="session_list_empty_fg">#544CD9</color>
|
||||
<color name="session_list_header">#6D6D6E</color>
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
<item name="android:statusBarColor">@android:color/black</item>
|
||||
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
|
||||
<item name="android:colorPrimary">@color/off_white</item>
|
||||
<item name="android:windowBackground">@color/off_white</item>
|
||||
<item name="iconColor">@color/icons_light_mode</item>
|
||||
<item name="toolbarColor">@color/toolbar_light_mode</item>
|
||||
|
||||
<!-- Style the navigation bar -->
|
||||
<item name="navigationBarColorHome">@android:color/transparent</item>
|
||||
|
@ -36,19 +39,22 @@
|
|||
<!-- Browser fragment colors -->
|
||||
<item name="browserUrlBarBackground">@drawable/home_search_background_dark</item>
|
||||
<item name="browserToolbarBackground">@color/off_white</item>
|
||||
<item name="browserToolbarIcons">@color/icons</item>
|
||||
<item name="browserToolbarMenuIcons">@color/icons</item>
|
||||
<item name="browserToolbarIcons">@color/icons_light_mode</item>
|
||||
<item name="browserToolbarMenuIcons">@color/icons_light_mode</item>
|
||||
</style>
|
||||
|
||||
<style name="LightTheme" parent="LightThemeBase">
|
||||
|
||||
</style>
|
||||
|
||||
<style name="PrivateThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<style name="PrivateThemeBase" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="android:statusBarColor">@color/private_browsing_top_gradient</item>
|
||||
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
|
||||
<item name="android:textColorHighlight">@color/private_browsing_primary</item>
|
||||
<item name="android:colorPrimary">@color/private_browsing_primary</item>
|
||||
<item name="android:windowBackground">@color/private_browsing_top_gradient</item>
|
||||
<item name="iconColor">@color/icons_dark_mode</item>
|
||||
<item name="toolbarColor">@color/toolbar_dark_mode</item>
|
||||
|
||||
<!-- Style the navigation bar -->
|
||||
<item name="navigationBarColorHome">@color/private_browsing_bottom_gradient</item>
|
||||
|
@ -77,8 +83,8 @@
|
|||
<!-- Browser fragment colors -->
|
||||
<item name="browserUrlBarBackground">@drawable/home_search_background_private_dark</item>
|
||||
<item name="browserToolbarBackground">@color/private_browsing_top_gradient</item>
|
||||
<item name="browserToolbarIcons">@color/off_white</item>
|
||||
<item name="browserToolbarMenuIcons">@color/icons</item>
|
||||
<item name="browserToolbarIcons">@color/icons_dark_mode</item>
|
||||
<item name="browserToolbarMenuIcons">@color/icons_dark_mode</item>
|
||||
</style>
|
||||
|
||||
<style name="PrivateTheme" parent="PrivateThemeBase">
|
||||
|
|
Loading…
Reference in New Issue