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.
เลือกชุดรูปแบบ
เปิด มุมมอง → ชุดรูปแบบ แล้วคลิกชุดรูปแบบที่ต้องการ หน้าต่างทั้งหมดจะเปลี่ยนทันทีโดยไม่ต้องรีสตาร์ท จากนั้นใช้ มุมมอง → รองรับโหมดมืด และ มุมมอง → มืดตลอดเวลา เพื่อเลือกโหมดสว่างหรือมืด เช่นเดียวกับรูปลักษณ์แบบคลาสสิก (โหมดมืด)
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.
ตำแหน่งไฟล์ชุดรูปแบบ
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:
| ระบบ | โฟลเดอร์ |
|---|---|
| Windows | %APPDATA%\misterdownloadmanager\themes |
| Linux | ~/.local/share/misterdownloadmanager/themes |
| macOS | ~/Library/Application Support/misterdownloadmanager/themes |
| สำเนาแบบพกพา | data\themesข้างโปรแกรม |
ภายในสองวินาที ไฟล์ใหม่จะปรากฏใน มุมมอง → ชุดรูปแบบ ใต้ชุดรูปแบบในตัว โดยมี name ที่กำหนดเอง หลังจากแก้ไขไฟล์ ให้เลือกอีกครั้งใน มุมมอง → ชุดรูปแบบ เพื่อดูการเปลี่ยนแปลง
ชุดรูปแบบสามารถเป็นไฟล์เดียว (harbour.toml) หรือเป็นโฟลเดอร์ของตัวเอง (harbour/theme.toml) เมื่อมีไอคอน
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.
ชุดสี Base16 และ pywal
ชุดสีที่สร้างขึ้นสำหรับโปรแกรมอื่นก็เป็นชุดรูปแบบได้เช่นกัน โดยไม่ต้องแปลงอะไรเลย:
- ชุดรูปแบบ Base16 ซึ่งเป็นไฟล์
.yamlที่มาพร้อมกับ ชุดรูปแบบ Base16 และ Base24: ทั้งแบบคลาสสิก (scheme:และbase00ถึงbase0Fที่ด้านบน) และแบบใหม่กว่า (name:และบล็อกpalette:) ชุดรูปแบบ Base24 จะอ่านเป็น 16 สีแรก - ไฟล์
colors.jsonของ pywal หรือไฟล์ของโปรแกรมใด ๆ ที่มีรูปแบบเหมือน pywal (เทมเพลต pywal ของ wallust)
เพิ่มด้วย มุมมอง → ชุดรูปแบบ → เพิ่มไฟล์ธีม… หรือใส่ในโฟลเดอร์ชุดรูปแบบด้วยตัวเอง จะแสดงใน มุมมอง → ชุดรูปแบบ ภายใต้ชื่อชุดรูปแบบ (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 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 |
|---|---|---|
| รายการดาวน์โหลด กล่องข้อความ และเมนู | 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; GDM'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 (หรือ JSON, .json; หรือ ชุดสี, .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 GDM 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(สีเดียว) หรือaccentcontrast = "high"— เพิ่มความเข้มของขอบและสีข้อความทั้งหมดเหนือส่วนที่เหลือ
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.
ไอคอน
ชุดรูปแบบในโฟลเดอร์ของตัวเอง (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 (NEEDS)
สร้างชุดรูปแบบ
- มุมมอง → ชุดรูปแบบ → เปิดโฟลเดอร์ชุดรูปแบบ แล้วสร้างไฟล์
.tomlใหม่ที่นั่น (ใช้โปรแกรมแก้ไขข้อความใดก็ได้) - เริ่มต้นจากตัวอย่างด้านบน: เปลี่ยนสีหลัก จากนั้นเพิ่มบทบาทและขนาดตามต้องการ
- เลือกใน มุมมอง → ชุดรูปแบบ และดูทั้งสองด้าน: มุมมอง → มืดตลอดเวลา เปิดและปิด ตรวจสอบว่าข้อความอ่านง่ายและเครื่องหมายโฟกัสปรากฏให้เห็นทั้งสองด้าน
หน้าชุดรูปแบบ ของเว็บไซต์มีข้อความแจ้งที่คุณสามารถให้ผู้ช่วย AI พร้อมรูปแบบ คีย์ทั้งหมด และกฎ เพื่อเขียนชุดรูปแบบให้คุณจากคำอธิบาย
แบ่งปัน
สร้างสิ่งที่คนอื่นน่าจะชอบ? เปิด pull request ที่เพิ่มลงใน crates/app/assets/themes พร้อม:
- ไฟล์
.tomlและโฟลเดอร์ไอคอนหากมี; - ภาพหน้าจอของหน้าต่างหลักในด้านสว่างและด้านมืด;
- a
SOURCES.txtbeside 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.
ยังไม่แน่ใจใช่ไหม? พูดคุย กันก่อน CONTRIBUTING.md อธิบายวิธีการทำงานของพูลรีเควสต์ที่นี่
ขั้นตอนถัดไป
ฟรี, โอเพนซอร์ส, ไม่มีโฆษณา, ไม่มีช่วงทดลองใช้
Download GolinksPRO Download Manager