Skip to content

Commit

Permalink
Uplift of #10037 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Sep 11, 2021
1 parent 644c9d4 commit 6c2c238
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 5 deletions.
8 changes: 6 additions & 2 deletions app/theme/brave_theme_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@
<!-- KEEP THESE IN ALPHABETICAL ORDER! DO NOT ADD TO RANDOM PLACES JUST
BECAUSE YOUR RESOURCES ARE FUNCTIONALLY RELATED OR FALL UNDER THE
SAME CONDITIONALS. -->
<structure type="chrome_scaled_image" name="IDR_BRAVE_BOOKMARK_FOLDER_CLOSED" file="common/brave_bookmark_folder_closed.png" />
<structure type="chrome_scaled_image" name="IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_WHITE" file="common/brave_bookmark_folder_closed_white.png" />
<structure type="chrome_scaled_image" name="IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_DARK" file="common/brave_bookmark_folder_closed-dark.png" />
<structure type="chrome_scaled_image" name="IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_LIGHT" file="common/brave_bookmark_folder_closed-light.png" />
<structure type="chrome_scaled_image" name="IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_LIN_DARK" file="common/brave_bookmark_folder_closed-lin-dark.png" />
<structure type="chrome_scaled_image" name="IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_LIN_LIGHT" file="common/brave_bookmark_folder_closed-lin-light.png" />
<structure type="chrome_scaled_image" name="IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_WIN_DARK" file="common/brave_bookmark_folder_closed-win-dark.png" />
<structure type="chrome_scaled_image" name="IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_WIN_LIGHT" file="common/brave_bookmark_folder_closed-win-light.png" />
<structure type="chrome_scaled_image" name="IDR_BRAVE_WAYBACK_INFOBAR" file="brave/brave_wayback_infobar.png" />
<structure type="chrome_scaled_image" name="IDR_BRAVE_WAYBACK_INFOBAR_DARK" file="brave/brave_wayback_infobar_dark.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_BETA" file="brave/product_logo_32_beta.png" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
22 changes: 19 additions & 3 deletions chromium_src/chrome/browser/ui/bookmarks/bookmark_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ bool ShouldShowAppsShortcutInBookmarkBar(Profile* profile) {
#if defined(TOOLKIT_VIEWS)
ui::ImageModel GetBookmarkFolderIcon(BookmarkFolderIconType icon_type,
absl::variant<int, SkColor> color) {
int default_id = IDR_BRAVE_BOOKMARK_FOLDER_CLOSED;
int default_id =
#if defined(OS_WIN)
IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_WIN_LIGHT;
#elif defined(OS_LINUX)
IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_LIN_LIGHT;
#else
IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_LIGHT;
#endif

const auto generator = [](int default_id, BookmarkFolderIconType icon_type,
absl::variant<int, SkColor> color,
const ui::NativeTheme* native_theme) {
Expand All @@ -52,8 +60,16 @@ ui::ImageModel GetBookmarkFolderIcon(BookmarkFolderIconType icon_type,
}

const int resource_id = color_utils::IsDark(sk_color)
? IDR_BRAVE_BOOKMARK_FOLDER_CLOSED
: IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_WHITE;
#if defined(OS_WIN)
? IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_WIN_LIGHT
: IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_WIN_DARK;
#elif defined(OS_LINUX)
? IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_LIN_LIGHT
: IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_LIN_DARK;
#else
? IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_LIGHT
: IDR_BRAVE_BOOKMARK_FOLDER_CLOSED_DARK;
#endif
folder = *ui::ResourceBundle::GetSharedInstance()
.GetNativeImageNamed(resource_id)
.ToImageSkia();
Expand Down

0 comments on commit 6c2c238

Please sign in to comment.