# Temi

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.

## Scegli un tema

Apri **Visualizza → Tema** e fai clic su un tema: l'intera finestra cambia subito, senza bisogno di riavviare. **Visualizza → Supporto modalità scura** e **Visualizza → Sempre scuro** scelgono poi il lato chiaro o scuro, come per l'aspetto classico ([Modalità scura](https://vdm.mikaillab.com/it/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/it/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.

## Dove vanno i file dei temi

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:

| Sistema | Cartella |
|---|---|
| Windows | `%APPDATA%\voltdownloadmanager\themes` |
| Linux | `~/.local/share/voltdownloadmanager/themes` |
| macOS | `~/Library/Application Support/voltdownloadmanager/themes` |
| [Copia portatile](https://vdm.mikaillab.com/it/help/portable.html) | `data\themes`accanto al programma |

Entro due secondi un nuovo file appare in **Visualizza → Tema**, sotto i temi integrati, con il `name` che si dà. Dopo aver modificato un file, selezionalo di nuovo in **Visualizza → Tema** per vedere la modifica.

Un tema può essere un singolo file (`harbour.toml`) o una propria cartella (`harbour/theme.toml`) quando include icone.

**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.

## Combinazioni di colori Base16 e pywal

Le combinazioni di colori create per altri programmi sono anch'esse temi, senza bisogno di conversioni:

- **Una combinazione Base16**, il file `.yaml` in cui sono contenute le [combinazioni Base16 e Base24](https://github.com/tinted-theming/schemes): sia il layout classico (`scheme:` e da `base00` a `base0F` in alto) sia quello più recente (`name:` e un blocco `palette:`). Una combinazione Base24 viene letta come i suoi primi 16 colori.
- **Il file `colors.json` di pywal**, o il file di qualsiasi programma nella forma di pywal (il modello pywal di wallust).

Aggiungilo con **Visualizza → Tema → Aggiungi un file di tema…**, oppure mettilo tu stesso nella cartella dei temi. Appare in **Visualizza → Tema** sotto il nome della combinazione (`name:` o `scheme:`; quello di pywal prende il nome dallo sfondo).

**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 |
|---|---|---|
| L'elenco dei download, le caselle di testo e i menu | `base00`(lo sfondo) | `special.background` |
| Finestre, finestre secondarie, la barra degli strumenti, la barra dei menu e le intestazioni di colonna | `base01`(lo sfondo più chiaro) | lo sfondo un passo verso il primo piano |
| Testo | `base05`(il primo piano) | `special.foreground` |
| Testo secondario (dimensioni, note) | `base04` | `color8` |
| Stato attivo, pulsanti predefiniti, caselle di controllo, collegamenti, la selezione e la barra di avanzamento | `base0D`(blu) | `color4` |
| Errori | `base08`(rosso) | `color1` |
| Avvisi | `base0A`(giallo) | `color3` |
| Successo, i misuratori e le parti di un torrent | `base0B`(verde) | `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.

Per cambiare più dei colori, crea un file di tema che erediti la combinazione tramite il suo nome file e aggiunga ciò che desideri:

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

[sizes]
radius = 6
```

`inherits = "pywal"`funziona allo stesso modo e segue anche `wal`.

## Il file

Un tema è un piccolo file di testo in [TOML](https://toml.io/) (o JSON, `.json`; o una [combinazione di colori](#base16-and-pywal-colour-schemes), `.yaml`). Nomina solo ciò che cambia; tutto il resto proviene dal tema che `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`**: ciò che **Visualizza → Tema** elenca; il nome del file quando non ce n'è uno.
- **`inherits`**: il tema da cui il tuo parte: `classic` (il predefinito se omesso), l'ID di un tema integrato (`metro`, `adwaita`, `breeze`, `luna`, `aero`, `aqua`, `high-contrast`) o un altro file di tema nella stessa cartella, con il suo nome file senza `.toml`. Un file che eredita un altro può essere ereditato a sua volta; un tema non può ereditare se stesso.
- **`[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]`**: ruoli di colore singolo (come `window`, `accent` o `"segments.done"`) su entrambi i lati; **`[light]`** e **`[dark]`** su un solo lato. Un colore è `#rrggbb`, o `#rrggbbaa` con trasparenza. I ruoli impostati da un file prevalgono sui suoi semi.
- **`[sizes]`**: raggi degli angoli, larghezze dei bordi, dimensioni dei caratteri e altezze delle righe, in pixel.
- **`[controls]`** — la forma delle caselle di testo, delle caselle di selezione, dei pulsanti, delle barre di avanzamento, delle barre di scorrimento, delle intestazioni di colonna, del segno di messa a fuoco e della barra del titolo, e il carattere dei menu.
- **`icons`**: `color`, `mono` (un colore) o `accent`.
- **`contrast = "high"`**: rafforza tutti i bordi e i colori del testo, oltre al resto.

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.

### Icone

Un tema in una propria cartella (`harbour/theme.toml`) può portare le sue icone in `icons/16` e `icons/24` (e, per le immagini PNG, `icons/32` e `icons/48`, usate su uno schermo scalato al 150% e oltre), ognuna nominata per ciò che mostra (`tb-add-url.svg`, `cat-music.png`…). I file SVG e PNG mantengono i loro colori; quelli `-symbolic.svg` e `-symbolic.png`, come li chiamano GNOME e KDE, assumono il colore del testo del tema. Un'icona che il set non ha viene disegnata come la disegna l'aspetto classico. L'elenco completo dei nomi è in [themeicons.rs](https://github.com/mikailhossenimran/voltdownloadmanager/blob/main/crates/app/src/themeicons.rs) (`NEEDS`).

## Creane uno

1. **Visualizza → Tema → Apri la cartella dei temi**, e lì crea un nuovo file `.toml` (qualsiasi editor di testo).
2. Inizia dall'esempio sopra: cambia i colori dei semi, poi aggiungi ruoli e dimensioni man mano.
3. Selezionalo in **Visualizza → Tema**, e guarda entrambi i lati: **Visualizza → Sempre scuro** attivo e disattivo. Verifica che il testo sia leggibile e il contorno dello stato attivo visibile in entrambi.

La [pagina dei temi](https://vdm.mikaillab.com/themes.html#ai-prompt) del sito web ha un prompt che puoi dare a un assistente AI, con il formato, ogni chiave e le regole, per scrivere un tema per te da una descrizione.

## Condividilo

Hai creato qualcosa che piacerebbe ad altri? Apri una [pull request](https://github.com/mikailhossenimran/voltdownloadmanager/pulls) che lo aggiunga a `crates/app/assets/themes`, con:

- il file `.toml` e la sua cartella di icone, se ne ha una;
- screenshot della finestra principale nel suo lato chiaro e nel suo lato scuro;
- 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.

Non sei ancora sicuro? Prima mostralo nelle [discussioni](https://github.com/mikailhossenimran/voltdownloadmanager/discussions). [CONTRIBUTING.md](https://vdm.mikaillab.com/it/contributing.html) spiega come funzionano le pull request qui.

## Passi successivi

- [Per iniziare →](https://vdm.mikaillab.com/it/help/getting-started.html)
- [Opzioni →](https://vdm.mikaillab.com/it/help/options.html)

## Correlati

- [Opzioni](https://vdm.mikaillab.com/it/help/options.html)
- [Lingue](https://vdm.mikaillab.com/it/help/languages.html)
- [Modalità portatile](https://vdm.mikaillab.com/it/help/portable.html)
- [Scorciatoie da tastiera](https://vdm.mikaillab.com/it/help/keyboard-shortcuts.html)
- [Riga di comando e automazione](https://vdm.mikaillab.com/it/help/command-line.html)

[Modifica questa pagina su GitHub](https://github.com/mikailhossenimran/voltdownloadmanager/edit/main/docs/themes.md) [Segnala un problema con questa pagina](https://github.com/mikailhossenimran/voltdownloadmanager/issues/new?template=website.yml&title=Website%3A%20Themes&page=https%3A//vdm.mikaillab.com/help/themes.html) [Cronologia della pagina](https://github.com/mikailhossenimran/voltdownloadmanager/commits/main/docs/themes.md)

Gratuito, open source, senza pubblicità, senza periodo di prova.

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