# テーマ

A theme changes how VDM looks and keeps everything where it was: the same windows, menus and buttons in the same places, drawn in other colours, shapes and icons. Each theme has a light and a dark side.

## テーマを選択する

**表示 → テーマ** を開いてテーマをクリックすると、ウィンドウ全体がすぐに変更され、再起動は不要です。**表示 → ダーク モードのサポート** と **表示 → 常にダーク** で、クラシックな見た目 ([ダーク モード](https://vdm.mikaillab.com/ja/help/getting-started.html#dark-mode)) と同様に、ライトまたはダークの側面を選択します。

The built-in themes are **Classic** (VDM's own look, the default), **Native** (your system's accent colour and contrast), **High contrast**, and the style themes **Metro**, **Adwaita**, **Breeze**, **Luna**, **Aero**, **Aqua** and **Emerald**, each with its own control shapes and icons, and on Windows its own title bar. [Getting started](https://vdm.mikaillab.com/ja/help/getting-started.html#themes) describes each one; the website's [Themes page](https://vdm.mikaillab.com/themes.html) shows them all, light and dark.

## テーマ ファイルの保存場所

Theme files you make or download go in VDM's themes folder. **View → Theme → Open themes folder** opens it (and makes it the first time). It is in VDM's data folder:

| システム | フォルダー |
|---|---|
| Windows | `%APPDATA%\voltdownloadmanager\themes` |
| Linux | `~/.local/share/voltdownloadmanager/themes` |
| macOS | `~/Library/Application Support/voltdownloadmanager/themes` |
| [ポータブル コピー](https://vdm.mikaillab.com/ja/help/portable.html) | `data\themes`プログラムの横 |

新しいファイルは 2 秒以内に **表示 → テーマ** に、組み込みテーマの下に、`name` が示す名前で表示されます。ファイルを編集した後、変更を確認するには **表示 → テーマ** で再度選択してください。

テーマは 1 つのファイル (`harbour.toml`) にすることも、アイコンを含む場合は独自のフォルダー (`harbour/theme.toml`) にすることもできます。

**View → Theme → Add a theme file…** does it for you: pick a file anywhere, and VDM copies it into the themes folder and uses it at once. A file that isn't a theme stays out, and VDM says why.

## Base16 と pywal の配色

他のプログラム用に作成された配色も、変換なしでテーマとして使用できます。

- **Base16 スキーム**は、[Base16 および Base24 スキーム](https://github.com/tinted-theming/schemes)に含まれる `.yaml` ファイルです。クラシック レイアウト (`scheme:` と上部の `base00` から `base0F`) と新しいレイアウト (`name:` と `palette:` ブロック) の両方に対応しています。Base24 スキームは、最初の 16 色として読み込まれます。
- **pywal の `colors.json`**、または pywal の形式のプログラム ファイル (wallust の pywal テンプレート)。

**表示 → テーマ → テーマ ファイルを追加…** で追加するか、テーマ フォルダーに直接配置します。スキーム名 (`name:` または `scheme:`。pywal の場合は壁紙にちなんで命名) で **表示 → テーマ** に表示されます。

**pywal itself:** once `wal` has run, **View → Theme** lists **pywal**, read straight from where pywal writes its colours: `~/.cache/wal/colors.json` (on Windows `%USERPROFILE%\.cache\wal\colors.json`, where winwal and pywal write it; `$PYWAL_CACHE_DIR` or `$XDG_CACHE_HOME/wal` when you set them). Pick it and VDM follows your wallpaper: each time `wal` writes new colours, VDM takes them within two seconds. It looks only at the file's date and size, every two seconds, and only while pywal is the theme. A copy added with **Add a theme file…** keeps the colours it had.

A scheme changes colours only, on the classic look: every window, button and menu stays where it was. A dark scheme makes VDM dark and a light one light, whatever **View → Always dark** says. The scheme's colours go where they mean the same:

| VDM | Base16 | pywal |
|---|---|---|
| ダウンロード リスト、テキスト ボックス、メニュー | `base00`(背景) | `special.background` |
| Windows、ダイアログ、ツールバー、メニューバー、列ヘッダー | `base01`(より明るい背景) | 背景から前景へ一段階 |
| テキスト | `base05`(前景) | `special.foreground` |
| 補助テキスト (サイズ、メモ) | `base04` | `color8` |
| フォーカス、既定のボタン、チェック ボックス、リンク、選択、進行状況バー | `base0D`(青) | `color4` |
| エラー | `base08`(赤) | `color1` |
| 警告 | `base0A`(黄) | `color3` |
| 成功、メーター、トレントのピース | `base0B`(緑) | `color2` |

Borders and the hover and pressed shades are mixed from these, as for a theme file's `[seeds]`. Text stays readable: text and secondary text at 4.5:1 or more against every background they sit on (WCAG AA), the accent at 3:1. A scheme short of that has those colours moved a little darker (lighter on a dark scheme) until they pass; VDM's log says which.

色以外の変更を行うには、スキームをファイル名で継承し、好きなものを追加するテーマ ファイルを作成します。

```
name = "Gruvbox, my way"
inherits = "gruvbox-dark-medium"   # gruvbox-dark-medium.yaml, beside it
icons = "accent"

[sizes]
radius = 6
```

`inherits = "pywal"`も同様に機能し、`wal` にも従います。

## ファイル

テーマは、[TOML](https://toml.io/) (または JSON、`.json`。または [配色](#base16-and-pywal-colour-schemes)、`.yaml`) 形式の小さなテキスト ファイルです。変更する項目のみを記述し、それ以外のすべては `inherits` するテーマから取得されます。

```
name = "Harbour"
inherits = "classic"
icons = "color"

[seeds.light]
background = "#eef3f6"
surface = "#ffffff"
text = "#11202b"
accent = "#0f6c8c"

[seeds.dark]
background = "#14212a"
surface = "#0e171d"
text = "#e8f0f4"
accent = "#5cc3e6"

[sizes]
radius = 6

[controls]
focus = "ring"
```

- **`name`** — **表示 → テーマ** に表示される名前。指定がない場合はファイル名が使用されます。
- **`inherits`** — 自分のテーマが開始するテーマ: `classic` (省略された場合の既定)、組み込みテーマの ID (`metro`、`adwaita`、`breeze`、`luna`、`aero`、`aqua`、`high-contrast`)、または同じフォルダー内の別のテーマ ファイル (拡張子 `.toml` なしのファイル名)。別のテーマを継承するファイルは、さらに継承されることがあります。テーマが自分自身を継承することはできません。
- **`[seeds]`** — a handful of colours (`background`, `surface`, `header`, `text`, `accent`, `selection`, `error`, `warning`, `success`) that VDM spreads over every control. `[seeds.light]` and `[seeds.dark]` give each side its own.
- **`[colors]`** — 両側の単一の色の役割 (`window`、`accent`、`"segments.done"` など)。**`[light]`** と **`[dark]`** は片側のみです。色は `#rrggbb`、または透明度を含む `#rrggbbaa` です。ファイルが設定する役割は、そのシードよりも優先されます。
- **`[sizes]`** — 角の半径、境界線の幅、フォント サイズ、行の高さ (ピクセル単位)。
- **`[controls]`** — テキスト ボックス、チェック ボックス、ボタン、進行状況バー、スクロール バー、列ヘッダー、フォーカス マーク、タイトル バーの形状、およびメニューのフォント。
- **`icons`** — `color`、`mono` (単色)、または `accent`。
- **`contrast = "high"`** — 他のすべての上に、すべてのエッジとテキストの色を強調します。

Every colour role, size and control style, with what it sets, is listed on the website's [Themes page](https://vdm.mikaillab.com/themes.html#make-your-own) (read from VDM's own code, so it never drifts). The built-in themes are written the same way: [read them on GitHub](https://github.com/mikailhossenimran/voltdownloadmanager/tree/main/crates/app/assets/themes).

A key VDM doesn't know, or a value it can't read, is skipped and written to VDM's log (the `logs` folder beside the themes folder), so a file made for a newer VDM still loads. A file that isn't valid TOML or JSON doesn't load, and the log says why. A file named like a built-in theme (`metro.toml`) is passed over: give yours a name of its own.

### アイコン

独自のフォルダー (`harbour/theme.toml`) にあるテーマは、`icons/16` と `icons/24` (PNG 画像の場合は、150% 以上の画面スケールで使用される `icons/32` と `icons/48`) にアイコンを含めることができます。それぞれ表示される内容 (`tb-add-url.svg`、`cat-music.png` など) にちなんで名付けられます。SVG および PNG ファイルは色を保持します。GNOME および KDE が命名する `-symbolic.svg` および `-symbolic.png` ファイルは、テーマのテキストの色を取ります。セットにないアイコンは、クラシックな見た目で描画されます。名前の完全なリストは [themeicons.rs](https://github.com/mikailhossenimran/voltdownloadmanager/blob/main/crates/app/src/themeicons.rs) (`NEEDS`) にあります。

## テーマを作成する

1. **表示 → テーマ → テーマ フォルダーを開く** をクリックし、そこに新しい `.toml` ファイルを作成します (任意のテキスト エディターを使用)。
2. 上記の例から始め、シードの色を変更し、必要に応じて役割とサイズを追加します。
3. **表示 → テーマ** で選択し、両方の側面を確認します。**表示 → 常にダーク** をオン/オフにして、テキストが読みやすく、フォーカス マークが両方で表示されることを確認します。

ウェブサイトの [テーマ ページ](https://vdm.mikaillab.com/themes.html#ai-prompt) には、AI アシスタントに与えることができるプロンプトがあり、形式、すべてのキー、およびルールが示されており、説明からテーマを作成できます。

## 共有する

他の人が気に入るようなものを作成しましたか？`crates/app/assets/themes` に追加する [プル リクエスト](https://github.com/mikailhossenimran/voltdownloadmanager/pulls) を開いてください。内容は次のとおりです。

- `.toml` ファイルと、アイコン フォルダーがある場合はそのフォルダー。
- メイン ウィンドウのライト側とダーク側のスクリーンショット。
- a `SOURCES.txt` beside any icons, saying who drew them and under which licence. Icons must be your own or under a licence that lets VDM share them (GPL-3.0), never copied from another program.

まだ迷っていますか? まずは[ディスカッション](https://github.com/mikailhossenimran/voltdownloadmanager/discussions)で提案してください。[CONTRIBUTING.md](https://vdm.mikaillab.com/ja/contributing.html)でプルリクエストの仕組みを説明しています。

## 次のステップ

- [はじめに →](https://vdm.mikaillab.com/ja/help/getting-started.html)
- [オプション →](https://vdm.mikaillab.com/ja/help/options.html)

## 関連

- [オプション](https://vdm.mikaillab.com/ja/help/options.html)
- [言語](https://vdm.mikaillab.com/ja/help/languages.html)
- [ポータブルモード](https://vdm.mikaillab.com/ja/help/portable.html)
- [キーボード ショートカット](https://vdm.mikaillab.com/ja/help/keyboard-shortcuts.html)
- [コマンドラインと自動化](https://vdm.mikaillab.com/ja/help/command-line.html)

[GitHubでこのページを編集](https://github.com/mikailhossenimran/voltdownloadmanager/edit/main/docs/themes.md) [このページの問題を報告する](https://github.com/mikailhossenimran/voltdownloadmanager/issues/new?template=website.yml&title=Website%3A%20Themes&page=https%3A//vdm.mikaillab.com/help/themes.html) [ページ履歴](https://github.com/mikailhossenimran/voltdownloadmanager/commits/main/docs/themes.md)

無料、オープンソース、広告なし、試用期間なし。

[Download Volt Download Manager](https://vdm.mikaillab.com/ja/download.html)
