You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows下Ungoogled Chromium地址栏:替换默认图标与"chrome"文本

Customizing Address Bar Icon and Text in Ungoogled-Chromium (Windows Build)

I’ve built ungoogled-chromium for Windows before, so let’s break down exactly how to swap out that default gray Chromium icon and "chrome" placeholder text in the address bar. Here’s the step-by-step process:

1. Locate the Target Files

First, you’ll need to dig into the Chromium source code included in the ungoogled-chromium-windows repo:

  • Icon Replacement: The default address bar icon is stored in theme resources. Look for files like //chrome/app/theme/default/icons/search_icon.svg (or PNG variants for different DPI scales) — this is the gray icon on the left side of the address bar.
  • Text Replacement: The "chrome" placeholder text comes from a localized string resource. Head to //chrome/app/chrome_strings.grd and search for entries related to the address bar placeholder. The most likely candidate is IDS_SEARCH_ENGINE_NAME_DEFAULT or a similar string ID defining the default address bar prompt.

2. Replace the Icon

  • Prepare your custom icon: Match the dimensions and format of the original file (e.g., SVG for vector scaling, or 16x16/24x24/32x32 PNGs for different screen resolutions).
  • Overwrite the original icon file(s) in the theme directory with your custom one. Keep the same filename so the Chromium build system picks it up automatically.

3. Modify the Placeholder Text

  • Open chrome_strings.grd in a text editor. Find the string ID controlling the address bar’s default text (search for "chrome" in the file to narrow it down).
  • Replace the default <message> content with your custom text. For example:
    <message name="IDS_SEARCH_ENGINE_NAME_DEFAULT" desc="Default name for the search engine used when no other is selected.">
      MyCustomBrowser
    </message>
    
  • For a basic build, modifying the English source in chrome_strings.grd is enough. If you need multi-language support, update corresponding .xtb localization files in //chrome/app/locales/.

4. Rebuild Ungoogled-Chromium

Once your changes are saved, run the build script as you normally would:

build.bat

If you run into issues, try cleaning the build directory first with build.bat clean before rebuilding to ensure the system picks up your modified resources.

Key Notes

  • Always match the original icon’s format and dimensions to avoid UI glitches or scaling issues.
  • Double-check you’re modifying the correct string ID — test your build to confirm the change only affects the address bar.
  • File paths might shift slightly in newer repo versions; use the repo’s search function to locate updated resource locations if needed.

内容的提问来源于stack exchange,提问作者SySu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 07:40:55