brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.95k stars 2.35k forks source link

Use higher-resolution brave_file.* ICO files #41901

Open jonathansampson opened 1 month ago

jonathansampson commented 1 month ago

Description

A few years ago we added custom icon support (https://github.com/brave/brave-core/commit/63b23efb43741287dcebbfa5e3613132460299ff) for PDFs and SVGs. This change was exclusively for Windows, and long preceded a recent commit (https://github.com/chromium/chromium/commit/a6d8f06ca86341e008497192f7c0c90cf73113d8) by the Chromium team to land similar functionality.

On Windows, ICO files should contain multiple versions/sizes—see /chromium/…/README.md#ico-images for specifics. The ICO files we added (i.e., brave_file.ico, brave_file_beta.ico, etc.) all consist of a single 32x32 image (the Brave logo appears even smaller, due to visual padding around the icon).

We should consider the recent Chromium update. But in the meantime, we could also simply create a new set of ICO files to give Windows users a better experience.

Steps to reproduce

  1. Configure Brave to be the default handler for SVG/PDF types

Actual result

Icons for files are small and blurry

Image

Expected result

Icons should be adaptive to the display size (up to extra large), similar to the application icon.

Reproduces how often

Easily reproduced

Brave version (brave://version info)

1.71.118 Chromium: 130.0.6723.70 (Official Build) (64-bit)

Channel information

Reproducibility

Miscellaneous information

No response

aguscruiz commented 3 weeks ago

@jonathansampson let me know if you're good with the assets I provided earlier today. Do you need the one for .svg too or are we good with the pdf one ?

jonathansampson commented 3 weeks ago

@jonathansampson let me know if you're good with the assets I provided earlier today. Do you need the one for .svg too or are we good with the pdf one ?

They should work great! I took some time this morning to build https://sampson.codes/brave/ico-viewer/ as a means of verifying future ICOs. Glad I did, because I nearly proceeded with an ICO that had too many 8-bit images within 🙂

Here are the results for the two ICOs I constructed from your source images:

Image Image

aguscruiz commented 3 weeks ago

Awesome! 🤩