Skip to content

misterdownloadmanager: The ultimate open-source, clean-room download manager written from scratch in pure Rust for Windows, Mac, and Linux

Themes: Emerald, a white canvas with one emerald fill and near-black ink (from #45) (#522)

atomus1218742fcd833ea
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 13bb4674..6602c46c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -42,6 +42,7 @@ Each release's notes on GitHub come from its section here (`## [X.Y.Z]`, see
### Added
- Options → General → **Customize MDM Download panels in browsers**: Export... and Import... for the sites the download button stays off, a plain text file with one site a line ([#424](https://github.com/anefzaoui/misterdownloadmanager/issues/424)).
+- **Emerald** among the built-in looks in **View → Theme**: a white canvas with one near-black ink and a ladder of neutral greys for structure, emerald fills that carry near-black text rather than white, 6-point corners and Metro's one-colour icons. Its theme file names a few seeds per side and derives every other colour, so a role added later arrives in this look instead of the classic one ([#45](https://github.com/anefzaoui/misterdownloadmanager/issues/45)).
### Fixed
diff --git a/ROADMAP.md b/ROADMAP.md
index b09cdcae..cc5e756a 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -222,6 +222,11 @@ Everything below ships together, in version 0.5.0.
- ✅ Themes: Base16 and pywal colour schemes imported as themes (View → Theme → Add a theme
file…, or the themes folder); **pywal** follows `wal` as it writes new colours, text kept
readable (4.5:1) ([#45](https://github.com/anefzaoui/misterdownloadmanager/issues/45))
+- ✅ Themes: Emerald (a white canvas, one near-black ink, emerald
+ fills carrying near-black text, 6-point corners, Metro's one-colour icons); its theme file
+ gives a few seeds per variant and derives every other colour, so a role added later arrives
+ in this look rather than the classic one
+ ([#45](https://github.com/anefzaoui/misterdownloadmanager/issues/45))
- ✅ Dark mode: grey notes and error texts readable (4.5:1), Options' failed checks no longer dark
red on the dark dialog ([#45](https://github.com/anefzaoui/misterdownloadmanager/issues/45))
- ✅ A minimized MDM keeps working: queues, the Scheduler, download limits, the kill switch and
diff --git a/crates/app/assets/themes/emerald.toml b/crates/app/assets/themes/emerald.toml
new file mode 100644
index 00000000..de44a296
--- /dev/null
+++ b/crates/app/assets/themes/emerald.toml
@@ -0,0 +1,102 @@
+# Emerald: one of Mister Download Manager's built-in themes, and an example of a theme file.
+# A white canvas, one near-black ink, a ladder of neutral greys for structure, and emerald as the
+# one chromatic event.
+#
+# Emerald is a fill here, never small text on white (1.75:1), so the roles that must be read
+# against the canvas — focus rings, links, success — take the deeper green instead. A green fill
+# carries near-black text, never white. Corners stay at 6, buttons included: a pill is the one
+# shape this look never draws.
+#
+# A theme file names only what it changes. A few seeds per variant derive every other colour
+# (`crate::derive`), so a role MDM adds later arrives in this look rather than the classic one.
+# The icons are Metro's: one-colour line art where the default look has pictures.
+
+name = "Emerald"
+icons = "mono"
+icon-set = "metro"
+
+[controls]
+field-focus = "ring"
+check = "fluent"
+button = "fluent"
+progress = "bar"
+scroll = "overlay"
+caption = "metro"
+focus = "ring"
+
+[sizes]
+radius = 6
+"radius.button" = 6
+"radius.part" = 4
+"radius.check" = 4
+"radius.flyout" = 10
+"radius.menu-item" = 6
+"radius.egui" = 6
+"radius.popup" = 8
+border = 1
+"focus-line" = 2
+"list.row" = 19
+"list.header" = 26
+
+[seeds.light]
+background = "#ffffff"
+surface = "#ffffff"
+header = "#fafafa"
+text = "#171717"
+accent = "#17a673"
+selection = "#3ecf8e"
+error = "#d1004f"
+warning = "#8a6100"
+success = "#0e7a55"
+
+[seeds.dark]
+background = "#1c1c1c"
+surface = "#202020"
+header = "#202020"
+text = "#ffffff"
+accent = "#3ecf8e"
+selection = "#3ecf8e"
+error = "#ff8095"
+warning = "#ffdb13"
+success = "#3ecf8e"
+
+[light]
+# The accent's fills are painted in the light emerald, which carries near-black text; the seed's
+# deeper green stays on the lines and labels that must be read against white.
+"button.accent" = "#3ecf8e"
+"button.accent.hot" = "#4ade80"
+"button.accent.pressed" = "#35c283"
+"button.accent.bottom" = "#24b47e"
+"button.accent.text" = "#171717"
+"button.accent.text.pressed" = "#171717"
+"check.on" = "#3ecf8e"
+"check.on.hot" = "#4ade80"
+"check.on.pressed" = "#35c283"
+"check.mark" = "#171717"
+"progress.bar" = "#3ecf8e"
+"progress.track" = "#ededed"
+
+# The focus ring in the seed's green rather than a grey: the one accent, seen at 3:1.
+"focus.ring" = "#17a673"
+
+# Text on a selection: the ink, so the emerald stays a fill and not a colour that inks other text.
+"selection.text" = "#171717"
+
+# Dotted tree connectors, quiet enough to read as structure rather than as ink.
+"tree.lines" = "#dedede"
+
+# Kind chips: a soft fill with the ink on it, so one text colour works on both hues.
+"chip.web" = "#d9f6e7"
+"chip.torrent" = "#ece6fa"
+"chip.text" = "#171717"
+
+[dark]
+# These seeds already paint the accent's fills in emerald with near-black text, so only the
+# roles derived from the wrong seed would show.
+"progress.track" = "#333333"
+"focus.ring" = "#3ecf8e"
+"selection.text" = "#171717"
+"tree.lines" = "#2e2e2e"
+"chip.web" = "#12352a"
+"chip.torrent" = "#211a33"
+"chip.text" = "#e6e6e6"
diff --git a/crates/app/src/app.rs b/crates/app/src/app.rs
index 1718eba0..8d4b2f60 100644
--- a/crates/app/src/app.rs
+++ b/crates/app/src/app.rs
@@ -5961,6 +5961,8 @@ impl App {
items.push(Radio("Aero", Cmd::Theme("aero"), true, on("aero")));
// i18n: View → Theme: a style theme's name (Mac OS X's look), a name: keep "Aqua" as written
items.push(Radio("Aqua", Cmd::Theme("aqua"), true, on("aqua")));
+ // i18n: View → Theme: a style theme's name (a white canvas, emerald fills, 6-point corners), a name: keep "Emerald" as written
+ items.push(Radio("Emerald", Cmd::Theme("emerald"), true, on("emerald")));
let wal = crate::themefile::PYWAL;
for e in self.theme_list.iter().filter(|e| e.path.is_some()) {
if !files {
diff --git a/crates/app/src/palette.rs b/crates/app/src/palette.rs
index 14d25889..18c47675 100644
--- a/crates/app/src/palette.rs
+++ b/crates/app/src/palette.rs
@@ -622,7 +622,7 @@ pub static CLASSIC: Theme = Theme {
/// (written out above), then the ones shipped as theme files (`assets/themes/`, in the format
/// users write, so they double as examples). Native follows the system and is made when chosen
/// (`crate::native`).
-pub fn builtins() -> [&'static Theme; 8] {
+pub fn builtins() -> [&'static Theme; 9] {
static HIGH_CONTRAST: std::sync::LazyLock<Theme> = std::sync::LazyLock::new(|| {
crate::themefile::builtin(
"high-contrast",
@@ -648,6 +648,9 @@ pub fn builtins() -> [&'static Theme; 8] {
static AQUA: std::sync::LazyLock<Theme> = std::sync::LazyLock::new(|| {
crate::themefile::builtin("aqua", include_str!("../assets/themes/aqua.toml"))
});
+ static EMERALD: std::sync::LazyLock<Theme> = std::sync::LazyLock::new(|| {
+ crate::themefile::builtin("emerald", include_str!("../assets/themes/emerald.toml"))
+ });
[
&CLASSIC,
&HIGH_CONTRAST,
@@ -657,6 +660,7 @@ pub fn builtins() -> [&'static Theme; 8] {
&LUNA,
&AERO,
&AQUA,
+ &EMERALD,
]
}
@@ -859,6 +863,11 @@ mod tests {
("luna", "Luna", include_str!("../assets/themes/luna.toml")),
("aero", "Aero", include_str!("../assets/themes/aero.toml")),
("aqua", "Aqua", include_str!("../assets/themes/aqua.toml")),
+ (
+ "emerald",
+ "Emerald",
+ include_str!("../assets/themes/emerald.toml"),
+ ),
] {
let v: serde_json::Value = toml::from_str(text).unwrap();
let l = crate::themefile::parse(id, &v, |_| {
@@ -933,6 +942,22 @@ mod tests {
assert_eq!(builtins()[7].controls.focus, FocusLook::Ring);
assert_eq!(builtins()[5].controls.focus, FocusLook::Dotted);
assert_eq!(builtins()[6].controls.focus, FocusLook::Dotted);
+ // Emerald: flat 6-point corners, ring focus, and its chips inked rather than lettered
+ // in white — the soft fill carries the near-black text in both variants.
+ let emerald = builtins()[8];
+ assert_eq!(emerald.metrics.control_radius, 6.0);
+ assert_eq!(emerald.controls.field_focus, FieldFocus::Ring);
+ assert_eq!(emerald.controls.focus, FocusLook::Ring);
+ assert_eq!(emerald.controls.button, ButtonLook::Fluent);
+ assert_eq!(emerald.controls.check, CheckLook::Fluent);
+ assert_eq!(emerald.controls.progress, ProgressLook::Bar);
+ assert_eq!(emerald.controls.scroll, ScrollLook::Overlay);
+ use crate::derive::contrast;
+ for p in [&emerald.light, &emerald.dark] {
+ assert!(contrast(p.chip_text, p.chip_web) >= 4.5);
+ assert!(contrast(p.chip_text, p.chip_torrent) >= 4.5);
+ assert!(contrast(p.text, p.window) >= 4.5);
+ }
}
/// The classic look's dark secondary and error texts read on every dark surface they sit on
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 3e8fe09b..1c3cbfff 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -88,8 +88,8 @@ light and a dark palette, metrics, control styles and an icon style (`palette.rs
accent).
- **Control styles.** `palette::Controls` names each control's shape (text boxes, check boxes,
buttons, progress bars, scroll bars, the focus mark, the title bar); the style themes (Metro,
- Adwaita, Breeze, Luna, Aero, Aqua) pick theirs, and on Windows MDM then draws the title bar
- itself (the `caption.*` roles).
+ Adwaita, Breeze, Luna, Aero, Aqua, Emerald) pick theirs, and on Windows MDM then draws the
+ title bar itself (the `caption.*` roles).
- **Theme files.** `themefile.rs` reads TOML or JSON from the data folder's `themes` (one file,
or `<id>/theme.toml` with icons beside it). A file names only what it changes; the rest comes
from the theme it `inherits` (a built-in's id or another file, the classic look by default),
diff --git a/docs/README.md b/docs/README.md
index f38e2876..0b620f0c 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -39,7 +39,7 @@ These pages explain each part of the program. The tutorials walk through the thi
## Settings
- **[Options](options.md)** — every page of the Options window.
-- **[Themes](themes.md)** — the built-in looks (Classic, Native, High contrast, Metro, Adwaita, Breeze, Luna, Aero, Aqua), and how to make your own in a text file.
+- **[Themes](themes.md)** — the built-in looks (Classic, Native, High contrast, Metro, Adwaita, Breeze, Luna, Aero, Aqua, Emerald), and how to make your own in a text file.
- **[Languages](languages.md)** — the 86 interface languages, numbers and dates, right-to-left layouts, and how to help translate.
- **[Portable mode](portable.md)** — run MDM from a folder or a USB stick without installing it.
- **[Keyboard shortcuts](keyboard-shortcuts.md)** — every key the main window answers, and screen readers.
diff --git a/docs/getting-started.md b/docs/getting-started.md
index 1486d7fd..43214fd3 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -210,8 +210,11 @@ MDM follows your system: when Windows (or your desktop's light/dark preference o
- **Aqua**: Mac OS X's look: gel buttons round at the ends (the default one blue), glossy check
boxes, a blue focus ring, a blue gel progress bar, a grey title bar with small round buttons
(on Windows), and icons drawn for MDM in that manner.
+- **Emerald**: a white canvas with one near-black ink and a ladder of
+ neutral greys for structure, emerald fills that always carry near-black text rather than white,
+ 6-point corners on every control, and Metro's one-colour icons.
-![View → Theme open: Classic, Native, High contrast, Metro, Adwaita, Breeze, Luna, Aero and Aqua, and Open themes folder](images/help/view-theme.webp)
+![View → Theme open: Classic, Native, High contrast, Metro, Adwaita, Breeze, Luna, Aero, Aqua and Emerald, and Open themes folder](images/help/view-theme.webp)
*View → Theme switches at once, keeping the layout.*
<!-- pictures -->
diff --git a/docs/images/help/site-theme-emerald-dark.webp b/docs/images/help/site-theme-emerald-dark.webp
new file mode 100644
index 00000000..d33349a7
Binary files /dev/null and b/docs/images/help/site-theme-emerald-dark.webp differ
diff --git a/docs/images/help/site-theme-emerald.webp b/docs/images/help/site-theme-emerald.webp
new file mode 100644
index 00000000..0cd30976
Binary files /dev/null and b/docs/images/help/site-theme-emerald.webp differ
diff --git a/docs/themes.md b/docs/themes.md
index cef54a1f..6c6d15ed 100644
--- a/docs/themes.md
+++ b/docs/themes.md
@@ -14,10 +14,10 @@ for the classic look ([Dark mode](getting-started.md#dark-mode)).
The built-in themes are **Classic** (MDM'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](getting-started.md#themes) describes each one; the
-website's [Themes page](https://misterdownloadmanager.com/themes.html) shows them all, light and
-dark.
+**Breeze**, **Luna**, **Aero**, **Aqua** and **Emerald**, each with its own control shapes and
+icons, and on Windows its own title bar. [Getting started](getting-started.md#themes) describes
+each one; the website's [Themes page](https://misterdownloadmanager.com/themes.html) shows them
+all, light and dark.
## Where theme files go
diff --git a/i18n/en.tsv b/i18n/en.tsv
index f7c2b931..c0d404c7 100644
--- a/i18n/en.tsv
+++ b/i18n/en.tsv
@@ -4673,6 +4673,9 @@ menu E&xport E&xport
#. menu command in the main window
menu Edit queue Edit queue
#. menu command in the main window
+#. View → Theme: a style theme's name (a white canvas, emerald fills, 6-point corners), a name: keep "Emerald" as written
+menu Emerald Emerald
+#. menu command in the main window
#. verb: unpack the downloaded archive (zip, 7z, rar) into its folder
menu Extract Extract
#. menu command in the main window
diff --git a/tools/shots/shots.toml b/tools/shots/shots.toml
index 400d36ad..2e1c959e 100644
--- a/tools/shots/shots.toml
+++ b/tools/shots/shots.toml
@@ -73,7 +73,7 @@ page = "getting-started.md"
under = "Themes"
take = "@menu:menu:3:theme"
crop = [145, 28, 366, 424]
-alt = "View → Theme open: Classic, Native, High contrast, Metro, Adwaita, Breeze, Luna, Aero and Aqua, and Open themes folder"
+alt = "View → Theme open: Classic, Native, High contrast, Metro, Adwaita, Breeze, Luna, Aero, Aqua and Emerald, and Open themes folder"
caption = "View → Theme switches at once, keeping the layout."
[[shot]]
@@ -708,6 +708,15 @@ crop = [0, 0, 930, 300]
alt = "The main window in the Aqua theme"
caption = "Aqua"
+[[shot]]
+id = "site-theme-emerald"
+page = "website/content/themes.toml"
+take = "theme:emerald+@main"
+# The title bar, the menus, the toolbar, the categories and the list's rows: the theme's look.
+crop = [0, 0, 930, 300]
+alt = "The main window in the Emerald theme"
+caption = "Emerald"
+
[[shot]]
id = "site-gallery"
page = "website/content/features/galleries.md"
diff --git a/website/content/themes.toml b/website/content/themes.toml
index 0999be3e..2b3631b7 100644
--- a/website/content/themes.toml
+++ b/website/content/themes.toml
@@ -59,3 +59,10 @@ name = "Aqua"
feel = "Mac OS X's feel: gel buttons round at the ends, a blue focus ring and a blue gel progress bar."
shot = "images/help/site-theme-aqua.webp"
tag = true
+
+[[theme]]
+id = "emerald"
+name = "Emerald"
+feel = "A white canvas, one near-black ink, emerald fills with near-black text, 6-point corners."
+shot = "images/help/site-theme-emerald.webp"
+tag = true