misterdownloadmanager: The ultimate open-source, clean-room download manager written from scratch in pure Rust for Windows, Mac, and Linux
Rust bittorrent-clientdebriddownload-acceleratordownload-managerdownloadmanagereguifile-downloadergallery-dlidmidm-alternativeinternet-download-managerm3u8-downloadermagnetplaylist-downloaderreal-debridrusttorrent-clientvideo-downloaderyoutube-downloaderyt-dlp
Classic dark: readable grey notes and error texts, a dark-tinted drop-down arrow (part of #45) (#180)
Ahmed Nefzaoui03c6ca51f8e8
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 6907ecd9..1f4bb83a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -406,6 +406,11 @@ Each release's notes on GitHub come from its section here (`## [X.Y.Z]`, seeanswered "Unsupported URL". Now, when one of them is used and no stream is known, the extensionreads the start of what the player fetched (a few kilobytes, never on sight) and recognises anHLS playlist or a DASH manifest.+- **Dark mode: grey notes and error texts are easier to read**+ ([#45](https://github.com/anefzaoui/misterdownloadmanager/issues/45)): they now have the+ contrast WCAG asks for (4.5:1) on every dark surface, Options' failed checks no longer use light+ mode's dark red on the dark dialog, and an editable drop-down's arrow is tinted dark under the+ pointer.- **A minimized MDM keeps working**: with the main window minimized (not to the notificationarea), queues didn't start their next file, the Scheduler's starts and stops didn't fire,download limits, the network adapter's kill switch, the clipboard monitor, the update check, thediff --git a/ROADMAP.md b/ROADMAP.mdindex e760d8c2..2c827c95 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -42,6 +42,8 @@ Everything below ships together, in one release, as version 0.3.0.- ✅ Themes, the groundwork: every colour and size the controls are drawn with comes from onetheme, and theme files can change them; the classic look is unchanged([#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 andsaving the list no longer wait for the window to be restored- ✅ Download video: every button fits its text in every language (German **ffmpeg installieren**diff --git a/crates/app/src/palette.rs b/crates/app/src/palette.rsindex 7883e838..7055c3b2 100644--- a/crates/app/src/palette.rs+++ b/crates/app/src/palette.rs@@ -148,10 +148,13 @@ palette! {window: "window", "Windows' and dialogs' background" = grey(0x39), grey(0xf0);text: "text", "Text and glyphs" = grey(0xff), grey(0x00);text_disabled: "text.disabled", "Disabled text, the one grey of every greyed control and label" = grey(0x8a), grey(0x8a);- muted: "text.muted", "Secondary text: notes, sizes, versions" = grey(0xa0), grey(0x6d);+ // Dark: #ababab, 4.5:1 on the dark tab page (#a0a0a0 was 4.0:1 there, 4.4:1 on the window).+ muted: "text.muted", "Secondary text: notes, sizes, versions" = grey(0xab), grey(0x6d);link: "link", "Text that opens something" = rgb(0x99, 0xc8, 0xff), rgb(0x00, 0x66, 0xcc);- error: "error", "Error text" = rgb(0xff, 0x80, 0x80), rgb(0xc4, 0x2b, 0x1c);- error_strong: "error.strong", "A failed check's message in Options (connection, browser and helper tests)" = rgb(0xc4, 0x2b, 0x1c), rgb(0xc4, 0x2b, 0x1c);+ // Dark: #ff9999, 5:1 on the dark tab page (#ff8080 was 4.3:1 there).+ error: "error", "Error text" = rgb(0xff, 0x99, 0x99), rgb(0xc4, 0x2b, 0x1c);+ // Dark: the error colour (light mode's #c42b1c was 2:1 on the dark dialog).+ error_strong: "error.strong", "A failed check's message in Options (connection, browser and helper tests)" = rgb(0xff, 0x99, 0x99), rgb(0xc4, 0x2b, 0x1c);warning: "warning", "Warning text" = rgb(0x9d, 0x5d, 0x00), rgb(0x9d, 0x5d, 0x00);success: "success", "Success text (a matching checksum)" = rgb(0x6c, 0xcb, 0x5f), rgb(0x0f, 0x7b, 0x0f);reach_near: "reach.near", "A download's server near by its round trip (under 60 ms), in Properties" = rgb(0x6c, 0xcb, 0x5f), rgb(0x10, 0x7c, 0x10);@@ -189,8 +192,9 @@ palette! {field_readonly: "field.readonly", "A read-only text box's inside" = grey(0x30), grey(0xf3);field_readonly_border: "field.readonly.border", "A read-only text box's border" = grey(0x4b), grey(0xe2);combo_chevron: "combo.chevron", "A drop-down's chevron" = grey(0x6f), grey(0x6f);- combo_arrow_hot: "combo.arrow.hot", "An editable drop-down's arrow zone under the pointer" = grey(0xf3), grey(0xf3);- combo_arrow_pressed: "combo.arrow.pressed", "An editable drop-down's arrow zone pressed or open" = grey(0xe8), grey(0xe8);+ // Dark: the dark parts' tints (light mode's greys showed over the dark box).+ combo_arrow_hot: "combo.arrow.hot", "An editable drop-down's arrow zone under the pointer" = grey(0x45), grey(0xf3);+ combo_arrow_pressed: "combo.arrow.pressed", "An editable drop-down's arrow zone pressed or open" = grey(0x26), grey(0xe8);// ---- buttons ----button: "button", "A button's face" = grey(0x44), grey(0xfd);button_hot: "button.hot", "A button's face under the pointer" = grey(0x4b), grey(0xf6);@@ -518,4 +522,31 @@ mod tests {assert_eq!(CLASSIC.metrics.control_radius, 3.0);assert_eq!(CLASSIC.metrics.list_row, 17.0);}++ /// The classic look's dark secondary and error texts read on every dark surface they sit on+ /// (WCAG 2.1 AA, 4.5:1): the window, a tab page, a text box.+ #[test]+ fn classic_dark_texts_read() {+ let ratio = |a: Color32, b: Color32| {+ let lum = |c: Color32| {+ let f = |v: u8| {+ let v = v as f32 / 255.0;+ if v <= 0.04045 {+ v / 12.92+ } else {+ ((v + 0.055) / 1.055).powf(2.4)+ }+ };+ 0.2126 * f(c.r()) + 0.7152 * f(c.g()) + 0.0722 * f(c.b())+ };+ let (x, y) = (lum(a), lum(b));+ (x.max(y) + 0.05) / (x.min(y) + 0.05)+ };+ let d = &CLASSIC.dark;+ for fg in [d.muted, d.error, d.error_strong] {+ for bg in [d.window, d.tab_page, d.field] {+ assert!(ratio(fg, bg) >= 4.5, "{fg:?} on {bg:?}: {}", ratio(fg, bg));+ }+ }+ }}