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
Dark mode: no bright white line under the menu bar (#379) (#500)
Ahmed Nefzaouiacd6b137b338
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c9bb4720..fd542b5f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,9 @@ Each release's notes on GitHub come from its section here (`## [X.Y.Z]`, see## [Unreleased]+### Fixed++- Dark mode no longer draws a bright white line under the menu bar, across the whole window, in the Classic and Native themes ([#379](https://github.com/anefzaoui/misterdownloadmanager/issues/379)).### 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)).diff --git a/ROADMAP.md b/ROADMAP.mdindex 5b80dcfb..68017bd3 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -519,6 +519,8 @@ These ship in a later version, when they're ready.### Bugs being looked into+- 🔄 A bright white line under the menu bar in dark mode+ ([#379](https://github.com/anefzaoui/misterdownloadmanager/issues/379)): fix in review- 🔄 Closing the main window follows a setting (on by default, MDM keeps running), and with notray icon the window goes to the taskbar instead of vanishing: fix in review([#457](https://github.com/anefzaoui/misterdownloadmanager/pull/457))diff --git a/crates/app/src/palette.rs b/crates/app/src/palette.rsindex bde803ef..14d25889 100644--- a/crates/app/src/palette.rs+++ b/crates/app/src/palette.rs@@ -261,7 +261,7 @@ palette! {// ---- menu bar and menus ----menubar: "menubar", "The menu bar" = grey(0x20), grey(0xff);menubar_bottom: "menubar.bottom", "The menu bar's last row" = grey(0x20), grey(0xf2);- menubar_line: "menubar.line", "The line under the menu bar" = grey(0xf0), grey(0xf0);+ menubar_line: "menubar.line", "The line under the menu bar" = grey(0x20), grey(0xf0);menubar_hot: "menubar.hot", "A menu title under the pointer" = grey(0x50), grey(0xf5);menubar_open: "menubar.open", "The open menu's title" = grey(0x50), grey(0xf9);menu: "menu", "A menu's background" = grey(0x2b), grey(0xf9);@@ -273,8 +273,8 @@ palette! {menu_glyph: "menu.glyph", "Bullets, ticks and submenu arrows" = grey(0xff), grey(0x1a);menu_text_disabled: "menu.text.disabled", "A greyed menu item" = grey(0x6d), grey(0x9f);// ---- toolbar ----- toolbar_line: "toolbar.line", "The toolbar's top line" = grey(0xa0), grey(0xa0);- toolbar_line_light: "toolbar.line.light", "The highlight under it" = grey(0xff), grey(0xff);+ toolbar_line: "toolbar.line", "The toolbar's top line" = grey(0x4a), grey(0xa0);+ toolbar_line_light: "toolbar.line.light", "The highlight under it" = grey(0x39), grey(0xff);toolbar_hot: "toolbar.hot", "A toolbar button under the pointer" = rgb(0x33, 0x41, 0x4d), rgb(0xe5, 0xf3, 0xff);toolbar_hot_faint: "toolbar.hot.faint", "A split button's other part while one is under the pointer" = rgb(0x37, 0x3b, 0x3f), rgb(0xf3, 0xf9, 0xff);toolbar_pressed: "toolbar.pressed", "A toolbar button pressed" = rgb(0x2a, 0x36, 0x40), rgb(0xcc, 0xe8, 0xff);@@ -961,4 +961,44 @@ mod tests {}}}++ /// The rows between a dark variant's menu bar and its toolbar (#379): none of them stands out+ /// against the surfaces around them. The classic dark palette's were near-white (the dark+ /// look of IDM's era retired on 2026-11-01): a bright band across the window, under the menu+ /// bar. High contrast's lines are meant to stand out.+ #[test]+ fn dark_variants_draw_no_bright_line_under_the_menu_bar() {+ 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 ratio = |a: Color32, b: Color32| {+ let (x, y) = (lum(a), lum(b));+ (x.max(y) + 0.05) / (x.min(y) + 0.05)+ };+ for theme in builtins().iter().filter(|t| t.id != "high-contrast") {+ let d = &theme.dark;+ for (what, line) in [+ ("menubar.line", d.menubar_line),+ ("toolbar.line", d.toolbar_line),+ ("toolbar.line.light", d.toolbar_line_light),+ ] {+ for bg in [d.menubar, d.window] {+ assert!(+ ratio(line, bg) <= 2.5,+ "{}: {what} {line:?} on {bg:?}: {}",+ theme.id,+ ratio(line, bg)+ );+ }+ }+ }+ }}