GolinksPRO Download Manager
  1. Home
  2. Guida
  3. Temi

Temi

A theme changes how GDM 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).

The built-in themes are Classic (GDM's own look, the default), Native (your system's accent colour and contrast), High contrast, and the style themes Metro, Adwaita, Breeze, Luna, Aero and Aqua, each with its own control shapes and icons, and on Windows its own title bar. Getting started describes each one; the website's Themes page shows them all, light and dark.

Dove vanno i file dei temi

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

Sistema Cartella
Windows %APPDATA%\misterdownloadmanager\themes
Linux ~/.local/share/misterdownloadmanager/themes
macOS ~/Library/Application Support/misterdownloadmanager/themes
Copia portatile data\themesaccanto 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 GDM copies it into the themes folder and uses it at once. A file that isn't a theme stays out, and GDM 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: 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 GDM follows your wallpaper: each time wal writes new colours, GDM 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 GDM dark and a light one light, whatever View → Always dark says. The scheme's colours go where they mean the same:

GDM 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; GDM'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 (o JSON, .json; o una combinazione di colori, .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 GDM 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 di caselle di testo, caselle di controllo, pulsanti, barre di avanzamento, barre di scorrimento, il contorno dello stato attivo e la barra del titolo.
  • 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 (read from GDM's own code, so it never drifts). The built-in themes are written the same way: read them on GitHub.

A key GDM doesn't know, or a value it can't read, is skipped and written to GDM's log (the logs folder beside the themes folder), so a file made for a newer GDM 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 (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 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 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 GDM share them (GPL-3.0), never copied from another program.

Non sei ancora sicuro? Prima mostralo nelle discussioni. CONTRIBUTING.md spiega come funzionano le pull request qui.

Passi successivi

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

Download GolinksPRO Download Manager