mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
For #12622: Visually indicate different types of suggestions in the search screen
This commit is contained in:
parent
5b997ff1d8
commit
12e68ac18d
@ -106,6 +106,7 @@ class AwesomeBarView(
|
|||||||
components.core.store,
|
components.core.store,
|
||||||
selectTabUseCase,
|
selectTabUseCase,
|
||||||
components.core.icons,
|
components.core.icons,
|
||||||
|
getDrawable(context, R.drawable.ic_search_results_tab),
|
||||||
excludeSelectedSession = true
|
excludeSelectedSession = true
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -122,6 +123,7 @@ class AwesomeBarView(
|
|||||||
bookmarksStorage = components.core.bookmarksStorage,
|
bookmarksStorage = components.core.bookmarksStorage,
|
||||||
loadUrlUseCase = loadUrlUseCase,
|
loadUrlUseCase = loadUrlUseCase,
|
||||||
icons = components.core.icons,
|
icons = components.core.icons,
|
||||||
|
indicatorIcon = getDrawable(context, R.drawable.ic_search_results_bookmarks),
|
||||||
engine = engineForSpeculativeConnects
|
engine = engineForSpeculativeConnects
|
||||||
)
|
)
|
||||||
|
|
||||||
|
14
app/src/main/res/drawable/ic_search_results_bookmarks.xml
Normal file
14
app/src/main/res/drawable/ic_search_results_bookmarks.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?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/. -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="16dp"
|
||||||
|
android:width="16dp"
|
||||||
|
android:viewportHeight="20"
|
||||||
|
android:viewportWidth="20">
|
||||||
|
<path android:fillColor="?attr/foundation"
|
||||||
|
android:pathData="M9.697 0.007c-1.094 0.072-2.075 0.72-2.568 1.71l-1.48 2.965-3.09 0.552C1.446 5.43 0.522 6.223 0.161 7.301L0.1 7.505c-0.268 1.022 0.005 2.117 0.732 2.897l2.276 2.447-0.476 3.419c-0.161 1.15 0.335 2.294 1.285 2.963l0.181 0.119c0.924 0.558 2.078 0.599 3.043 0.093l2.759-1.44 2.766 1.444c1.027 0.538 2.271 0.457 3.222-0.213l0.162-0.123c0.844-0.68 1.274-1.758 1.122-2.841l-0.478-3.421 2.278-2.449c0.774-0.828 1.032-2.018 0.671-3.097l-0.069-0.186c-0.397-0.975-1.267-1.687-2.312-1.879l-3.108-0.556-1.477-2.965C12.153 0.665 11.078 0 9.903 0z"/>
|
||||||
|
<path android:fillColor="?attr/awesomeBarIndicatorBookmarkColor"
|
||||||
|
android:pathData="M9.903 2c0.371 0 0.713 0.186 0.916 0.49l0.069 0.12 1.926 3.864 4.089 0.731c0.394 0.073 0.718 0.353 0.845 0.733 0.114 0.34 0.054 0.712-0.154 0.998l-0.085 0.102-2.926 3.146 0.61 4.363c0.057 0.409-0.119 0.815-0.456 1.052-0.3 0.211-0.682 0.258-1.02 0.131l-0.124-0.056-3.69-1.927-3.69 1.924c-0.365 0.192-0.806 0.163-1.143-0.075-0.3-0.21-0.472-0.555-0.467-0.916l0.01-0.136 0.61-4.36-2.927-3.147C2.02 8.742 1.929 8.32 2.057 7.937c0.114-0.34 0.386-0.6 0.724-0.703l0.13-0.03 4.08-0.73L8.92 2.61C9.105 2.236 9.486 2 9.903 2z"/>
|
||||||
|
</vector>
|
@ -0,0 +1,14 @@
|
|||||||
|
<?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/. -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="16dp"
|
||||||
|
android:width="16dp"
|
||||||
|
android:viewportHeight="20"
|
||||||
|
android:viewportWidth="20">
|
||||||
|
<path android:fillColor="?attr/foundation"
|
||||||
|
android:pathData="M16 2c1.598 0 2.904 1.249 2.995 2.824L19 5v7.501l0.098 0.076c0.465 0.387 0.788 0.94 0.877 1.568l0.02 0.19L20 14.5v1c0 1.326-1.032 2.41-2.336 2.495L17.5 18h-15c-1.325 0-2.41-1.032-2.495-2.336L0 15.5v-1c0-0.709 0.295-1.349 0.769-1.804l0.133-0.119L1 12.5V5c0-1.538 1.158-2.807 2.65-2.98l0.174-0.015L4 2z"/>
|
||||||
|
<path android:fillColor="?attr/awesomeBarIndicatorColor"
|
||||||
|
android:pathData="M16 4l0.117 0.007c0.42 0.049 0.762 0.359 0.857 0.764l0.02 0.112L17 5v9h0.5l0.09 0.008c0.175 0.032 0.318 0.155 0.379 0.318l0.023 0.084L18 14.5v1l-0.008 0.09c-0.032 0.175-0.155 0.318-0.318 0.379l-0.084 0.023L17.5 16h-15l-0.09-0.008c-0.175-0.032-0.318-0.155-0.379-0.318L2.008 15.59 2 15.5v-1l0.008-0.09c0.032-0.175 0.154-0.318 0.318-0.379l0.084-0.023L2.5 14H3V5l0.007-0.117c0.049-0.42 0.359-0.762 0.764-0.857l0.112-0.02L4 4zm-4 10H8v1h4zm3-8H5v7h10z"/>
|
||||||
|
</vector>
|
@ -0,0 +1,14 @@
|
|||||||
|
<?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/. -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="16dp"
|
||||||
|
android:width="16dp"
|
||||||
|
android:viewportHeight="20"
|
||||||
|
android:viewportWidth="20">
|
||||||
|
<path android:fillColor="?attr/foundation"
|
||||||
|
android:pathData="M6 0h8a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"/>
|
||||||
|
<path android:fillColor="?attr/awesomeBarIndicatorColor"
|
||||||
|
android:pathData="M14 2H6C4.895 2 4 2.895 4 4v12c0 1.105 0.895 2 2 2h8c1.105 0 2-0.895 2-2V4c0-1.105-0.895-2-2-2zm-3 15H9v-1h2zm3-2.5c0 0.276-0.224 0.5-0.5 0.5h-7C6.224 15 6 14.776 6 14.5v-10C6 4.224 6.224 4 6.5 4h7C13.776 4 14 4.224 14 4.5z"/>
|
||||||
|
</vector>
|
@ -0,0 +1,14 @@
|
|||||||
|
<?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/. -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="16dp"
|
||||||
|
android:width="16dp"
|
||||||
|
android:viewportHeight="20"
|
||||||
|
android:viewportWidth="20">
|
||||||
|
<path android:fillColor="?attr/foundation"
|
||||||
|
android:pathData="M4 1h12c2.21 0 4 1.79 4 4v10c0 2.21-1.79 4-4 4H4c-2.21 0-4-1.79-4-4V5c0-2.21 1.79-4 4-4z"/>
|
||||||
|
<path android:fillColor="?attr/awesomeBarIndicatorColor"
|
||||||
|
android:pathData="M16 3H4C2.895 3 2 3.895 2 5v10c0 1.105 0.895 2 2 2h12c1.105 0 2-0.895 2-2V5c0-1.105-0.895-2-2-2zm-1 11.5c0 0.276-0.224 0.5-0.5 0.5h-10C4.224 15 4 14.776 4 14.5v-9C4 5.224 4.224 5 4.5 5h10C14.776 5 15 5.224 15 5.5zm2-3.5h-1V9h1z"/>
|
||||||
|
</vector>
|
14
app/src/main/res/drawable/ic_search_results_tab.xml
Normal file
14
app/src/main/res/drawable/ic_search_results_tab.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?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/. -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="16dp"
|
||||||
|
android:width="16dp"
|
||||||
|
android:viewportHeight="20"
|
||||||
|
android:viewportWidth="20">
|
||||||
|
<path android:fillColor="?attr/foundation"
|
||||||
|
android:pathData="M6 3L5.8 3.005C3.684 3.109 2 4.858 2 7v4.17l-0.012 0.005C0.83 11.59 0 12.698 0 14c0 1.657 1.343 3 3 3h14c1.657 0 3-1.343 3-3l-0.005-0.176c-0.067-1.157-0.79-2.138-1.802-2.577L18 11.17V7c0-2.21-1.79-4-4-4z"/>
|
||||||
|
<path android:fillColor="?attr/awesomeBarIndicatorColor"
|
||||||
|
android:pathData="M14 5c1.054 0 1.918 0.816 1.994 1.85L16 7v6h1c0.552 0 1 0.448 1 1 0 0.513-0.386 0.935-0.883 0.993L17 15H3c-0.552 0-1-0.448-1-1 0-0.513 0.386-0.935 0.883-0.993L3 13h1V7c0-1.054 0.816-1.918 1.85-1.994L6 5z"/>
|
||||||
|
</vector>
|
@ -47,6 +47,8 @@
|
|||||||
<color name="prompt_login_edit_text_cursor_color_normal_theme">@color/prompt_login_edit_text_cursor_color_dark_theme</color>
|
<color name="prompt_login_edit_text_cursor_color_normal_theme">@color/prompt_login_edit_text_cursor_color_dark_theme</color>
|
||||||
<color name="readermode_start_gradient_normal_theme">#C689FF</color>
|
<color name="readermode_start_gradient_normal_theme">#C689FF</color>
|
||||||
<color name="readermode_end_gradient_normal_theme">#00B3F4</color>
|
<color name="readermode_end_gradient_normal_theme">#00B3F4</color>
|
||||||
|
<color name="search_suggestion_indicator_icon_color_normal_theme">@color/search_suggestion_indicator_icon_color_dark_theme</color>
|
||||||
|
<color name="search_suggestion_indicator_icon_bookmark_color_normal_theme">@color/search_suggestion_indicator_icon_bookmark_color_dark_theme</color>
|
||||||
|
|
||||||
<!-- Tab tray -->
|
<!-- Tab tray -->
|
||||||
<color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_dark_theme</color>
|
<color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_dark_theme</color>
|
||||||
|
@ -52,6 +52,8 @@
|
|||||||
<attr name="readerModeStartGradient" format="reference"/>
|
<attr name="readerModeStartGradient" format="reference"/>
|
||||||
<attr name="readerModeEndGradient" format="reference"/>
|
<attr name="readerModeEndGradient" format="reference"/>
|
||||||
<attr name="syncedTabsSeparator" format="reference"/>
|
<attr name="syncedTabsSeparator" format="reference"/>
|
||||||
|
<attr name="awesomeBarIndicatorColor" format="reference|color"/>
|
||||||
|
<attr name="awesomeBarIndicatorBookmarkColor" format="reference|color"/>
|
||||||
|
|
||||||
<!-- Tab tray -->
|
<!-- Tab tray -->
|
||||||
<attr name="tabTrayItemMediaBackground" format="reference" />
|
<attr name="tabTrayItemMediaBackground" format="reference" />
|
||||||
|
@ -71,6 +71,8 @@
|
|||||||
<color name="prompt_login_edit_text_cursor_color_light_theme">#312a64</color>
|
<color name="prompt_login_edit_text_cursor_color_light_theme">#312a64</color>
|
||||||
<color name="readermode_start_gradient_normal_theme">#FF9059ff</color>
|
<color name="readermode_start_gradient_normal_theme">#FF9059ff</color>
|
||||||
<color name="readermode_end_gradient_normal_theme">#FF0250bb</color>
|
<color name="readermode_end_gradient_normal_theme">#FF0250bb</color>
|
||||||
|
<color name="search_suggestion_indicator_icon_color_light_theme">#008787</color>
|
||||||
|
<color name="search_suggestion_indicator_icon_bookmark_color_light_theme">#0060df</color>
|
||||||
|
|
||||||
<!-- Tab Tray -->
|
<!-- Tab Tray -->
|
||||||
<color name="tab_tray_item_text_light_theme">@color/ink_80</color>
|
<color name="tab_tray_item_text_light_theme">@color/ink_80</color>
|
||||||
@ -132,6 +134,8 @@
|
|||||||
<color name="add_on_private_browsing_exterior_circle_background_dark_theme">@color/accent_dark_theme</color>
|
<color name="add_on_private_browsing_exterior_circle_background_dark_theme">@color/accent_dark_theme</color>
|
||||||
<color name="add_on_private_browsing_interior_icon_background_dark_theme">#FFFFFF</color>
|
<color name="add_on_private_browsing_interior_icon_background_dark_theme">#FFFFFF</color>
|
||||||
<color name="prompt_login_edit_text_cursor_color_dark_theme">#9059ff</color>
|
<color name="prompt_login_edit_text_cursor_color_dark_theme">#9059ff</color>
|
||||||
|
<color name="search_suggestion_indicator_icon_color_dark_theme">#2ac3a2</color>
|
||||||
|
<color name="search_suggestion_indicator_icon_bookmark_color_dark_theme">#0090ed</color>
|
||||||
|
|
||||||
<!-- Tab Tray -->
|
<!-- Tab Tray -->
|
||||||
<color name="tab_tray_item_text_dark_theme">@color/light_grey_05</color>
|
<color name="tab_tray_item_text_dark_theme">@color/light_grey_05</color>
|
||||||
@ -238,6 +242,8 @@
|
|||||||
<color name="add_on_private_browsing_exterior_circle_background_normal_theme">@color/add_on_private_browsing_exterior_circle_background_light_theme</color>
|
<color name="add_on_private_browsing_exterior_circle_background_normal_theme">@color/add_on_private_browsing_exterior_circle_background_light_theme</color>
|
||||||
<color name="add_on_private_browsing_interior_icon_background_normal_theme">@color/add_on_private_browsing_interior_icon_background_light_theme</color>
|
<color name="add_on_private_browsing_interior_icon_background_normal_theme">@color/add_on_private_browsing_interior_icon_background_light_theme</color>
|
||||||
<color name="prompt_login_edit_text_cursor_color_normal_theme">@color/prompt_login_edit_text_cursor_color_light_theme</color>
|
<color name="prompt_login_edit_text_cursor_color_normal_theme">@color/prompt_login_edit_text_cursor_color_light_theme</color>
|
||||||
|
<color name="search_suggestion_indicator_icon_color_normal_theme">@color/search_suggestion_indicator_icon_color_light_theme</color>
|
||||||
|
<color name="search_suggestion_indicator_icon_bookmark_color_normal_theme">@color/search_suggestion_indicator_icon_bookmark_color_light_theme</color>
|
||||||
|
|
||||||
<!-- Tab tray -->
|
<!-- Tab tray -->
|
||||||
<color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_light_theme</color>
|
<color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_light_theme</color>
|
||||||
|
@ -77,6 +77,8 @@
|
|||||||
<item name="readerModeStartGradient">@color/readermode_start_gradient_normal_theme</item>
|
<item name="readerModeStartGradient">@color/readermode_start_gradient_normal_theme</item>
|
||||||
<item name="readerModeEndGradient">@color/readermode_end_gradient_normal_theme</item>
|
<item name="readerModeEndGradient">@color/readermode_end_gradient_normal_theme</item>
|
||||||
<item name="syncedTabsSeparator">@color/synced_tabs_separator</item>
|
<item name="syncedTabsSeparator">@color/synced_tabs_separator</item>
|
||||||
|
<item name="awesomeBarIndicatorColor">@color/search_suggestion_indicator_icon_color_normal_theme</item>
|
||||||
|
<item name="awesomeBarIndicatorBookmarkColor">@color/search_suggestion_indicator_icon_bookmark_color_normal_theme</item>
|
||||||
|
|
||||||
<item name="tabTrayItemBackground">@color/tab_tray_item_background_normal_theme</item>
|
<item name="tabTrayItemBackground">@color/tab_tray_item_background_normal_theme</item>
|
||||||
<item name="tabTrayItemSelectedBackground">@color/tab_tray_item_selected_background_normal_theme</item>
|
<item name="tabTrayItemSelectedBackground">@color/tab_tray_item_selected_background_normal_theme</item>
|
||||||
@ -208,6 +210,8 @@
|
|||||||
<item name="addOnPrivateBrowsingExteriorCircleBackground">@color/add_on_private_browsing_exterior_circle_background_private_theme</item>
|
<item name="addOnPrivateBrowsingExteriorCircleBackground">@color/add_on_private_browsing_exterior_circle_background_private_theme</item>
|
||||||
<item name="addOnPrivateBrowsingInteriorIconBackground">@color/add_on_private_browsing_interior_icon_background_private_theme</item>
|
<item name="addOnPrivateBrowsingInteriorIconBackground">@color/add_on_private_browsing_interior_icon_background_private_theme</item>
|
||||||
<item name="mozacPromptLoginEditTextCursorColor">@color/prompt_login_edit_text_cursor_color_private_theme</item>
|
<item name="mozacPromptLoginEditTextCursorColor">@color/prompt_login_edit_text_cursor_color_private_theme</item>
|
||||||
|
<item name="awesomeBarIndicatorColor">@color/search_suggestion_indicator_icon_color_dark_theme</item>
|
||||||
|
<item name="awesomeBarIndicatorBookmarkColor">@color/search_suggestion_indicator_icon_bookmark_color_dark_theme</item>
|
||||||
|
|
||||||
<!-- Tab Tray -->
|
<!-- Tab Tray -->
|
||||||
<item name="tabTrayItemBackground">@color/tab_tray_item_background_normal_theme</item>
|
<item name="tabTrayItemBackground">@color/tab_tray_item_background_normal_theme</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user