# پوسته‌ها

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/fa/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/fa/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/fa/help/portable.html) | `data\themes`کنار برنامه |

ظرف دو ثانیه یک فایل جدید در **نما ← پوسته**، زیر پوسته‌های داخلی، با `name` که خود به آن می‌دهد، نمایش داده می‌شود. پس از ویرایش یک فایل، دوباره آن را در **نما ← پوسته** انتخاب کنید تا تغییر را ببینید.

یک پوسته می‌تواند یک فایل (`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**، فایل `.yaml` که [طرح‌های Base16 و Base24](https://github.com/tinted-theming/schemes) در آن قرار دارند: هم طرح‌بندی کلاسیک (`scheme:` و `base00` تا `base0F` در بالا) و هم طرح‌بندی جدیدتر (`name:` و یک بلوک `palette:`). یک طرح Base24 به عنوان 16 رنگ اول خود خوانده می‌شود.
- **فایل `colors.json` pywal**، یا فایل هر برنامه‌ای با فرمت pywal (قالب 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` (پیش‌فرض در صورت حذف)، شناسه یک پوسته داخلی (`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، `icons/32` و `icons/48`، که در صفحه‌ای با مقیاس 150٪ و بیشتر استفاده می‌شوند) بیاورد، که هر کدام برای آنچه نشان می‌دهند نام‌گذاری شده‌اند (`tb-add-url.svg`، `cat-music.png`…). فایل‌های SVG و PNG رنگ‌های خود را حفظ می‌کنند؛ فایل‌های `-symbolic.svg` و `-symbolic.png`، همانطور که GNOME و KDE آنها را نام‌گذاری می‌کنند، رنگ متن پوسته را می‌گیرند. آیکونی که مجموعه فاقد آن است، همانطور که ظاهر کلاسیک آن را ترسیم می‌کند، کشیده می‌شود. لیست کامل نام‌ها در [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) وب‌سایت یک دستورالعمل دارد که می‌توانید به یک دستیار هوش مصنوعی بدهید، با فرمت، هر کلید و قوانین، تا یک پوسته را از روی یک توصیف برای شما بنویسد.

## آن را به اشتراک بگذارید

چیزی ساخته‌اید که دیگران دوست دارند؟ یک [درخواست پول](https://github.com/mikailhossenimran/voltdownloadmanager/pulls) باز کنید که آن را به `crates/app/assets/themes` اضافه می‌کند، با:

- فایل `.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/fa/contributing.html) نحوه کار درخواست‌های پول را در اینجا توضیح می‌دهد.

## مراحل بعدی

- [شروع به کار →](https://vdm.mikaillab.com/fa/help/getting-started.html)
- [گزینه‌ها →](https://vdm.mikaillab.com/fa/help/options.html)

## مرتبط

- [گزینه‌ها](https://vdm.mikaillab.com/fa/help/options.html)
- [زبان‌ها](https://vdm.mikaillab.com/fa/help/languages.html)
- [حالت قابل حمل](https://vdm.mikaillab.com/fa/help/portable.html)
- [میانبرهای صفحه‌کلید](https://vdm.mikaillab.com/fa/help/keyboard-shortcuts.html)
- [خط فرمان و اتوماسیون](https://vdm.mikaillab.com/fa/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/fa/download.html)
