Skip to main content

max / audiofiles

Take makeover from crates.io instead of theme-common by path theme-common was reachable only as ../../MNW/shared/theme-common. It is now published as makeover 0.8.0, so the dependency no longer reaches into a sibling checkout. audiofiles keeps its own crate-local themes/ and uses makeover purely as the parsing library, so this is a rename.
Author: Max Johnson <me@maxj.phd> · 2026-07-19 19:32 UTC
Commit: eeeeee28730e9b90ca3dcdd48303bdbb76625049
Parent: fc80209
4 files changed, +60 insertions, -147 deletions
M Cargo.lock +42 -129
@@ -423,6 +423,7 @@ dependencies = [
423 423 "egui_extras",
424 424 "hound",
425 425 "libc",
426 + "makeover",
426 427 "objc2 0.6.4",
427 428 "objc2-app-kit 0.3.2",
428 429 "objc2-foundation 0.3.2",
@@ -435,12 +436,11 @@ dependencies = [
435 436 "serde_json",
436 437 "symphonia",
437 438 "tempfile",
438 - "theme-common",
439 439 "thiserror 2.0.18",
440 440 "toml",
441 441 "tracing",
442 - "windows 0.62.2",
443 - "windows-core 0.62.2",
442 + "windows",
443 + "windows-core",
444 444 ]
445 445
446 446 [[package]]
@@ -814,7 +814,7 @@ dependencies = [
814 814 "num-traits",
815 815 "serde",
816 816 "wasm-bindgen",
817 - "windows-link 0.2.1",
817 + "windows-link",
818 818 ]
819 819
820 820 [[package]]
@@ -1006,7 +1006,7 @@ dependencies = [
1006 1006 "wasm-bindgen",
1007 1007 "wasm-bindgen-futures",
1008 1008 "web-sys",
1009 - "windows 0.61.3",
1009 + "windows",
1010 1010 ]
1011 1011
1012 1012 [[package]]
@@ -1777,7 +1777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1777 1777 checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8"
1778 1778 dependencies = [
1779 1779 "rustix 1.1.4",
1780 - "windows-link 0.2.1",
1780 + "windows-link",
1781 1781 ]
1782 1782
1783 1783 [[package]]
@@ -2290,7 +2290,7 @@ dependencies = [
2290 2290 "js-sys",
2291 2291 "log",
2292 2292 "wasm-bindgen",
2293 - "windows-core 0.62.2",
2293 + "windows-core",
2294 2294 ]
2295 2295
2296 2296 [[package]]
@@ -2518,7 +2518,7 @@ dependencies = [
2518 2518 "simd_cesu8",
2519 2519 "thiserror 2.0.18",
2520 2520 "walkdir",
2521 - "windows-link 0.2.1",
2521 + "windows-link",
2522 2522 ]
2523 2523
2524 2524 [[package]]
@@ -2698,7 +2698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2698 2698 checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
2699 2699 dependencies = [
2700 2700 "cfg-if",
2701 - "windows-link 0.2.1",
2701 + "windows-link",
2702 2702 ]
2703 2703
2704 2704 [[package]]
@@ -2814,6 +2814,16 @@ dependencies = [
2814 2814 ]
2815 2815
2816 2816 [[package]]
2817 + name = "makeover"
2818 + version = "0.8.0"
2819 + source = "registry+https://github.com/rust-lang/crates.io-index"
2820 + checksum = "c43e27ea24999c6692f6e72ee286fafc561da0cc6f81bc39fc867621718063f7"
2821 + dependencies = [
2822 + "serde",
2823 + "toml",
2824 + ]
2825 +
2826 + [[package]]
2817 2827 name = "matchers"
2818 2828 version = "0.2.0"
2819 2829 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2864,7 +2874,7 @@ dependencies = [
2864 2874 "parking_lot",
2865 2875 "wasm-bindgen",
2866 2876 "web-sys",
2867 - "windows 0.61.3",
2877 + "windows",
2868 2878 ]
2869 2879
2870 2880 [[package]]
@@ -3639,7 +3649,7 @@ dependencies = [
3639 3649 "libc",
3640 3650 "redox_syscall 0.5.18",
3641 3651 "smallvec",
3642 - "windows-link 0.2.1",
3652 + "windows-link",
3643 3653 ]
3644 3654
3645 3655 [[package]]
@@ -5040,14 +5050,6 @@ dependencies = [
5040 5050 ]
5041 5051
5042 5052 [[package]]
5043 - name = "theme-common"
5044 - version = "0.7.0"
5045 - dependencies = [
5046 - "serde",
5047 - "toml",
5048 - ]
5049 -
5050 - [[package]]
5051 5053 name = "thin-vec"
5052 5054 version = "0.2.18"
5053 5055 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -6087,36 +6089,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
6087 6089
6088 6090 [[package]]
6089 6091 name = "windows"
6090 - version = "0.61.3"
6091 - source = "registry+https://github.com/rust-lang/crates.io-index"
6092 - checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
6093 - dependencies = [
6094 - "windows-collections 0.2.0",
6095 - "windows-core 0.61.2",
6096 - "windows-future 0.2.1",
6097 - "windows-link 0.1.3",
6098 - "windows-numerics 0.2.0",
6099 - ]
6100 -
6101 - [[package]]
6102 - name = "windows"
6103 6092 version = "0.62.2"
6104 6093 source = "registry+https://github.com/rust-lang/crates.io-index"
6105 6094 checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
6106 6095 dependencies = [
6107 - "windows-collections 0.3.2",
6108 - "windows-core 0.62.2",
6109 - "windows-future 0.3.2",
6110 - "windows-numerics 0.3.1",
6111 - ]
6112 -
6113 - [[package]]
6114 - name = "windows-collections"
6115 - version = "0.2.0"
6116 - source = "registry+https://github.com/rust-lang/crates.io-index"
6117 - checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
6118 - dependencies = [
6119 - "windows-core 0.61.2",
6096 + "windows-collections",
6097 + "windows-core",
6098 + "windows-future",
6099 + "windows-numerics",
6120 6100 ]
6121 6101
6122 6102 [[package]]
@@ -6125,20 +6105,7 @@ version = "0.3.2"
6125 6105 source = "registry+https://github.com/rust-lang/crates.io-index"
6126 6106 checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
6127 6107 dependencies = [
6128 - "windows-core 0.62.2",
6129 - ]
6130 -
6131 - [[package]]
6132 - name = "windows-core"
6133 - version = "0.61.2"
6134 - source = "registry+https://github.com/rust-lang/crates.io-index"
6135 - checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
6136 - dependencies = [
6137 - "windows-implement",
6138 - "windows-interface",
6139 - "windows-link 0.1.3",
6140 - "windows-result 0.3.4",
6141 - "windows-strings 0.4.2",
6108 + "windows-core",
6142 6109 ]
6143 6110
6144 6111 [[package]]
@@ -6149,20 +6116,9 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
6149 6116 dependencies = [
6150 6117 "windows-implement",
6151 6118 "windows-interface",
6152 - "windows-link 0.2.1",
6153 - "windows-result 0.4.1",
6154 - "windows-strings 0.5.1",
6155 - ]
6156 -
6157 - [[package]]
6158 - name = "windows-future"
6159 - version = "0.2.1"
6160 - source = "registry+https://github.com/rust-lang/crates.io-index"
6161 - checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
6162 - dependencies = [
6163 - "windows-core 0.61.2",
6164 - "windows-link 0.1.3",
6165 - "windows-threading 0.1.0",
6119 + "windows-link",
6120 + "windows-result",
6121 + "windows-strings",
6166 6122 ]
6167 6123
6168 6124 [[package]]
@@ -6171,9 +6127,9 @@ version = "0.3.2"
6171 6127 source = "registry+https://github.com/rust-lang/crates.io-index"
6172 6128 checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
6173 6129 dependencies = [
6174 - "windows-core 0.62.2",
6175 - "windows-link 0.2.1",
6176 - "windows-threading 0.2.1",
6130 + "windows-core",
6131 + "windows-link",
6132 + "windows-threading",
6177 6133 ]
6178 6134
6179 6135 [[package]]
@@ -6200,34 +6156,18 @@ dependencies = [
6200 6156
6201 6157 [[package]]
6202 6158 name = "windows-link"
6203 - version = "0.1.3"
6204 - source = "registry+https://github.com/rust-lang/crates.io-index"
6205 - checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
6206 -
6207 - [[package]]
6208 - name = "windows-link"
6209 6159 version = "0.2.1"
6210 6160 source = "registry+https://github.com/rust-lang/crates.io-index"
6211 6161 checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
6212 6162
6213 6163 [[package]]
6214 6164 name = "windows-numerics"
6215 - version = "0.2.0"
6216 - source = "registry+https://github.com/rust-lang/crates.io-index"
6217 - checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
6218 - dependencies = [
6219 - "windows-core 0.61.2",
6220 - "windows-link 0.1.3",
6221 - ]
6222 -
6223 - [[package]]
6224 - name = "windows-numerics"
6225 6165 version = "0.3.1"
6226 6166 source = "registry+https://github.com/rust-lang/crates.io-index"
6227 6167 checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
6228 6168 dependencies = [
6229 - "windows-core 0.62.2",
6230 - "windows-link 0.2.1",
6169 + "windows-core",
6170 + "windows-link",
6231 6171 ]
6232 6172
6233 6173 [[package]]
@@ -6236,18 +6176,9 @@ version = "0.6.1"
6236 6176 source = "registry+https://github.com/rust-lang/crates.io-index"
6237 6177 checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720"
6238 6178 dependencies = [
6239 - "windows-link 0.2.1",
6240 - "windows-result 0.4.1",
6241 - "windows-strings 0.5.1",
6242 - ]
6243 -
6244 - [[package]]
6245 - name = "windows-result"
6246 - version = "0.3.4"
6247 - source = "registry+https://github.com/rust-lang/crates.io-index"
6248 - checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
6249 - dependencies = [
6250 - "windows-link 0.1.3",
6179 + "windows-link",
6180 + "windows-result",
6181 + "windows-strings",
6251 6182 ]
6252 6183
6253 6184 [[package]]
@@ -6256,16 +6187,7 @@ version = "0.4.1"
6256 6187 source = "registry+https://github.com/rust-lang/crates.io-index"
6257 6188 checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
6258 6189 dependencies = [
6259 - "windows-link 0.2.1",
6260 - ]
6261 -
6262 - [[package]]
6263 - name = "windows-strings"
6264 - version = "0.4.2"
6265 - source = "registry+https://github.com/rust-lang/crates.io-index"
6266 - checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
6267 - dependencies = [
6268 - "windows-link 0.1.3",
6190 + "windows-link",
6269 6191 ]
6270 6192
6271 6193 [[package]]
@@ -6274,7 +6196,7 @@ version = "0.5.1"
6274 6196 source = "registry+https://github.com/rust-lang/crates.io-index"
6275 6197 checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
6276 6198 dependencies = [
6277 - "windows-link 0.2.1",
6199 + "windows-link",
6278 6200 ]
6279 6201
6280 6202 [[package]]
@@ -6319,7 +6241,7 @@ version = "0.61.2"
6319 6241 source = "registry+https://github.com/rust-lang/crates.io-index"
6320 6242 checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
6321 6243 dependencies = [
6322 - "windows-link 0.2.1",
6244 + "windows-link",
6323 6245 ]
6324 6246
6325 6247 [[package]]
@@ -6359,7 +6281,7 @@ version = "0.53.5"
6359 6281 source = "registry+https://github.com/rust-lang/crates.io-index"
6360 6282 checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
6361 6283 dependencies = [
6362 - "windows-link 0.2.1",
6284 + "windows-link",
6363 6285 "windows_aarch64_gnullvm 0.53.1",
6364 6286 "windows_aarch64_msvc 0.53.1",
6365 6287 "windows_i686_gnu 0.53.1",
@@ -6372,20 +6294,11 @@ dependencies = [
6372 6294
6373 6295 [[package]]
6374 6296 name = "windows-threading"
6375 - version = "0.1.0"
6376 - source = "registry+https://github.com/rust-lang/crates.io-index"
6377 - checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"
6378 - dependencies = [
6379 - "windows-link 0.1.3",
6380 - ]
6381 -
6382 - [[package]]
6383 - name = "windows-threading"
6384 6297 version = "0.2.1"
6385 6298 source = "registry+https://github.com/rust-lang/crates.io-index"
6386 6299 checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
6387 6300 dependencies = [
6388 - "windows-link 0.2.1",
6301 + "windows-link",
6389 6302 ]
6390 6303
6391 6304 [[package]]
M Cargo.toml +1 -1
@@ -48,4 +48,4 @@ rayon = "1.10"
48 48 libc = "0.2"
49 49 midir = "0.11"
50 50 tagtree = { path = "../../MNW/shared/tagtree" }
51 - theme-common = { path = "../../MNW/shared/theme-common" }
51 + makeover = "0.8.0"
@@ -25,7 +25,7 @@ serde = { workspace = true }
25 25 serde_json = { workspace = true }
26 26 rusqlite = { workspace = true }
27 27 tracing = { workspace = true }
28 - theme-common = { workspace = true }
28 + makeover = { workspace = true }
29 29 rayon = { workspace = true, optional = true }
30 30
31 31 [target.'cfg(unix)'.dependencies]
@@ -154,33 +154,33 @@ impl Default for ThemeColors {
154 154 }
155 155 }
156 156
157 - pub use theme_common::ThemeMeta;
157 + pub use makeover::ThemeMeta;
158 158
159 159 static THEME: LazyLock<RwLock<ThemeColors>> = LazyLock::new(|| RwLock::new(ThemeColors::default()));
160 160
161 161 // --- Derived color helpers ---
162 162 //
163 - // The color math lives once in `theme_common` (OKLab blends + WCAG contrast),
163 + // The color math lives once in `makeover` (OKLab blends + WCAG contrast),
164 164 // shared with GoingsOn / Balanced Breakfast / MNW. These thin wrappers adapt
165 165 // egui's `Color32` to that shared implementation; the derivation *choices*
166 166 // (which colors, what ratio) stay here as audiofiles' egui styling.
167 167
168 - fn to_rgb(c: Color32) -> theme_common::Rgb {
169 - theme_common::Rgb { r: c.r(), g: c.g(), b: c.b() }
168 + fn to_rgb(c: Color32) -> makeover::Rgb {
169 + makeover::Rgb { r: c.r(), g: c.g(), b: c.b() }
170 170 }
171 - fn from_rgb(c: theme_common::Rgb) -> Color32 {
171 + fn from_rgb(c: makeover::Rgb) -> Color32 {
172 172 Color32::from_rgb(c.r, c.g, c.b)
173 173 }
174 174
175 175 /// Pick white or black text for legibility on `bg`, by WCAG contrast ratio.
176 176 fn contrast_color(bg: Color32) -> Color32 {
177 - from_rgb(theme_common::readable_on(to_rgb(bg)))
177 + from_rgb(makeover::readable_on(to_rgb(bg)))
178 178 }
179 179
180 180 /// Perceptual (OKLab) blend from `a` to `b` by `t` in [0,1]. Used to derive row
181 181 /// stripes, selection highlights, and hover states from the base palette.
182 182 fn lerp_color(a: Color32, b: Color32, t: f32) -> Color32 {
183 - from_rgb(theme_common::mix(to_rgb(a), to_rgb(b), t))
183 + from_rgb(makeover::mix(to_rgb(a), to_rgb(b), t))
184 184 }
185 185
186 186 // --- Public accessors ---
@@ -349,7 +349,7 @@ pub fn list_themes() -> Vec<ThemeMeta> {
349 349 Err(_) => continue,
350 350 };
351 351 seen.insert(id.to_string());
352 - themes.push(theme_common::parse_meta(id, &table, false));
352 + themes.push(makeover::parse_meta(id, &table, false));
353 353 }
354 354
355 355 // Custom themes from config dir (override bundled by ID)
@@ -367,7 +367,7 @@ pub fn list_themes() -> Vec<ThemeMeta> {
367 367 Ok(t) => t,
368 368 Err(_) => continue,
369 369 };
370 - let meta = theme_common::parse_meta(&id, &table, true);
370 + let meta = makeover::parse_meta(&id, &table, true);
371 371 if seen.contains(&id) {
372 372 if let Some(existing) = themes.iter_mut().find(|t| t.id == id) {
373 373 existing.name = meta.name;
@@ -410,16 +410,16 @@ fn get_color(colors: &HashMap<String, String>, key: &str) -> Option<Color32> {
410 410 /// Parse TOML content string into `ThemeColors`.
411 411 ///
412 412 /// Colors come from the shared resolver: the theme is parsed and resolved into
413 - /// its intent tokens (`theme_common::resolve`), then each egui field reads the
413 + /// its intent tokens (`makeover::resolve`), then each egui field reads the
414 414 /// matching intent via `rgb()`. The accent fields use the categorical ramp so
415 415 /// all six remain distinct (category three == the action/primary color).
416 416 fn parse_theme(content: &str) -> Result<ThemeColors, toml::de::Error> {
417 417 let table: toml::Table = content.parse()?;
418 - let theme = theme_common::ThemeColors {
419 - meta: theme_common::parse_meta("theme", &table, false),
420 - colors: theme_common::extract_colors(&table),
418 + let theme = makeover::ThemeColors {
419 + meta: makeover::parse_meta("theme", &table, false),
420 + colors: makeover::extract_colors(&table),
421 421 };
422 - let t = theme_common::resolve(&theme);
422 + let t = makeover::resolve(&theme);
423 423 let c = |key: &str, default: Color32| {
424 424 t.rgb(key).map(|(r, g, b)| Color32::from_rgb(r, g, b)).unwrap_or(default)
425 425 };
@@ -537,7 +537,7 @@ pub fn theme_preview_colors(id: &str) -> Option<(Color32, Color32, Color32)> {
537 537 };
538 538
539 539 let table: toml::Table = content.parse().ok()?;
540 - let colors = theme_common::extract_colors(&table);
540 + let colors = makeover::extract_colors(&table);
541 541 let bg = get_color(&colors, "surface.page").unwrap_or(Color32::from_rgb(30, 30, 30));
542 542 let accent = get_color(&colors, "action.primary").unwrap_or(Color32::from_rgb(100, 100, 255));
543 543 let fg = get_color(&colors, "content.primary").unwrap_or(Color32::from_rgb(220, 220, 220));
@@ -1085,7 +1085,7 @@ overlay = "#16161e"
1085 1085 for (id, content) in BUNDLED_THEMES {
1086 1086 let table: toml::Table = content.parse()
1087 1087 .unwrap_or_else(|e| panic!("Bundled theme '{id}' is invalid TOML: {e}"));
1088 - let meta = theme_common::parse_meta(id, &table, false);
1088 + let meta = makeover::parse_meta(id, &table, false);
1089 1089 assert!(!meta.name.is_empty(), "Bundled theme '{id}' has empty name");
1090 1090 assert!(!meta.variant.is_empty(), "Bundled theme '{id}' has empty variant");
1091 1091 }