メインコンテンツへ飛ぶ

ウインドウのカスタマイズ

The BrowserWindow module is the foundation of your Electron application, and it exposes many APIs that let you customize the look and behavior of your app’s windows. This section covers how to implement various use cases for window customization on macOS, Windows, and Linux.

note

BrowserWindow is a subclass of the BaseWindow module. Both modules allow you to create and manage application windows in Electron, with the main difference being that BrowserWindow supports a single, full size web view while BaseWindow supports composing many web views. BaseWindow can be used interchangeably with BrowserWindow in the examples of the documents in this section.

📄️ カスタムのタイトルバー

アプリケーションウインドウには、OS によって適用されるデフォルトのクロムがあります。 Google Chrome ブラウザと混同しないでください。ウインドウの _クロム_ とは、メインのウェブコンテンツの一部ではないウインドウの部分 (タイトルバー、ツールバー、コントロールなど) のことです。 OS のクロムが提供するデフォルトのタイトルバーは単純な使用例では十分ですが、多くのアプリケーションではタイトルバーを削除することを選択します。 カスタムのタイトルバーを実装すると、アプリケーションがよりモダンになり、プラットフォーム間で一貫性が保たれるようになります。