From 3f0dde272cc9543b4bd7a09d1ebe3836e3dea865 Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Fri, 22 Nov 2024 21:37:37 +0100 Subject: [PATCH] improves styles, fixed font loading --- Cargo.lock | 393 +++++++++++++++----------------- src/icons.rs | 46 +++- src/widgets/library/playlist.rs | 4 +- src/widgets/pages/liked.rs | 5 +- src/widgets/playback/bar.rs | 68 +++--- 5 files changed, 259 insertions(+), 257 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 04d391d..4de4135 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -253,7 +253,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -421,7 +421,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -461,7 +461,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -478,7 +478,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -498,7 +498,7 @@ dependencies = [ "manyhow", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -514,7 +514,7 @@ dependencies = [ "proc-macro2", "quote 1.0.37", "quote-use", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -630,7 +630,7 @@ dependencies = [ "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools 0.10.5", + "itertools 0.12.1", "lazy_static", "lazycell", "log", @@ -640,7 +640,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.87", + "syn 2.0.89", "which", ] @@ -653,29 +653,29 @@ dependencies = [ "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools 0.10.5", + "itertools 0.13.0", "proc-macro2", "quote 1.0.37", "regex", "rustc-hash", "shlex", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] name = "bit-set" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bit_field" @@ -758,9 +758,9 @@ checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ "bytemuck_derive", ] @@ -773,7 +773,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -968,7 +968,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1023,37 +1023,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" -[[package]] -name = "com" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" -dependencies = [ - "com_macros", -] - -[[package]] -name = "com_macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" -dependencies = [ - "com_macros_support", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "com_macros_support" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" -dependencies = [ - "proc-macro2", - "quote 1.0.37", - "syn 1.0.109", -] - [[package]] name = "combine" version = "4.6.7" @@ -1089,6 +1058,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -1102,7 +1081,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "core-graphics-types", "foreign-types 0.5.0", "libc", @@ -1115,7 +1094,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "libc", ] @@ -1187,9 +1166,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -1262,7 +1241,7 @@ checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" [[package]] name = "cushy" version = "0.4.0" -source = "git+https://github.com/khonsulabs/cushy.git?branch=main#477ce9bc45b71f0f7e8ddd53ef3e3800eaea15d1" +source = "git+https://github.com/khonsulabs/cushy.git?branch=main#57f0c06b12f51cd7ef133794119bf1ba163e88d8" dependencies = [ "ahash", "alot", @@ -1280,7 +1259,7 @@ dependencies = [ "parking_lot", "plotters", "png", - "pollster", + "pollster 0.4.0", "rfd", "tokio", "tracing", @@ -1292,25 +1271,14 @@ dependencies = [ [[package]] name = "cushy-macros" version = "0.4.0" -source = "git+https://github.com/khonsulabs/cushy.git?branch=main#477ce9bc45b71f0f7e8ddd53ef3e3800eaea15d1" +source = "git+https://github.com/khonsulabs/cushy.git?branch=main#57f0c06b12f51cd7ef133794119bf1ba163e88d8" dependencies = [ "attribute-derive", "manyhow", "proc-macro2", "quote 1.0.37", "quote-use", - "syn 2.0.87", -] - -[[package]] -name = "d3d12" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" -dependencies = [ - "bitflags 2.6.0", - "libloading", - "winapi", + "syn 2.0.89", ] [[package]] @@ -1367,7 +1335,7 @@ dependencies = [ "proc-macro2", "quote 1.0.37", "strsim 0.11.1", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1389,7 +1357,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1443,7 +1411,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1464,7 +1432,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1474,7 +1442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1543,7 +1511,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1629,7 +1597,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1650,7 +1618,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1753,9 +1721,9 @@ dependencies = [ [[package]] name = "figures" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cab407ec9ab5f649d809025b956687f756aad87fcea48d59fd56f47771c90d" +checksum = "6a38b0f3e26049548e95b41215c50fd22f77f7d07e2f498f513663fa4eb581f8" dependencies = [ "bytemuck", "euclid", @@ -1851,7 +1819,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1971,7 +1939,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -2078,9 +2046,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "glow" -version = "0.13.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" dependencies = [ "js-sys", "slotmap", @@ -2136,15 +2104,14 @@ dependencies = [ [[package]] name = "gpu-allocator" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ "log", "presser", "thiserror", - "winapi", - "windows 0.52.0", + "windows 0.58.0", ] [[package]] @@ -2188,9 +2155,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -2231,21 +2198,6 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" -[[package]] -name = "hassle-rs" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" -dependencies = [ - "bitflags 2.6.0", - "com", - "libc", - "libloading", - "thiserror", - "widestring", - "winapi", -] - [[package]] name = "headers" version = "0.4.0" @@ -2482,14 +2434,14 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.6", + "h2 0.4.7", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -2510,7 +2462,7 @@ dependencies = [ "futures-util", "headers", "http 1.1.0", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-rustls 0.26.0", "hyper-util", "pin-project-lite", @@ -2543,7 +2495,7 @@ checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-util", "log", "rustls 0.22.4", @@ -2562,11 +2514,11 @@ checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-util", "log", - "rustls 0.23.17", - "rustls-native-certs 0.8.0", + "rustls 0.23.18", + "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", @@ -2581,7 +2533,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-util", "native-tls", "tokio", @@ -2600,7 +2552,7 @@ dependencies = [ "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.5.0", + "hyper 1.5.1", "pin-project-lite", "socket2", "tokio", @@ -2746,7 +2698,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -2854,7 +2806,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -2894,10 +2846,19 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "1.0.11" +name = "itertools" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" [[package]] name = "jni" @@ -2977,7 +2938,7 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "kludgine" version = "0.11.0" -source = "git+https://github.com/khonsulabs/kludgine#c4be86b402a0eb911e2489292526f77b8dd0dfc0" +source = "git+https://github.com/khonsulabs/kludgine#1964cea13c1da08fb06d93c5101f3cd1f748c930" dependencies = [ "ahash", "alot", @@ -2993,7 +2954,7 @@ dependencies = [ "palette", "plotters", "plotters-backend", - "pollster", + "pollster 0.4.0", "raw-window-handle", "smallvec", "unicode-bidi", @@ -3083,7 +3044,7 @@ dependencies = [ "ctr", "futures-util", "http-body-util", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-util", "librespot-core", "log", @@ -3132,7 +3093,7 @@ dependencies = [ "http 1.1.0", "http-body-util", "httparse", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-proxy2", "hyper-rustls 0.27.3", "hyper-util", @@ -3331,7 +3292,7 @@ dependencies = [ "manyhow-macros", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -3362,7 +3323,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -3443,7 +3404,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -3501,9 +3462,9 @@ dependencies = [ [[package]] name = "naga" -version = "22.1.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" +checksum = "3d5941e45a15b53aad4375eedf02033adb7a28931eedc31117faffa52e6a857e" dependencies = [ "arrayvec", "bit-set", @@ -3532,7 +3493,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -3704,7 +3665,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -3766,7 +3727,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4071,7 +4032,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4147,7 +4108,7 @@ dependencies = [ "by_address", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4253,7 +4214,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4282,7 +4243,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4387,6 +4348,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + [[package]] name = "portable-atomic" version = "1.9.0" @@ -4421,7 +4388,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4457,9 +4424,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -4480,7 +4447,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" dependencies = [ "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4604,7 +4571,7 @@ dependencies = [ "proc-macro-utils", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4876,11 +4843,11 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.6", + "h2 0.4.7", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.0", + "hyper 1.5.1", "hyper-rustls 0.27.3", "hyper-tls", "hyper-util", @@ -4896,7 +4863,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "system-configuration 0.6.1", "tokio", "tokio-native-tls", @@ -4937,7 +4904,7 @@ dependencies = [ "objc2", "objc2-app-kit", "objc2-foundation", - "pollster", + "pollster 0.3.0", "raw-window-handle", "urlencoding", "wasm-bindgen", @@ -5075,9 +5042,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.40" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -5114,9 +5081,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.17" +version = "0.23.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f1a745511c54ba6d4465e8d5dfbd81b45791756de28d4981af70d6dca128f1e" +checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" dependencies = [ "aws-lc-rs", "log", @@ -5137,20 +5104,19 @@ dependencies = [ "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 2.11.1", ] [[package]] name = "rustls-native-certs" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 3.0.1", ] [[package]] @@ -5239,9 +5205,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -5288,7 +5254,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.10.0", "core-foundation-sys", "libc", "security-framework-sys", @@ -5327,7 +5306,7 @@ checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -5360,7 +5339,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -5665,7 +5644,7 @@ dependencies = [ "proc-macro2", "quote 1.0.37", "rustversion", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -5799,9 +5778,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.87" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote 1.0.37", @@ -5816,9 +5795,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -5840,7 +5819,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -5872,7 +5851,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys 0.5.0", ] @@ -5883,7 +5862,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys 0.6.0", ] @@ -5965,7 +5944,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -6107,7 +6086,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -6147,7 +6126,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.17", + "rustls 0.23.18", "rustls-pki-types", "tokio", ] @@ -6183,8 +6162,8 @@ checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" dependencies = [ "futures-util", "log", - "rustls 0.23.17", - "rustls-native-certs 0.8.0", + "rustls 0.23.18", + "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", @@ -6263,7 +6242,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -6342,7 +6321,7 @@ dependencies = [ "httparse", "log", "rand", - "rustls 0.23.17", + "rustls 0.23.18", "rustls-pki-types", "sha1", "thiserror", @@ -6386,9 +6365,9 @@ checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-linebreak" @@ -6610,7 +6589,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", "wasm-bindgen-shared", ] @@ -6644,7 +6623,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6808,9 +6787,9 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" -version = "22.1.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" +checksum = "76ab52f2d3d18b70d5ab8dd270a1cff3ebe6dbe4a7d13c1cc2557138a9777fdc" dependencies = [ "arrayvec", "cfg_aliases 0.1.1", @@ -6833,9 +6812,9 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "22.1.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" +checksum = "0e0c68e7b6322a03ee5b83fcd92caeac5c2a932f6457818179f4652ad2a9c065" dependencies = [ "arrayvec", "bit-vec", @@ -6858,9 +6837,9 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" +checksum = "de6e7266b869de56c7e3ed72a954899f71d14fec6cc81c102b7530b92947601b" dependencies = [ "android_system_properties", "arrayvec", @@ -6868,15 +6847,14 @@ dependencies = [ "bit-set", "bitflags 2.6.0", "block", + "bytemuck", "cfg_aliases 0.1.1", "core-graphics-types", - "d3d12", "glow", "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", - "hassle-rs", "js-sys", "khronos-egl", "libc", @@ -6898,14 +6876,15 @@ dependencies = [ "wasm-bindgen", "web-sys", "wgpu-types", - "winapi", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] name = "wgpu-types" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" +checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" dependencies = [ "bitflags 2.6.0", "js-sys", @@ -6924,12 +6903,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "widestring" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" - [[package]] name = "winapi" version = "0.3.9" @@ -6961,16 +6934,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" -dependencies = [ - "windows-core 0.52.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.54.0" @@ -7053,7 +7016,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -7064,7 +7027,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -7075,7 +7038,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -7086,7 +7049,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -7357,7 +7320,7 @@ dependencies = [ "calloop", "cfg_aliases 0.2.1", "concurrent-queue", - "core-foundation", + "core-foundation 0.9.4", "core-graphics", "cursor-icon", "dpi", @@ -7530,7 +7493,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", "synstructure", ] @@ -7579,7 +7542,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", "zbus_names", "zvariant", "zvariant_utils", @@ -7621,7 +7584,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -7641,7 +7604,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", "synstructure", ] @@ -7670,7 +7633,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -7722,7 +7685,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote 1.0.37", - "syn 2.0.87", + "syn 2.0.89", "zvariant_utils", ] @@ -7736,6 +7699,6 @@ dependencies = [ "quote 1.0.37", "serde", "static_assertions", - "syn 2.0.87", + "syn 2.0.89", "winnow", ] diff --git a/src/icons.rs b/src/icons.rs index a016e9f..fbf0cca 100644 --- a/src/icons.rs +++ b/src/icons.rs @@ -7,21 +7,17 @@ use cushy::{ DynamicComponent, FamilyOwned, FontFamilyList, Weight, }, widget::MakeWidget, + widgets::{button::ButtonKind, Button}, Cushy, }; static FONT: OnceLock = OnceLock::new(); -pub fn load_fonts(/*cushy: &Cushy*/) -> FontCollection { +pub fn load_fonts() -> FontCollection { let fonts = FontCollection::default(); - let font_data = include_bytes!("../fonts/MaterialIcons-Regular.ttf").to_vec(); - dbg!(font_data.len()); let font = fonts.push_unloadable( - // include_bytes!("../fonts/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf").into(), - font_data, + include_bytes!("../fonts/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf").into(), ); - // /home/dan/projects/despot/fonts/MaterialIcons-Regular.ttf - println!("loaded"); FONT.set(font).map_err(|_| ()).unwrap(); fonts } @@ -30,11 +26,8 @@ fn font_component() -> DynamicComponent { DynamicComponent::new({ move |context| { let font = &FONT.get().unwrap(); - // dbg!(font); let faces = context.loaded_font_faces(font); - dbg!(&faces); let face = faces.first()?; - dbg!(&face); Some(cushy::styles::Component::custom(FontFamilyList::from( vec![FamilyOwned::Name(face.families[0].0.clone())], ))) @@ -61,5 +54,38 @@ pub fn icon(str: &str) -> impl MakeWidget { .with_dynamic(&FontWeight, FONT_WEIGHT_COMPONENT.clone()) } +pub fn iconbtn(str: &str) -> Button { + icon(str).into_button().kind(ButtonKind::Transparent) +} + +pub trait IntoIcon { + fn into_icon(self) -> impl MakeWidget; + fn into_iconbtn(self) -> Button + where + Self: Sized, + { + self.into_icon().into_button().kind(ButtonKind::Transparent) + } +} + +impl IntoIcon for &str { + fn into_icon(self) -> impl MakeWidget { + icon(self) + } +} + +pub const PLAY: &str = "\u{e037}"; +pub const PAUSE: &str = "\u{e034}"; +pub const REPEAT: &str = "\u{e040}"; +pub const REPEAT_ON: &str = "\u{e9d6}"; +pub const REPEAT_ONE: &str = "\u{e041}"; +pub const REPEAT_ONE_ON: &str = "\u{e9d7}"; pub const SHUFFLE: &str = "\u{e043}"; +pub const SHUFFLE_ON: &str = "\u{e9e1}"; +pub const SKIP_NEXT: &str = "\u{e044}"; pub const SKIP_PREVIOUS: &str = "\u{e045}"; +pub const QUEUE_MUSIC: &str = "\u{e03d}"; +pub const EXPLICIT: &str = "\u{e01e}"; +pub const ALBUM: &str = "\u{e019}"; +pub const LYRICS: &str = "\u{ec0b}"; +pub const MUSIC_CAST: &str = "\u{eb1a}"; diff --git a/src/widgets/library/playlist.rs b/src/widgets/library/playlist.rs index b8a275b..9b3c41a 100644 --- a/src/widgets/library/playlist.rs +++ b/src/widgets/library/playlist.rs @@ -1,5 +1,5 @@ use cushy::figures::units::Lp; -use cushy::figures::Size; +use cushy::figures::{Size, Zero}; use cushy::kludgine::Color; use cushy::styles::{CornerRadii, Dimension, DimensionRange}; use cushy::widgets::image::ImageCornerRadius; @@ -56,6 +56,7 @@ pub fn playlists_widget( list }), ) + .gutter(Dimension::ZERO) .vertical_scroll() .size(Size { width: Dimension::Lp(Lp::points(200)).into(), @@ -97,7 +98,6 @@ where .on_click(callback) .with(&ButtonBackground, background) .with(&ButtonHoverBackground, background_hover) - .pad() } /// Returns `background` and `background_hover` colors for a library entry. diff --git a/src/widgets/pages/liked.rs b/src/widgets/pages/liked.rs index 112ca7b..893d52b 100644 --- a/src/widgets/pages/liked.rs +++ b/src/widgets/pages/liked.rs @@ -119,11 +119,11 @@ impl LikedSongsPage { let track = tracks.map_each(move |tracks| tracks.get(&index).cloned()); index .to_string() + .align_right() .size(Size { - width: Dimension::Lp(Lp::points(40)).into(), + width: Dimension::Lp(Lp::points(20)).into(), height: DimensionRange::default(), }) - .fit_horizontally() .and({ get_or_create_track_image(&track_images, index, |index| { Image::new_empty() @@ -213,6 +213,7 @@ impl LikedSongsPage { format_delta(track.track.duration) .into_label() .overflow(LabelOverflow::Clip) + .align_right() .make_widget() }) .unwrap_or(Space::primary().make_widget()) diff --git a/src/widgets/playback/bar.rs b/src/widgets/playback/bar.rs index f33359a..57f7412 100644 --- a/src/widgets/playback/bar.rs +++ b/src/widgets/playback/bar.rs @@ -5,13 +5,17 @@ use cushy::{ styles::{Dimension, DimensionRange}, value::{Dynamic, Source}, widget::MakeWidget, - widgets::{image::ImageCornerRadius, Button, Image, Label, Slider}, + widgets::{ + image::ImageCornerRadius, + label::{Displayable, LabelOverflow}, + Button, Image, Label, Slider, + }, }; use itertools::Itertools; use librespot_metadata::audio::UniqueFields; use crate::{ - icons::{icon, SKIP_PREVIOUS}, + icons::{icon, iconbtn, IntoIcon, PAUSE, PLAY, REPEAT, SHUFFLE, SKIP_NEXT, SKIP_PREVIOUS}, player::{DynamicPlayer, PlayerState}, widgets::image::ImageExt, }; @@ -32,7 +36,9 @@ fn meta(player: DynamicPlayer) -> impl MakeWidget { .flatten() })) .with(&ImageCornerRadius, Dimension::Lp(Lp::points(4))) - .size(Size::squared(Dimension::Lp(Lp::inches_f(1.)))) + .size(Size::squared(Dimension::Lp(Lp::inches_f(0.8)))) + .pad() + .align_left() .and( player .track @@ -43,23 +49,30 @@ fn meta(player: DynamicPlayer) -> impl MakeWidget { track .name .clone() - .and(match &track.unique_fields { - UniqueFields::Track { - artists, - album, - album_artists, - popularity, - number, - disc_number, - } => { - artists.iter().map(|artist| artist.name.clone()).join(", ") + .into_label() + .overflow(LabelOverflow::Clip) + .and( + match &track.unique_fields { + UniqueFields::Track { + artists, + album, + album_artists, + popularity, + number, + disc_number, + } => artists + .iter() + .map(|artist| artist.name.clone()) + .join(", "), + UniqueFields::Episode { + description, + publish_time, + show_name, + } => show_name.clone(), } - UniqueFields::Episode { - description, - publish_time, - show_name, - } => show_name.clone(), - }) + .into_label() + .overflow(LabelOverflow::Clip), + ) .into_rows() .make_widget() }) @@ -78,20 +91,19 @@ fn meta(player: DynamicPlayer) -> impl MakeWidget { } fn controls(player: DynamicPlayer) -> impl MakeWidget { - icon("shuffle") - .into_button() - .and(icon(SKIP_PREVIOUS).into_button()) + iconbtn(SHUFFLE) + .and(iconbtn(SKIP_PREVIOUS)) .and(player.state.map_each({ let player = player.clone(); move |state| { let player = player.clone(); let state = state.clone(); match &state { - PlayerState::Playing => "pause", - PlayerState::Paused { .. } => "play", - _ => "play", + PlayerState::Playing => PAUSE, + PlayerState::Paused { .. } => PLAY, + _ => PLAY, } - .into_button() + .into_iconbtn() .on_click(move |_| match state { PlayerState::Playing => { player.player.pause(); @@ -103,8 +115,8 @@ fn controls(player: DynamicPlayer) -> impl MakeWidget { .make_widget() } })) - .and("skip".into_button()) - .and("repeat".into_button()) + .and(iconbtn(SKIP_NEXT)) + .and(iconbtn(REPEAT)) .into_columns() .centered() .and(time(player))