diff --git a/CHANGELOG.md b/CHANGELOG.md index 97bec68f..9caf2240 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ All Sniffnet releases with the relative changes are documented in this file. - Settings "Language" tab has been removed. Language selection and other options are now included in a new settings tab "General" ([#365](https://github.com/GyulyVGC/sniffnet/pull/365)) - Updated Portuguese translation to v1.2 ([#398](https://github.com/GyulyVGC/sniffnet/pull/398)) - Cleaned code implementing the concept of first class theming ([#339](https://github.com/GyulyVGC/sniffnet/pull/339)) +- Migrate to Iced 0.12 ([#470](https://github.com/GyulyVGC/sniffnet/pull/470)) - Added documentation about Sniffnet installation on Nix and Tiny Core Linux (respectively [#394](https://github.com/GyulyVGC/sniffnet/pull/394) and [#341](https://github.com/GyulyVGC/sniffnet/pull/341)) - General aesthetic improvements - Fixed bug about not delivered favorite notifications in presence of old outgoing connections diff --git a/Cargo.lock b/Cargo.lock index 80e4dd1e..4692d96b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,11 +35,12 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -68,14 +69,13 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "alsa" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2562ad8dcf0f789f65c6fdaad8a8a9708ed6b488e649da28c01656ad66b8b47" +checksum = "37fe60779335388a88c01ac6c3be40304d1e349de3ada3b15f7808bb90fa9dce" dependencies = [ "alsa-sys", - "bitflags 1.3.2", + "bitflags 2.4.2", "libc", - "nix 0.24.3", ] [[package]] @@ -90,20 +90,23 @@ dependencies = [ [[package]] name = "android-activity" -version = "0.4.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" dependencies = [ "android-properties", - "bitflags 1.3.2", + "bitflags 2.4.2", "cc", + "cesu8", + "jni", "jni-sys", "libc", "log", "ndk", "ndk-context", "ndk-sys", - "num_enum 0.6.1", + "num_enum", + "thiserror", ] [[package]] @@ -148,6 +151,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + [[package]] name = "ash" version = "0.37.3+1.3.251" @@ -158,17 +167,193 @@ dependencies = [ ] [[package]] -name = "atk-sys" -version = "0.18.0" +name = "ashpd" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" +checksum = "1b22517ee647547c01a687cf9b76074e1c91334032a4324f7243c6ee0f949390" dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", + "async-fs", + "async-net", + "enumflags2", + "futures-channel", + "futures-util", + "rand", + "serde", + "serde_repr", + "url", + "zbus", ] +[[package]] +name = "async-broadcast" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" +dependencies = [ + "event-listener 5.2.0", + "event-listener-strategy 0.5.0", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +dependencies = [ + "concurrent-queue", + "event-listener 5.2.0", + "event-listener-strategy 0.5.0", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +dependencies = [ + "async-lock 3.3.0", + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc19683171f287921f2405677dd2ed2549c3b3bda697a563ebc3a121ace2aba1" +dependencies = [ + "async-lock 3.3.0", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" +dependencies = [ + "async-lock 3.3.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +dependencies = [ + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", + "pin-project-lite", +] + +[[package]] +name = "async-net" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" +dependencies = [ + "async-io", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-process" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451e3cf68011bd56771c79db04a9e333095ab6349f7e47592b788e9b98720cc8" +dependencies = [ + "async-channel", + "async-io", + "async-lock 3.3.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 5.2.0", + "futures-lite", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-recursion" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-task" +version = "4.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" + +[[package]] +name = "async-trait" +version = "0.1.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.1.0" @@ -213,7 +398,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -249,30 +434,55 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "block-sys" -version = "0.1.0-beta.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" dependencies = [ "objc-sys", ] [[package]] name = "block2" -version = "0.2.0-alpha.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" dependencies = [ "block-sys", - "objc2-encode", + "objc2", +] + +[[package]] +name = "blocking" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +dependencies = [ + "async-channel", + "async-lock 3.3.0", + "async-task", + "fastrand", + "futures-io", + "futures-lite", + "piper", + "tracing", ] [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" [[package]] name = "bytemuck" @@ -291,7 +501,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -300,30 +510,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -[[package]] -name = "cairo-sys-rs" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" -dependencies = [ - "libc", - "system-deps", -] - -[[package]] -name = "calloop" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" -dependencies = [ - "bitflags 1.3.2", - "log", - "nix 0.25.1", - "slotmap", - "thiserror", - "vec_map", -] - [[package]] name = "calloop" version = "0.12.4" @@ -344,17 +530,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ - "calloop 0.12.4", + "calloop", "rustix", - "wayland-backend 0.3.3", - "wayland-client 0.31.2", + "wayland-backend", + "wayland-client", ] [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ "jobserver", "libc", @@ -375,16 +561,6 @@ dependencies = [ "nom", ] -[[package]] -name = "cfg-expr" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" -dependencies = [ - "smallvec", - "target-lexicon", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -397,16 +573,22 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" + [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -417,18 +599,16 @@ checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", - "libloading 0.8.1", + "libloading 0.8.3", ] [[package]] name = "clipboard-win" -version = "4.5.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +checksum = "12f9a0700e0127ba15d1d52dd742097f821cd9c65939303a44d970465040a297" dependencies = [ "error-code", - "str-buf", - "winapi", ] [[package]] @@ -444,35 +624,35 @@ dependencies = [ [[package]] name = "clipboard_wayland" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8134163bd07c47ae3cc29babc42c255fdb315facc790950ae2d0e561ea6f2ec0" +checksum = "003f886bc4e2987729d10c1db3424e7f80809f3fc22dbc16c685738887cb37b8" dependencies = [ "smithay-clipboard", ] [[package]] name = "clipboard_x11" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cf45b436634fee64c6d3981639b46a87eeea3c64e422643273fcefd1baef56c" +checksum = "4274ea815e013e0f9f04a2633423e14194e408a0576c943ce3d14ca56c50031c" dependencies = [ "thiserror", - "x11rb 0.13.0", + "x11rb", ] [[package]] name = "cocoa" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" dependencies = [ "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", "core-graphics", - "foreign-types", + "foreign-types 0.5.0", "libc", "objc", ] @@ -508,10 +688,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] -name = "com-rs" -version = "0.2.1" +name = "com" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" +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", + "syn 1.0.109", +] [[package]] name = "combine" @@ -534,9 +739,9 @@ dependencies = [ [[package]] name = "confy" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d296c475c6ed4093824c28e222420831d27577aaaf0a1163a3b7fc35b248a5" +checksum = "45b1f4c00870f07dc34adcac82bb6a72cc5aabca8536ba1797e01df51d2ce9a0" dependencies = [ "directories", "serde", @@ -562,14 +767,14 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -606,16 +811,17 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0b68966c2543609f8d92f9d33ac3b719b2a67529b0c6c0b3e025637b477eef9" +checksum = "75acbfb314aeb4f5210d379af45ed1ec2c98c7f1790bf57b8a4c562ac0c51b71" dependencies = [ - "aliasable", "fontdb", "libm", "log", "rangemap", - "rustybuzz 0.8.0", + "rustc-hash", + "rustybuzz 0.11.0", + "self_cell", "swash", "sys-locale", "unicode-bidi", @@ -626,34 +832,41 @@ dependencies = [ [[package]] name = "cpal" -version = "0.15.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d959d90e938c5493000514b446987c07aed46c668faaa7d34d6c7a67b1a578c" +checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779" dependencies = [ "alsa", "core-foundation-sys", "coreaudio-rs", "dasp_sample", - "jni 0.19.0", + "jni", "js-sys", "libc", "mach2", "ndk", "ndk-context", "oboe", - "once_cell", - "parking_lot 0.12.1", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.46.0", + "windows 0.54.0", +] + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", ] [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -670,6 +883,26 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ctor" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" +dependencies = [ + "quote", + "syn 2.0.52", +] + [[package]] name = "ctrlc" version = "3.4.2" @@ -688,12 +921,12 @@ checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" [[package]] name = "d3d12" -version = "0.6.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f0de2f5a8e7bd4a9eec0e3c781992a4ce1724f68aec7d7a3715344de8b39da" +checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307" dependencies = [ - "bitflags 1.3.2", - "libloading 0.7.4", + "bitflags 2.4.2", + "libloading 0.8.3", "winapi", ] @@ -704,7 +937,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.3", + "hashbrown", "lock_api", "once_cell", "parking_lot_core 0.9.9", @@ -718,9 +951,30 @@ checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" [[package]] name = "data-url" -version = "0.2.0" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" + +[[package]] +name = "derivative" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d7439c3735f405729d52c3fbbe4de140eaf938a1fe47d227c27f8254d4302a5" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] [[package]] name = "directories" @@ -755,7 +1009,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.1", + "libloading 0.8.3", ] [[package]] @@ -782,6 +1036,45 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "drm" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" +dependencies = [ + "bitflags 2.4.2", + "bytemuck", + "drm-ffi", + "drm-fourcc", + "rustix", +] + +[[package]] +name = "drm-ffi" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" +dependencies = [ + "drm-sys", + "rustix", +] + +[[package]] +name = "drm-fourcc" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" + +[[package]] +name = "drm-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d09ff881f92f118b11105ba5e34ff8f4adf27b30dae8f12e28c193af1c83176" +dependencies = [ + "libc", + "linux-raw-sys 0.6.4", +] + [[package]] name = "either" version = "1.10.0" @@ -797,6 +1090,33 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + +[[package]] +name = "enumflags2" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -836,13 +1156,9 @@ dependencies = [ [[package]] name = "error-code" -version = "2.3.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" -dependencies = [ - "libc", - "str-buf", -] +checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" [[package]] name = "etagere" @@ -873,20 +1189,59 @@ dependencies = [ ] [[package]] -name = "fast-srgb8" -version = "1.0.0" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] -name = "fastrand" -version = "1.9.0" +name = "event-listener" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ - "instant", + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", ] +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +dependencies = [ + "event-listener 5.2.0", + "pin-project-lite", +] + +[[package]] +name = "fast-srgb8" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" + [[package]] name = "fastrand" version = "2.0.1" @@ -953,13 +1308,13 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8d8cbea8f21307d7e84bca254772981296f058a1d36b461bf4d83a7499fc9e" +checksum = "020e203f177c0fb250fb19455a252e838d2bbbce1f80f25ecc42402aafa8cd38" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.6.2", + "memmap2 0.8.0", "slotmap", "tinyvec", "ttf-parser 0.19.2", @@ -971,7 +1326,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", ] [[package]] @@ -980,6 +1356,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1038,6 +1420,19 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +[[package]] +name = "futures-lite" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.30" @@ -1046,7 +1441,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -1063,9 +1458,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" @@ -1081,48 +1476,18 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "gdk-pixbuf-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "gdk-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "pkg-config", - "system-deps", + "pin-utils", + "slab", ] [[package]] -name = "gethostname" -version = "0.2.3" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "libc", - "winapi", + "typenum", + "version_check", ] [[package]] @@ -1163,33 +1528,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] -name = "gio-sys" -version = "0.18.1" +name = "gl_generator" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", - "winapi", + "khronos_api", + "log", + "xml-rs", ] [[package]] name = "glam" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" - -[[package]] -name = "glib-sys" -version = "0.18.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" -dependencies = [ - "libc", - "system-deps", -] +checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" [[package]] name = "glob" @@ -1199,9 +1552,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "glow" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" dependencies = [ "js-sys", "slotmap", @@ -1210,58 +1563,56 @@ dependencies = [ ] [[package]] -name = "glyphon" -version = "0.3.0" +name = "glutin_wgl_sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e87caa7459145f5e5f167bf34db4532901404c679e62339fb712a0e3ccf722a" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" dependencies = [ - "cosmic-text", - "etagere", - "lru", - "wgpu", + "gl_generator", ] [[package]] -name = "gobject-sys" -version = "0.18.0" +name = "glyphon" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +checksum = "6a62d0338e4056db6a73221c2fb2e30619452f6ea9651bac4110f51b0f7a7581" dependencies = [ - "glib-sys", - "libc", - "system-deps", + "cosmic-text", + "etagere", + "lru", + "wgpu", ] [[package]] name = "gpu-alloc" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22beaafc29b38204457ea030f6fb7a84c9e4dd1b86e311ba0542533453d87f62" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "gpu-alloc-types", ] [[package]] name = "gpu-alloc-types" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", ] [[package]] name = "gpu-allocator" -version = "0.22.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" dependencies = [ - "backtrace", "log", + "presser", "thiserror", "winapi", - "windows 0.44.0", + "windows 0.52.0", ] [[package]] @@ -1272,7 +1623,7 @@ checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ "bitflags 2.4.2", "gpu-descriptor-types", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -1284,24 +1635,6 @@ dependencies = [ "bitflags 2.4.2", ] -[[package]] -name = "gtk-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" -dependencies = [ - "atk-sys", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "system-deps", -] - [[package]] name = "guillotiere" version = "0.6.2" @@ -1324,7 +1657,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.2", + "indexmap", "slab", "tokio", "tokio-util", @@ -1333,20 +1666,14 @@ dependencies = [ [[package]] name = "half" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" dependencies = [ "cfg-if", "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.14.3" @@ -1359,14 +1686,14 @@ dependencies = [ [[package]] name = "hassle-rs" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 1.3.2", - "com-rs", + "bitflags 2.4.2", + "com", "libc", - "libloading 0.7.4", + "libloading 0.8.3", "thiserror", "widestring", "winapi", @@ -1380,9 +1707,15 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hexf-parse" @@ -1392,9 +1725,9 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -1486,7 +1819,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -1500,9 +1833,9 @@ dependencies = [ [[package]] name = "iced" -version = "0.10.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c708807ec86f99dd729dc4d42db5239acf118cec14d3c5f57679dcfdbbc472b1" +checksum = "7d4eb0fbbefb8c428b70680e77ed9013887b17c1d6be366b40f264f956d1a096" dependencies = [ "iced_core", "iced_futures", @@ -1514,23 +1847,27 @@ dependencies = [ [[package]] name = "iced_core" -version = "0.10.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d0bc4fbf018576d08d93f838e6058cc6f10bbc05e04ae249a2a44dffb4ebc8" +checksum = "7d7e6bbd197f311ed3d8b71651876b0ce01318fde52cda862a9a7a4373c9b930" dependencies = [ - "bitflags 1.3.2", - "instant", + "bitflags 2.4.2", + "glam", "log", + "num-traits", "palette", + "raw-window-handle", + "smol_str", "thiserror", - "twox-hash", + "web-time", + "xxhash-rust", ] [[package]] name = "iced_futures" -version = "0.7.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14dab0054a9c7a1cbce227a8cd9ee4a094497b3d06094551ac6c1488d563802e" +checksum = "370bad88fb3832cbeeb3fa6c486b4701fb7e8da32a753b3101d4ce81fc1d9497" dependencies = [ "futures", "iced_core", @@ -1542,51 +1879,56 @@ dependencies = [ [[package]] name = "iced_graphics" -version = "0.9.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ff14447a221e9e9205a13d84d7bbdf0636a3b1daa02cfca690ed09689c4d2b" +checksum = "6a044c193ef0840eacabfa05424717331d1fc5b3ecb9a89316200c75da2ba9a4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "bytemuck", - "glam", + "cosmic-text", "half", "iced_core", + "iced_futures", "log", "lyon_path", + "once_cell", "raw-window-handle", + "rustc-hash", "thiserror", + "unicode-segmentation", + "xxhash-rust", ] [[package]] name = "iced_renderer" -version = "0.1.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1033385b0db0099a0d13178c9ff93c1ce11e7d0177522acf578bf79febdb2af8" +checksum = "5c281e03001d566058f53dec9325bbe61c62da715341206d2627f57a3ecc7f69" dependencies = [ "iced_graphics", "iced_tiny_skia", "iced_wgpu", "log", - "raw-window-handle", "thiserror", ] [[package]] name = "iced_runtime" -version = "0.1.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c6c89853e1250c6fac82c5015fa2144517be9b33d4b8e456f10e198b23e28bd" +checksum = "a79f852c01cc6d61663c94379cb3974ac3ad315a28c504e847d573e094f46822" dependencies = [ "iced_core", "iced_futures", + "raw-window-handle", "thiserror", ] [[package]] name = "iced_style" -version = "0.9.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85c47d9d13e2281f75ddf98c865daf2101632bd2b855c401dd0b1c8b81a31a0" +checksum = "2ea42a740915d2a5a9ff9c3aa0bca28b16e9fb660bc8f675eed71d186cadb579" dependencies = [ "iced_core", "once_cell", @@ -1595,30 +1937,29 @@ dependencies = [ [[package]] name = "iced_tiny_skia" -version = "0.1.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7715f6222c9470bbbd75a39f70478fa0d1bdfb81a377a34fd1b090ffccc480b" +checksum = "8c2228781f4d381a1cbbd7905a9f077351aa8d37269094021d5d9e779f130aff" dependencies = [ "bytemuck", "cosmic-text", "iced_graphics", - "kurbo", + "kurbo 0.10.4", "log", - "raw-window-handle", "resvg", "rustc-hash", "softbuffer", - "tiny-skia 0.10.0", - "twox-hash", + "tiny-skia", + "xxhash-rust", ] [[package]] name = "iced_wgpu" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f7c5de46b997ed7b18e05ec67059dcdf3beeac51e917c21071b021bb848b9" +checksum = "e3c243b6700452886aac1ee1987e84d9fb43b56b53fea9a1eb67713fd0fde244" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "bytemuck", "futures", "glam", @@ -1628,18 +1969,15 @@ dependencies = [ "log", "lyon", "once_cell", - "raw-window-handle", "resvg", - "rustc-hash", - "twox-hash", "wgpu", ] [[package]] name = "iced_widget" -version = "0.1.3" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a177219ae51c3ba08f228ab932354b360cc669e94aec50c01e7c9b675f074c7c" +checksum = "7e01b2212adecf1cb80e2267f302c0e0c263e55f97812056949199ccf9f0b908" dependencies = [ "iced_renderer", "iced_runtime", @@ -1652,22 +1990,33 @@ dependencies = [ [[package]] name = "iced_winit" -version = "0.10.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0c884bcb14722a57192b40a5ef6b5e170fa2f01fe2ff28d6cdd9efe37acf70" +checksum = "63f66831d0e399b93f631739121a6171780d344b275d56808b9504d8ca75c7d2" dependencies = [ "iced_graphics", "iced_runtime", "iced_style", "log", - "raw-window-handle", "thiserror", + "tracing", "web-sys", "winapi", "window_clipboard", "winit", ] +[[package]] +name = "icrate" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +dependencies = [ + "block2", + "dispatch", + "objc2", +] + [[package]] name = "idna" version = "0.5.0" @@ -1686,22 +2035,12 @@ checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.2.2" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -1711,20 +2050,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", ] [[package]] @@ -1768,30 +2093,18 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jni" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" -dependencies = [ - "cesu8", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", -] - -[[package]] -name = "jni" -version = "0.20.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", + "cfg-if", "combine", "jni-sys", "log", "thiserror", "walkdir", + "windows-sys 0.45.0", ] [[package]] @@ -1817,24 +2130,30 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "khronos-egl" -version = "4.1.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading 0.7.4", + "libloading 0.8.3", "pkg-config", ] +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "kurbo" version = "0.9.5" @@ -1844,6 +2163,16 @@ dependencies = [ "arrayvec", ] +[[package]] +name = "kurbo" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" +dependencies = [ + "arrayvec", + "smallvec", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -1884,12 +2213,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.4", ] [[package]] @@ -1926,6 +2255,12 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +[[package]] +name = "linux-raw-sys" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0b5399f6804fbab912acbd8878ed3532d506b7c951b8f9f164ef90fef39e3f4" + [[package]] name = "lock_api" version = "0.4.11" @@ -1938,17 +2273,17 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" -version = "0.11.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -2041,18 +2376,9 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memmap2" -version = "0.6.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" +checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" dependencies = [ "libc", ] @@ -2068,34 +2394,26 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] [[package]] name = "metal" -version = "0.24.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" +checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "block", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "log", "objc", + "paste", ] [[package]] @@ -2122,27 +2440,26 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "log", "wasi", "windows-sys 0.48.0", ] [[package]] name = "naga" -version = "0.12.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbcc2e0513220fd2b598e6068608d4462db20322c0e77e47f6f488dfcfc279cb" +checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843" dependencies = [ "bit-set", - "bitflags 1.3.2", + "bitflags 2.4.2", "codespan-reporting", "hexf-parse", - "indexmap 1.9.3", + "indexmap", "log", "num-traits", "rustc-hash", @@ -2172,14 +2489,15 @@ dependencies = [ [[package]] name = "ndk" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "jni-sys", + "log", "ndk-sys", - "num_enum 0.5.11", + "num_enum", "raw-window-handle", "thiserror", ] @@ -2192,60 +2510,35 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.4.1+23.1.7779620" +version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ "jni-sys", ] [[package]] name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.6.5", -] - -[[package]] -name = "nix" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.6.5", -] - -[[package]] -name = "nix" -version = "0.26.4" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "cfg-if", "libc", - "memoffset 0.7.1", - "pin-utils", ] [[package]] name = "nix" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags 2.4.2", "cfg-if", + "cfg_aliases 0.1.1", "libc", + "memoffset", ] [[package]] @@ -2260,13 +2553,13 @@ dependencies = [ [[package]] name = "num-derive" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.52", ] [[package]] @@ -2290,45 +2583,24 @@ dependencies = [ ] [[package]] -name = "num_enum" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" -dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.11" +name = "num_enum" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", + "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -2354,29 +2626,25 @@ dependencies = [ [[package]] name = "objc-sys" -version = "0.2.0-beta.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" +checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" [[package]] name = "objc2" -version = "0.3.0-beta.3.patch-leaks.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" dependencies = [ - "block2", "objc-sys", "objc2-encode", ] [[package]] name = "objc2-encode" -version = "2.0.0-pre.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" -dependencies = [ - "objc-sys", -] +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" [[package]] name = "objc_exception" @@ -2407,11 +2675,11 @@ dependencies = [ [[package]] name = "oboe" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8868cc237ee02e2d9618539a23a8d228b9bb3fc2e7a5b11eed3831de77c395d0" +checksum = "e8b61bebd49e5d43f5f8cc7ee2891c16e0f41ec7954d36bcb6c14c5e0de867fb" dependencies = [ - "jni 0.20.0", + "jni", "ndk", "ndk-context", "num-derive", @@ -2421,9 +2689,9 @@ dependencies = [ [[package]] name = "oboe-sys" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f44155e7fb718d3cfddcf70690b2b51ac4412f347cd9e4fbe511abe9cd7b5f2" +checksum = "6c8bb09a4a2b1d668170cfe0a7d5bc103f8999fb316c98099b6a9939c9f2e79d" dependencies = [ "cc", ] @@ -2436,13 +2704,13 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.63" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ "bitflags 2.4.2", "cfg-if", - "foreign-types", + "foreign-types 0.3.2", "libc", "once_cell", "openssl-macros", @@ -2457,7 +2725,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -2468,9 +2736,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.99" +version = "0.9.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", @@ -2493,11 +2761,21 @@ dependencies = [ "libredox 0.0.2", ] +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "ouroboros" -version = "0.17.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ba07320d39dfea882faa70554b4bd342a5f273ed59ba7c1c6b4c840492c954" +checksum = "97b7be5a8a3462b752f4be3ff2b2bf2f7f1d00834902e46be2a4d68b87b0573c" dependencies = [ "aliasable", "ouroboros_macro", @@ -2506,15 +2784,16 @@ dependencies = [ [[package]] name = "ouroboros_macro" -version = "0.17.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4c6225c69b4ca778c0aea097321a64c421cf4577b331c61b229267edabb6f8" +checksum = "b645dcde5f119c2c454a92d0dfa271a2a3b205da92e4292a68ead4bdbfde1f33" dependencies = [ "heck", - "proc-macro-error", + "itertools 0.12.1", "proc-macro2", + "proc-macro2-diagnostics", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -2528,9 +2807,9 @@ dependencies = [ [[package]] name = "palette" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d38e6e5ca1612e2081cc31188f08c3cba630ce4ba44709a153f1a0f38d678f2" +checksum = "ebfc23a4b76642983d57e4ad00bb4504eb30a8ce3c70f4aee1f725610e36d97a" dependencies = [ "approx", "fast-srgb8", @@ -2540,26 +2819,20 @@ dependencies = [ [[package]] name = "palette_derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05d1c929301fee6830dafa764341118829b2535c216b0571e3821ecac5c885b" +checksum = "e8890702dbec0bad9116041ae586f84805b13eecd1d8b1df27c29998a9969d6d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] -name = "pango-sys" -version = "0.18.0" +name = "parking" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -2609,6 +2882,12 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + [[package]] name = "pcap" version = "1.2.0" @@ -2670,7 +2949,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -2700,11 +2979,22 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plotters" @@ -2726,9 +3016,9 @@ checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" [[package]] name = "plotters-iced" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b533be9c5ba7d80b7fd619fd5226c58bcae53db2c24b447fa82be25865c117e6" +checksum = "c5e45cd10abd572d7d0dce11446a915c8b54442480d2a46e71dcb9dd43d93b4c" dependencies = [ "iced_graphics", "iced_widget", @@ -2739,9 +3029,9 @@ dependencies = [ [[package]] name = "png" -version = "0.17.11" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f6c3c3e617595665b8ea2ff95a86066be38fb121ff920a9c0eb282abcd1da5a" +checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -2752,9 +3042,9 @@ dependencies = [ [[package]] name = "polling" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14" +checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" dependencies = [ "cfg-if", "concurrent-queue", @@ -2765,43 +3055,30 @@ dependencies = [ ] [[package]] -name = "ppv-lite86" -version = "0.2.17" +name = "pollster" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" [[package]] -name = "proc-macro-crate" -version = "1.3.1" +name = "ppv-lite86" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "presser" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-crate" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit 0.21.1", ] [[package]] @@ -2814,19 +3091,23 @@ dependencies = [ ] [[package]] -name = "profiling" -version = "1.0.14" +name = "proc-macro2-diagnostics" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0f7f43585c34e4fdd7497d746bc32e14458cf11c69341cc0587b1d825dde42" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", + "version_check", + "yansi", +] [[package]] -name = "quick-xml" -version = "0.28.2" +name = "profiling" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" -dependencies = [ - "memchr", -] +checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" [[package]] name = "quick-xml" @@ -2884,15 +3165,15 @@ checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" [[package]] name = "rangemap" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795915a3930a5d6bafd9053d37602fea3e61be2e5d4d788983a8ba9654c1c6f2" +checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684" [[package]] name = "raw-window-handle" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" [[package]] name = "rctree" @@ -2902,9 +3183,9 @@ checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" [[package]] name = "read-fonts" -version = "0.15.4" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d70252c718fb23d41771a4f927e924700edefc2a91ecd52a2ee6f2461d4e6b64" +checksum = "17ea23eedb4d938031b6d4343222444608727a6aa68ec355e13588d9947ffe92" dependencies = [ "font-types", ] @@ -2961,9 +3242,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -2984,9 +3265,9 @@ checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" [[package]] name = "renderdoc-sys" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" [[package]] name = "reqwest" @@ -3034,9 +3315,9 @@ dependencies = [ [[package]] name = "resvg" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6554f47c38eca56827eea7f285c2a3018b4e12e0e195cc105833c008be338f1" +checksum = "cc7980f653f9a7db31acff916a262c3b78c562919263edea29bf41a056e20497" dependencies = [ "gif", "jpeg-decoder", @@ -3045,27 +3326,27 @@ dependencies = [ "png", "rgb", "svgtypes", - "tiny-skia 0.10.0", + "tiny-skia", "usvg", ] [[package]] name = "rfd" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d8ab342bcc5436e04d3a4c1e09e17d74958bfaddf8d5fad6f85607df0f994f" +checksum = "373d2fc6310e2d14943d4e66ebed5b774a2b6b3b1610e7377edf124fb2760d6b" dependencies = [ + "ashpd", "block", "dispatch", - "glib-sys", - "gobject-sys", - "gtk-sys", "js-sys", "log", "objc", "objc-foundation", "objc_id", + "pollster", "raw-window-handle", + "urlencoding", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3083,16 +3364,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3145,7 +3427,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.48", + "syn 2.0.52", "unicode-ident", ] @@ -3179,7 +3461,7 @@ dependencies = [ "bitflags 2.4.2", "errno 0.3.8", "libc", - "linux-raw-sys", + "linux-raw-sys 0.4.13", "windows-sys 0.52.0", ] @@ -3232,42 +3514,42 @@ dependencies = [ [[package]] name = "rustybuzz" -version = "0.7.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162bdf42e261bee271b3957691018634488084ef577dddeb6420a9684cab2a6a" +checksum = "71cd15fef9112a1f94ac64b58d1e4628192631ad6af4dc69997f995459c874e7" dependencies = [ "bitflags 1.3.2", "bytemuck", "smallvec", - "ttf-parser 0.18.1", + "ttf-parser 0.19.2", "unicode-bidi-mirroring", "unicode-ccc", - "unicode-general-category", + "unicode-properties", "unicode-script", ] [[package]] name = "rustybuzz" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82eea22c8f56965eeaf3a209b3d24508256c7b920fb3b6211b8ba0f7c0583250" +checksum = "2ee8fe2a8461a0854a37101fe7a1b13998d0cfa987e43248e81d2a5f4570f6fa" dependencies = [ "bitflags 1.3.2", "bytemuck", "libm", "smallvec", - "ttf-parser 0.19.2", + "ttf-parser 0.20.0", "unicode-bidi-mirroring", "unicode-ccc", - "unicode-general-category", + "unicode-properties", "unicode-script", ] [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "same-file" @@ -3311,15 +3593,15 @@ dependencies = [ [[package]] name = "sctk-adwaita" -version = "0.5.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550" dependencies = [ "ab_glyph", "log", - "memmap2 0.5.10", - "smithay-client-toolkit 0.16.1", - "tiny-skia 0.8.4", + "memmap2 0.9.4", + "smithay-client-toolkit", + "tiny-skia", ] [[package]] @@ -3345,43 +3627,60 @@ dependencies = [ "libc", ] +[[package]] +name = "self_cell" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba" + [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "serde_spanned" version = "0.6.5" @@ -3432,7 +3731,18 @@ checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", ] [[package]] @@ -3441,6 +3751,15 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + [[package]] name = "simd-adler32" version = "0.3.7" @@ -3486,25 +3805,6 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" -[[package]] -name = "smithay-client-toolkit" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" -dependencies = [ - "bitflags 1.3.2", - "calloop 0.10.6", - "dlib", - "lazy_static", - "log", - "memmap2 0.5.10", - "nix 0.24.3", - "pkg-config", - "wayland-client 0.29.5", - "wayland-cursor 0.29.5", - "wayland-protocols 0.29.5", -] - [[package]] name = "smithay-client-toolkit" version = "0.18.1" @@ -3512,7 +3812,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ "bitflags 2.4.2", - "calloop 0.12.4", + "calloop", "calloop-wayland-source", "cursor-icon", "libc", @@ -3520,25 +3820,34 @@ dependencies = [ "memmap2 0.9.4", "rustix", "thiserror", - "wayland-backend 0.3.3", - "wayland-client 0.31.2", + "wayland-backend", + "wayland-client", "wayland-csd-frame", - "wayland-cursor 0.31.1", - "wayland-protocols 0.31.2", + "wayland-cursor", + "wayland-protocols", "wayland-protocols-wlr", - "wayland-scanner 0.31.1", + "wayland-scanner", "xkeysym", ] [[package]] name = "smithay-clipboard" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb62b280ce5a5cba847669933a0948d00904cf83845c944eae96a4738cea1a6" +checksum = "c091e7354ea8059d6ad99eace06dd13ddeedbb0ac72d40a9a6e7ff790525882d" dependencies = [ "libc", - "smithay-client-toolkit 0.18.1", - "wayland-backend 0.3.3", + "smithay-client-toolkit", + "wayland-backend", +] + +[[package]] +name = "smol_str" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +dependencies = [ + "serde", ] [[package]] @@ -3574,40 +3883,43 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "softbuffer" -version = "0.2.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2b953f6ba7285f0af131eb748aabd8ddaf53e0b81dda3ba5d803b0847d6559f" +checksum = "071916a85d1db274b4ed57af3a14afb66bd836ae7f82ebb6f1fd3455107830d9" dependencies = [ + "as-raw-xcb-connection", "bytemuck", - "cfg_aliases", + "cfg_aliases 0.2.0", "cocoa", "core-graphics", - "fastrand 1.9.0", - "foreign-types", + "drm", + "fastrand", + "foreign-types 0.5.0", + "js-sys", "log", - "nix 0.26.4", + "memmap2 0.9.4", "objc", "raw-window-handle", - "redox_syscall 0.3.5", - "thiserror", + "redox_syscall 0.4.1", + "rustix", + "tiny-xlib", "wasm-bindgen", - "wayland-backend 0.1.2", - "wayland-client 0.30.2", - "wayland-sys 0.30.1", + "wayland-backend", + "wayland-client", + "wayland-sys", "web-sys", - "windows-sys 0.48.0", - "x11-dl", - "x11rb 0.11.1", + "windows-sys 0.52.0", + "x11rb", ] [[package]] @@ -3618,12 +3930,11 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spirv" -version = "0.2.0+1.5.4" +version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 1.3.2", - "num-traits", + "bitflags 2.4.2", ] [[package]] @@ -3638,12 +3949,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "str-buf" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" - [[package]] name = "strict-num" version = "0.1.1" @@ -3655,17 +3960,17 @@ dependencies = [ [[package]] name = "svg_fmt" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2" +checksum = "f83ba502a3265efb76efb89b0a2f7782ad6f2675015d4ce37e4b547dda42b499" [[package]] name = "svgtypes" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed4b0611e7f3277f68c0fa18e385d9e2d26923691379690039548f867cef02a7" +checksum = "d71499ff2d42f59d26edb21369a308ede691421f79ebc0f001e2b1fd3a7c9e52" dependencies = [ - "kurbo", + "kurbo 0.9.5", "siphasher", ] @@ -3682,9 +3987,9 @@ dependencies = [ [[package]] name = "symphonia" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e48dba70095f265fdb269b99619b95d04c89e619538138383e63310b14d941" +checksum = "815c942ae7ee74737bb00f965fa5b5a2ac2ce7b6c01c0cc169bbeaf7abd5f5a9" dependencies = [ "lazy_static", "symphonia-bundle-mp3", @@ -3694,11 +3999,10 @@ dependencies = [ [[package]] name = "symphonia-bundle-mp3" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f31d7fece546f1e6973011a9eceae948133bbd18fd3d52f6073b1e38ae6368a" +checksum = "c01c2aae70f0f1fb096b6f0ff112a930b1fb3626178fba3ae68b09dce71706d4" dependencies = [ - "bitflags 1.3.2", "lazy_static", "log", "symphonia-core", @@ -3707,9 +4011,9 @@ dependencies = [ [[package]] name = "symphonia-core" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c73eb88fee79705268cc7b742c7bc93a7b76e092ab751d0833866970754142" +checksum = "798306779e3dc7d5231bd5691f5a813496dc79d3f56bf82e25789f2094e022c3" dependencies = [ "arrayvec", "bitflags 1.3.2", @@ -3720,9 +4024,9 @@ dependencies = [ [[package]] name = "symphonia-metadata" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c3e1937e31d0e068bbe829f66b2f2bfaa28d056365279e0ef897172c3320c0" +checksum = "bc622b9841a10089c5b18e99eb904f4341615d5aa55bbf4eedde1be721a4023c" dependencies = [ "encoding_rs", "lazy_static", @@ -3743,9 +4047,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -3788,33 +4092,14 @@ dependencies = [ "libc", ] -[[package]] -name = "system-deps" -version = "6.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" -dependencies = [ - "cfg-expr", - "heck", - "pkg-config", - "toml 0.8.10", - "version-compare", -] - -[[package]] -name = "target-lexicon" -version = "0.12.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" - [[package]] name = "tempfile" -version = "3.10.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.1", + "fastrand", "rustix", "windows-sys 0.52.0", ] @@ -3830,43 +4115,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", -] - -[[package]] -name = "tiny-skia" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" -dependencies = [ - "arrayref", - "arrayvec", - "bytemuck", - "cfg-if", - "png", - "tiny-skia-path 0.8.4", + "syn 2.0.52", ] [[package]] name = "tiny-skia" -version = "0.10.0" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db11798945fa5c3e5490c794ccca7c6de86d3afdd54b4eb324109939c6f37bc" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" dependencies = [ "arrayref", "arrayvec", @@ -3874,14 +4145,14 @@ dependencies = [ "cfg-if", "log", "png", - "tiny-skia-path 0.10.0", + "tiny-skia-path", ] [[package]] name = "tiny-skia-path" -version = "0.8.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" dependencies = [ "arrayref", "bytemuck", @@ -3889,14 +4160,15 @@ dependencies = [ ] [[package]] -name = "tiny-skia-path" -version = "0.10.0" +name = "tiny-xlib" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f60aa35c89ac2687ace1a2556eaaea68e8c0d47408a2e3e7f5c98a489e7281c" +checksum = "d4098d49269baa034a8d1eae9bd63e9fa532148d772121dace3bcd6a6c98eb6d" dependencies = [ - "arrayref", - "bytemuck", - "strict-num", + "as-raw-xcb-connection", + "ctor", + "libloading 0.8.3", + "tracing", ] [[package]] @@ -3982,7 +4254,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.4", + "toml_edit 0.22.6", ] [[package]] @@ -3996,26 +4268,26 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.2", + "indexmap", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.4" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" +checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" dependencies = [ - "indexmap 2.2.2", + "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.5", ] [[package]] @@ -4031,9 +4303,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "tracing-core" version = "0.1.32" @@ -4049,12 +4333,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "ttf-parser" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609f771ad9c6155384897e1df4d948e692667cc0588548b68eb44d052b27633" - [[package]] name = "ttf-parser" version = "0.19.2" @@ -4068,14 +4346,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" [[package]] -name = "twox-hash" -version = "1.6.3" +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "uds_windows" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "cfg-if", - "rand", - "static_assertions", + "memoffset", + "tempfile", + "winapi", ] [[package]] @@ -4096,12 +4380,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" -[[package]] -name = "unicode-general-category" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" - [[package]] name = "unicode-ident" version = "1.0.12" @@ -4116,18 +4394,24 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + [[package]] name = "unicode-script" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d817255e1bed6dfd4ca47258685d14d2bdcfbc64fdc9e3819bd5848057b8ecc" +checksum = "ad8d71f5726e5f285a935e9fe8edfd53f0491eb6e9a5774097fdabee7cd8c9cd" [[package]] name = "unicode-segmentation" @@ -4168,13 +4452,20 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "usvg" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d09ddfb0d93bf84824c09336d32e42f80961a9d1680832eb24fdf249ce11e6" +checksum = "c51daa774fe9ee5efcf7b4fec13019b8119cda764d9a8b5b06df02bb1445c656" dependencies = [ "base64", "log", @@ -4187,14 +4478,14 @@ dependencies = [ [[package]] name = "usvg-parser" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19bf93d230813599927d88557014e0908ecc3531666d47c634c6838bc8db408" +checksum = "45c88a5ffaa338f0e978ecf3d4e00d8f9f493e29bed0752e1a808a1db16afc40" dependencies = [ "data-url", "flate2", "imagesize", - "kurbo", + "kurbo 0.9.5", "log", "roxmltree 0.18.1", "simplecss", @@ -4205,14 +4496,14 @@ dependencies = [ [[package]] name = "usvg-text-layout" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "035044604e89652c0a2959b8b356946997a52649ba6cade45928c2842376feb4" +checksum = "4d2374378cb7a3fb8f33894e0fdb8625e1bbc4f25312db8d91f862130b541593" dependencies = [ "fontdb", - "kurbo", + "kurbo 0.9.5", "log", - "rustybuzz 0.7.0", + "rustybuzz 0.10.0", "unicode-bidi", "unicode-script", "unicode-vo", @@ -4221,14 +4512,14 @@ dependencies = [ [[package]] name = "usvg-tree" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7939a7e4ed21cadb5d311d6339730681c3e24c3e81d60065be80e485d3fc8b92" +checksum = "6cacb0c5edeaf3e80e5afcf5b0d4004cc1d36318befc9a7c6606507e5d0f4062" dependencies = [ "rctree", "strict-num", "svgtypes", - "tiny-skia-path 0.10.0", + "tiny-skia-path", ] [[package]] @@ -4237,18 +4528,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version-compare" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" - [[package]] name = "version_check" version = "0.9.4" @@ -4257,9 +4536,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -4282,9 +4561,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4292,24 +4571,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -4319,9 +4598,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4329,22 +4608,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-timer" @@ -4361,21 +4640,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wayland-backend" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b48e27457e8da3b2260ac60d0a94512f5cba36448679f3747c0865b7893ed8" -dependencies = [ - "cc", - "downcast-rs", - "io-lifetimes", - "nix 0.26.4", - "scoped-tls", - "smallvec", - "wayland-sys 0.30.1", -] - [[package]] name = "wayland-backend" version = "0.3.3" @@ -4387,35 +4651,7 @@ dependencies = [ "rustix", "scoped-tls", "smallvec", - "wayland-sys 0.31.1", -] - -[[package]] -name = "wayland-client" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" -dependencies = [ - "bitflags 1.3.2", - "downcast-rs", - "libc", - "nix 0.24.3", - "scoped-tls", - "wayland-commons", - "wayland-scanner 0.29.5", - "wayland-sys 0.29.5", -] - -[[package]] -name = "wayland-client" -version = "0.30.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489c9654770f674fc7e266b3c579f4053d7551df0ceb392f153adb1f9ed06ac8" -dependencies = [ - "bitflags 1.3.2", - "nix 0.26.4", - "wayland-backend 0.1.2", - "wayland-scanner 0.30.1", + "wayland-sys", ] [[package]] @@ -4426,20 +4662,8 @@ checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" dependencies = [ "bitflags 2.4.2", "rustix", - "wayland-backend 0.3.3", - "wayland-scanner 0.31.1", -] - -[[package]] -name = "wayland-commons" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" -dependencies = [ - "nix 0.24.3", - "once_cell", - "smallvec", - "wayland-sys 0.29.5", + "wayland-backend", + "wayland-scanner", ] [[package]] @@ -4450,18 +4674,7 @@ checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ "bitflags 2.4.2", "cursor-icon", - "wayland-backend 0.3.3", -] - -[[package]] -name = "wayland-cursor" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" -dependencies = [ - "nix 0.24.3", - "wayland-client 0.29.5", - "xcursor", + "wayland-backend", ] [[package]] @@ -4471,22 +4684,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba" dependencies = [ "rustix", - "wayland-client 0.31.2", + "wayland-client", "xcursor", ] -[[package]] -name = "wayland-protocols" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" -dependencies = [ - "bitflags 1.3.2", - "wayland-client 0.29.5", - "wayland-commons", - "wayland-scanner 0.29.5", -] - [[package]] name = "wayland-protocols" version = "0.31.2" @@ -4494,44 +4695,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ "bitflags 2.4.2", - "wayland-backend 0.3.3", - "wayland-client 0.31.2", - "wayland-scanner 0.31.1", + "wayland-backend", + "wayland-client", + "wayland-scanner", ] [[package]] -name = "wayland-protocols-wlr" +name = "wayland-protocols-plasma" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" dependencies = [ "bitflags 2.4.2", - "wayland-backend 0.3.3", - "wayland-client 0.31.2", - "wayland-protocols 0.31.2", - "wayland-scanner 0.31.1", -] - -[[package]] -name = "wayland-scanner" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" -dependencies = [ - "proc-macro2", - "quote", - "xml-rs", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", ] [[package]] -name = "wayland-scanner" -version = "0.30.1" +name = "wayland-protocols-wlr" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b873b257fbc32ec909c0eb80dea312076a67014e65e245f5eb69a6b8ab330e" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "proc-macro2", - "quick-xml 0.28.2", - "quote", + "bitflags 2.4.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", ] [[package]] @@ -4541,50 +4733,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" dependencies = [ "proc-macro2", - "quick-xml 0.31.0", + "quick-xml", "quote", ] [[package]] name = "wayland-sys" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" -dependencies = [ - "dlib", - "lazy_static", - "pkg-config", -] - -[[package]] -name = "wayland-sys" -version = "0.30.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" dependencies = [ "dlib", - "lazy_static", "log", + "once_cell", "pkg-config", ] [[package]] -name = "wayland-sys" -version = "0.31.1" +name = "web-sys" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ - "dlib", - "log", - "once_cell", - "pkg-config", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "web-sys" -version = "0.3.68" +name = "web-time" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" dependencies = [ "js-sys", "wasm-bindgen", @@ -4604,12 +4783,13 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" -version = "0.16.3" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "480c965c9306872eb6255fa55e4b4953be55a8b64d57e61d7ff840d3dcc051cd" +checksum = "a4b1213b52478a7631d6e387543ed8f642bc02c578ef4e3b49aca2a29a7df0cb" dependencies = [ "arrayvec", "cfg-if", + "cfg_aliases 0.1.1", "js-sys", "log", "naga", @@ -4628,16 +4808,19 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.16.1" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" +checksum = "f9f6b033c2f00ae0bc8ea872c5989777c60bc241aac4e58b24774faa8b391f78" dependencies = [ "arrayvec", "bit-vec", "bitflags 2.4.2", + "cfg_aliases 0.1.1", "codespan-reporting", + "indexmap", "log", "naga", + "once_cell", "parking_lot 0.12.1", "profiling", "raw-window-handle", @@ -4651,9 +4834,9 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.16.2" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecb3258078e936deee14fd4e0febe1cfe9bbb5ffef165cb60218d2ee5eb4448" +checksum = "49f972c280505ab52ffe17e94a7413d9d54b58af0114ab226b9fc4999a47082e" dependencies = [ "android_system_properties", "arrayvec", @@ -4661,10 +4844,11 @@ dependencies = [ "bit-set", "bitflags 2.4.2", "block", + "cfg_aliases 0.1.1", "core-graphics-types", "d3d12", - "foreign-types", "glow", + "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", @@ -4672,11 +4856,13 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.8.1", + "libloading 0.8.3", "log", "metal", "naga", + "ndk-sys", "objc", + "once_cell", "parking_lot 0.12.1", "profiling", "range-alloc", @@ -4693,9 +4879,9 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.16.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c153280bb108c2979eb5c7391cb18c56642dd3c072e55f52065e13e2a1252a" +checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805" dependencies = [ "bitflags 2.4.2", "js-sys", @@ -4733,15 +4919,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "winapi-wsapoll" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -4750,9 +4927,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63287c9c4396ccf5346d035a9b0fcaead9e18377637f5eaa78b7ac65c873ff7d" +checksum = "f6d692d46038c433f9daee7ad8757e002a4248c20b0a3fbc991d99521d3bcb6d" dependencies = [ "clipboard-win", "clipboard_macos", @@ -4764,20 +4941,22 @@ dependencies = [ [[package]] name = "windows" -version = "0.44.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-targets 0.42.2", + "windows-core 0.52.0", + "windows-targets 0.52.4", ] [[package]] name = "windows" -version = "0.46.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "windows-targets 0.42.2", + "windows-core 0.54.0", + "windows-targets 0.52.4", ] [[package]] @@ -4786,7 +4965,26 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", +] + +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result", + "windows-targets 0.52.4", +] + +[[package]] +name = "windows-result" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd19df78e5168dfb0aedc343d1d1b8d422ab2db6756d2dc3fef75035402a3f64" +dependencies = [ + "windows-targets 0.52.4", ] [[package]] @@ -4826,7 +5024,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -4861,17 +5059,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -4888,9 +5086,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -4912,9 +5110,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -4936,9 +5134,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -4960,9 +5158,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -4984,9 +5182,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -5002,9 +5200,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -5026,50 +5224,72 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winit" -version = "0.28.7" +version = "0.29.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9596d90b45384f5281384ab204224876e8e8bf7d58366d9b795ad99aa9894b94" +checksum = "a7a3db69ffbe53a9babec7804da7a90f21020fcce1f2f5e5291e2311245b993d" dependencies = [ + "ahash", "android-activity", - "bitflags 1.3.2", - "cfg_aliases", + "atomic-waker", + "bitflags 2.4.2", + "bytemuck", + "calloop", + "cfg_aliases 0.1.1", "core-foundation", "core-graphics", - "dispatch", - "instant", + "cursor-icon", + "icrate", + "js-sys", "libc", "log", - "mio", + "memmap2 0.9.4", "ndk", + "ndk-sys", "objc2", "once_cell", "orbclient", "percent-encoding", "raw-window-handle", "redox_syscall 0.3.5", + "rustix", "sctk-adwaita", - "smithay-client-toolkit 0.16.1", + "smithay-client-toolkit", + "smol_str", + "unicode-segmentation", "wasm-bindgen", - "wayland-client 0.29.5", - "wayland-commons", - "wayland-protocols 0.29.5", - "wayland-scanner 0.29.5", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", "web-sys", - "windows-sys 0.45.0", + "web-time", + "windows-sys 0.48.0", "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", ] [[package]] name = "winnow" -version = "0.5.39" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] @@ -5104,40 +5324,19 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x11rb" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf3c79412dd91bae7a7366b8ad1565a85e35dd049affc3a6a2c549e97419617" -dependencies = [ - "gethostname 0.2.3", - "libc", - "libloading 0.7.4", - "nix 0.25.1", - "once_cell", - "winapi", - "winapi-wsapoll", - "x11rb-protocol 0.11.1", -] - [[package]] name = "x11rb" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" dependencies = [ - "gethostname 0.4.3", + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading 0.8.3", + "once_cell", "rustix", - "x11rb-protocol 0.13.0", -] - -[[package]] -name = "x11rb-protocol" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0b1513b141123073ce54d5bb1d33f801f17508fbd61e02060b1214e96d39c56" -dependencies = [ - "nix 0.25.1", + "x11rb-protocol", ] [[package]] @@ -5152,6 +5351,29 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" +[[package]] +name = "xdg-home" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.4.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + [[package]] name = "xkeysym" version = "0.2.0" @@ -5176,12 +5398,88 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" +[[package]] +name = "xxhash-rust" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" + +[[package]] +name = "yansi" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2861d76f58ec8fc95708b9b1e417f7b12fd72ad33c01fa6886707092dea0d3" + [[package]] name = "yazi" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" +[[package]] +name = "zbus" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9ff46f2a25abd690ed072054733e0bc3157e3d4c45f41bd183dce09c2ff8ab9" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock 3.3.0", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "derivative", + "enumflags2", + "event-listener 5.2.0", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix 0.28.0", + "ordered-stream", + "rand", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "windows-sys 0.52.0", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0e3852c93dcdb49c9462afe67a2a468f7bd464150d866e861eaf06208633e0" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + [[package]] name = "zeno" version = "0.2.3" @@ -5205,5 +5503,43 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", +] + +[[package]] +name = "zvariant" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c1b3ca6db667bfada0f1ebfc94b2b1759ba25472ee5373d4551bb892616389a" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "url", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7a4b236063316163b69039f77ce3117accb41a09567fd24c168e43491e521bc" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] diff --git a/Cargo.toml b/Cargo.toml index 6f290342..6bcf5d2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "sniffnet" -version = "1.2.2" -authors = [ "Giuliano Bellini " ] -edition = "2021" +name = "sniffnet" +version = "1.2.2" +authors = ["Giuliano Bellini "] +edition = "2021" description = "Application to comfortably monitor your network traffic" -readme = "README.md" -homepage = "https://sniffnet.net" -repository = "https://github.com/GyulyVGC/sniffnet" -license = "MIT OR Apache-2.0" -keywords = [ "filter", "network", "packet", "sniffer", "gui" ] -categories = [ "visualization", "gui", "network-programming" ] -include = [ +readme = "README.md" +homepage = "https://sniffnet.net" +repository = "https://github.com/GyulyVGC/sniffnet" +license = "MIT OR Apache-2.0" +keywords = ["filter", "network", "packet", "sniffer", "gui"] +categories = ["visualization", "gui", "network-programming"] +include = [ "/src/**/*.rs", "/LICENSE-MIT", "/LICENSE-APACHE", @@ -41,8 +41,8 @@ pcap = "1.2.0" etherparse = "0.14.2" chrono = { version = "0.4.33", default_features = false, features = ["clock"] } plotters = { version = "0.3.5", default_features = false, features = ["area_series"] } -iced = { version = "0.10.0", features = ["tokio", "svg", "advanced", "lazy"] } -plotters-iced = "0.9.0" +iced = { version = "0.12.1", features = ["tokio", "svg", "advanced", "lazy"] } +plotters-iced = "0.10.0" maxminddb = "0.24.0" confy = "0.6.0" serde = { version = "1.0.196", default_features = false, features = ["derive"] } @@ -51,7 +51,7 @@ dns-lookup = "2.0.4" toml = "0.8.10" once_cell = "1.19.0" ctrlc = { version = "3.4.2", features = ["termination"] } -rfd = "0.13.0" +rfd = "0.14.0" phf = "0.11.2" phf_shared = "0.11.2" splines = "4.3.1" @@ -114,31 +114,31 @@ pre-build = [ #═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ [package.metadata.deb] -section="Network" -license-file="resources/packaging/LICENSE" -extended-description-file="resources/packaging/linux/description.txt" -maintainer-scripts="resources/packaging/linux/scripts/" +section = "Network" +license-file = "resources/packaging/LICENSE" +extended-description-file = "resources/packaging/linux/description.txt" +maintainer-scripts = "resources/packaging/linux/scripts/" depends = "libasound2, libpcap0.8, libfontconfig1" assets = [ ["target/release/sniffnet", "/usr/bin/", "755"], ["resources/packaging/linux/sniffnet.desktop", "/usr/share/applications/", "644"], - ["resources/packaging/linux/graphics/sniffnet_8x8.png", "/usr/share/icons/hicolor/8x8/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_16x16.png", "/usr/share/icons/hicolor/16x16/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_22x22.png", "/usr/share/icons/hicolor/22x22/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_24x24.png", "/usr/share/icons/hicolor/24x24/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_32x32.png", "/usr/share/icons/hicolor/32x32/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_36x36.png", "/usr/share/icons/hicolor/36x36/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_42x42.png", "/usr/share/icons/hicolor/42x42/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_48x48.png", "/usr/share/icons/hicolor/48x48/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_64x64.png", "/usr/share/icons/hicolor/64x64/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_72x72.png", "/usr/share/icons/hicolor/72x72/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_96x96.png", "/usr/share/icons/hicolor/96x96/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_128x128.png", "/usr/share/icons/hicolor/128x128/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_160x160.png", "/usr/share/icons/hicolor/160x160/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_192x192.png", "/usr/share/icons/hicolor/192x192/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_256x256.png", "/usr/share/icons/hicolor/256x256/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_384x384.png", "/usr/share/icons/hicolor/384x384/apps/sniffnet.png", "644"], - ["resources/packaging/linux/graphics/sniffnet_512x512.png", "/usr/share/icons/hicolor/512x512/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_8x8.png", "/usr/share/icons/hicolor/8x8/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_16x16.png", "/usr/share/icons/hicolor/16x16/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_22x22.png", "/usr/share/icons/hicolor/22x22/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_24x24.png", "/usr/share/icons/hicolor/24x24/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_32x32.png", "/usr/share/icons/hicolor/32x32/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_36x36.png", "/usr/share/icons/hicolor/36x36/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_42x42.png", "/usr/share/icons/hicolor/42x42/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_48x48.png", "/usr/share/icons/hicolor/48x48/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_64x64.png", "/usr/share/icons/hicolor/64x64/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_72x72.png", "/usr/share/icons/hicolor/72x72/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_96x96.png", "/usr/share/icons/hicolor/96x96/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_128x128.png", "/usr/share/icons/hicolor/128x128/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_160x160.png", "/usr/share/icons/hicolor/160x160/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_192x192.png", "/usr/share/icons/hicolor/192x192/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_256x256.png", "/usr/share/icons/hicolor/256x256/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_384x384.png", "/usr/share/icons/hicolor/384x384/apps/sniffnet.png", "644"], + ["resources/packaging/linux/graphics/sniffnet_512x512.png", "/usr/share/icons/hicolor/512x512/apps/sniffnet.png", "644"], ["resources/packaging/linux/graphics/sniffnet_1024x1024.png", "/usr/share/icons/hicolor/1024x1024/apps/sniffnet.png", "644"] ] @@ -150,23 +150,23 @@ pre_uninstall_script = "setcap '' /usr/bin/sniffnet" assets = [ { source = "target/release/sniffnet", dest = "/usr/bin/", mode = "755" }, { source = "resources/packaging/linux/sniffnet.desktop", dest = "/usr/share/applications/", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_8x8.png", dest = "/usr/share/icons/hicolor/8x8/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_16x16.png", dest = "/usr/share/icons/hicolor/16x16/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_22x22.png", dest = "/usr/share/icons/hicolor/22x22/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_24x24.png", dest = "/usr/share/icons/hicolor/24x24/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_32x32.png", dest = "/usr/share/icons/hicolor/32x32/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_36x36.png", dest = "/usr/share/icons/hicolor/36x36/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_42x42.png", dest = "/usr/share/icons/hicolor/42x42/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_48x48.png", dest = "/usr/share/icons/hicolor/48x48/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_64x64.png", dest = "/usr/share/icons/hicolor/64x64/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_72x72.png", dest = "/usr/share/icons/hicolor/72x72/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_96x96.png", dest = "/usr/share/icons/hicolor/96x96/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_128x128.png", dest = "/usr/share/icons/hicolor/128x128/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_160x160.png", dest = "/usr/share/icons/hicolor/160x160/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_192x192.png", dest = "/usr/share/icons/hicolor/192x192/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_256x256.png", dest = "/usr/share/icons/hicolor/256x256/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_384x384.png", dest = "/usr/share/icons/hicolor/384x384/apps/sniffnet.png", mode = "644" }, - { source = "resources/packaging/linux/graphics/sniffnet_512x512.png", dest = "/usr/share/icons/hicolor/512x512/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_8x8.png", dest = "/usr/share/icons/hicolor/8x8/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_16x16.png", dest = "/usr/share/icons/hicolor/16x16/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_22x22.png", dest = "/usr/share/icons/hicolor/22x22/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_24x24.png", dest = "/usr/share/icons/hicolor/24x24/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_32x32.png", dest = "/usr/share/icons/hicolor/32x32/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_36x36.png", dest = "/usr/share/icons/hicolor/36x36/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_42x42.png", dest = "/usr/share/icons/hicolor/42x42/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_48x48.png", dest = "/usr/share/icons/hicolor/48x48/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_64x64.png", dest = "/usr/share/icons/hicolor/64x64/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_72x72.png", dest = "/usr/share/icons/hicolor/72x72/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_96x96.png", dest = "/usr/share/icons/hicolor/96x96/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_128x128.png", dest = "/usr/share/icons/hicolor/128x128/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_160x160.png", dest = "/usr/share/icons/hicolor/160x160/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_192x192.png", dest = "/usr/share/icons/hicolor/192x192/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_256x256.png", dest = "/usr/share/icons/hicolor/256x256/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_384x384.png", dest = "/usr/share/icons/hicolor/384x384/apps/sniffnet.png", mode = "644" }, + { source = "resources/packaging/linux/graphics/sniffnet_512x512.png", dest = "/usr/share/icons/hicolor/512x512/apps/sniffnet.png", mode = "644" }, { source = "resources/packaging/linux/graphics/sniffnet_1024x1024.png", dest = "/usr/share/icons/hicolor/1024x1024/apps/sniffnet.png", mode = "644" } ] diff --git a/resources/fonts/subset/icons.ttf b/resources/fonts/subset/icons.ttf index 3e65c1e1..b06c382d 100644 Binary files a/resources/fonts/subset/icons.ttf and b/resources/fonts/subset/icons.ttf differ diff --git a/src/chart/manage_chart_data.rs b/src/chart/manage_chart_data.rs index 9be4d35f..b0f721d3 100644 --- a/src/chart/manage_chart_data.rs +++ b/src/chart/manage_chart_data.rs @@ -83,6 +83,14 @@ mod tests { use crate::chart::manage_chart_data::{get_max, get_min, update_charts_data}; use crate::{ChartType, Language, RunTimeData, StyleType, TrafficChart}; + fn spline_from_vec(vec: Vec<(i32, i32)>) -> Spline { + Spline::from_vec( + vec.iter() + .map(|&(x, y)| Key::new(x as f32, y as f32, Interpolation::Cosine)) + .collect::>>(), + ) + } + #[test] fn test_chart_data_updates() { let sent_vec = vec![ @@ -116,12 +124,7 @@ mod tests { (27, -1000), (28, -1000), ]; - let sent = Spline::from_vec( - sent_vec - .iter() - .map(|&(x, y)| Key::new(x as f32, y as f32, Interpolation::Cosine)) - .collect(), - ); + let sent = spline_from_vec(sent_vec); let received_vec = vec![ (0, 1000), (1, 21000), @@ -153,12 +156,7 @@ mod tests { (27, 21000), (28, 21000), ]; - let received = Spline::from_vec( - received_vec - .iter() - .map(|&(x, y)| Key::new(x as f32, y as f32, Interpolation::Cosine)) - .collect(), - ); + let received = spline_from_vec(received_vec); let tot_sent = 1000 * 28 + 500; let tot_received = 21000 * 28 + 1000; let mut traffic_chart = TrafficChart { diff --git a/src/chart/types/traffic_chart.rs b/src/chart/types/traffic_chart.rs index a2c9d38a..db7ed2a8 100644 --- a/src/chart/types/traffic_chart.rs +++ b/src/chart/types/traffic_chart.rs @@ -1,8 +1,7 @@ //! This module defines the behavior of the `TrafficChart` struct, used to display chart in GUI run page -use iced::alignment::{Horizontal, Vertical}; -use iced::widget::{Column, Container}; -use iced::{Element, Renderer}; +use iced::widget::Container; +use iced::Element; use plotters::prelude::*; use plotters_iced::{Chart, ChartBuilder, ChartWidget, DrawingBackend}; use splines::Spline; @@ -63,11 +62,8 @@ impl TrafficChart { } } - pub fn view(&self) -> Element> { - Container::new(Column::new().push(ChartWidget::new(self))) - .align_x(Horizontal::Left) - .align_y(Vertical::Bottom) - .into() + pub fn view(&self) -> Element { + Container::new(ChartWidget::new(self)).into() } pub fn change_kind(&mut self, kind: ChartType) { @@ -161,10 +157,10 @@ impl Chart for TrafficChart { } chart_builder - .margin_right(30) - .margin_bottom(0) - .set_label_area_size(LabelAreaPosition::Left, 60) - .set_label_area_size(LabelAreaPosition::Bottom, 50); + .margin_right(25) + .margin_top(6) + .set_label_area_size(LabelAreaPosition::Left, 55) + .set_label_area_size(LabelAreaPosition::Bottom, 40); let x_axis_range = self.x_axis_range(); let y_axis_range = self.y_axis_range(); @@ -285,7 +281,7 @@ mod tests { let spline = Spline::from_vec( vec.iter() .map(|&(x, y)| Key::new(x as f32, y as f32, Interpolation::Cosine)) - .collect(), + .collect::>>(), ); let eps = 0.001; diff --git a/src/configs/types/config_window.rs b/src/configs/types/config_window.rs index 73975b82..d4012371 100644 --- a/src/configs/types/config_window.rs +++ b/src/configs/types/config_window.rs @@ -1,4 +1,5 @@ use iced::window::Position; +use iced::{Point, Size}; use serde::{Deserialize, Serialize}; #[cfg(not(test))] @@ -44,7 +45,25 @@ pub trait ToPosition { impl ToPosition for (i32, i32) { fn to_position(self) -> Position { - Position::Specific(self.0, self.1) + #[allow(clippy::cast_precision_loss)] + Position::Specific(Point { + x: self.0 as f32, + y: self.1 as f32, + }) + } +} + +pub trait ToSize { + fn to_size(self) -> Size; +} + +impl ToSize for (u32, u32) { + fn to_size(self) -> Size { + #[allow(clippy::cast_precision_loss)] + Size { + width: self.0 as f32, + height: self.1 as f32, + } } } diff --git a/src/countries/country_utils.rs b/src/countries/country_utils.rs index ae99ee63..cb1ac2da 100644 --- a/src/countries/country_utils.rs +++ b/src/countries/country_utils.rs @@ -1,8 +1,8 @@ use iced::widget::svg::Handle; use iced::widget::tooltip::Position; -use iced::widget::Svg; use iced::widget::Tooltip; -use iced::{Font, Length, Renderer}; +use iced::widget::{Svg, Text}; +use iced::Font; use crate::countries::flags_pictures::{ AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, @@ -35,7 +35,7 @@ fn get_flag_from_country( is_loopback: bool, traffic_type: TrafficType, language: Language, -) -> (Svg>, String) { +) -> (Svg, String) { #![allow(clippy::too_many_lines)] let mut tooltip = country.to_string(); let mut svg_style = SvgType::Standard; @@ -310,8 +310,8 @@ fn get_flag_from_country( } }))) .style(svg_style) - .width(Length::Fixed(width)) - .height(Length::Fixed(width * 0.75)); + .width(width) + .height(width * 0.75); (svg, tooltip) } @@ -322,7 +322,7 @@ pub fn get_flag_tooltip( host_info: &DataInfoHost, language: Language, font: Font, -) -> Tooltip<'static, Message, Renderer> { +) -> Tooltip<'static, Message, StyleType> { let is_local = host_info.is_local; let is_loopback = host_info.is_loopback; let traffic_type = host_info.traffic_type; @@ -335,10 +335,13 @@ pub fn get_flag_tooltip( language, ); - let mut tooltip = Tooltip::new(content, tooltip, Position::FollowCursor) - .font(font) - .snap_within_viewport(true) - .style(ContainerType::Tooltip); + let mut tooltip = Tooltip::new( + content, + Text::new(tooltip).font(font), + Position::FollowCursor, + ) + .snap_within_viewport(true) + .style(ContainerType::Tooltip); if width == FLAGS_WIDTH_SMALL { tooltip = tooltip.padding(3); @@ -353,7 +356,7 @@ pub fn get_computer_tooltip( traffic_type: TrafficType, language: Language, font: Font, -) -> Tooltip<'static, Message, Renderer> { +) -> Tooltip<'static, Message, StyleType> { let content = Svg::new(Handle::from_memory(Vec::from( match (is_my_address, is_local, traffic_type) { (true, _, _) => COMPUTER, @@ -364,8 +367,8 @@ pub fn get_computer_tooltip( }, ))) .style(SvgType::AdaptColor) - .width(Length::Fixed(FLAGS_WIDTH_BIG)) - .height(Length::Fixed(FLAGS_WIDTH_BIG * 0.75)); + .width(FLAGS_WIDTH_BIG) + .height(FLAGS_WIDTH_BIG * 0.75); let tooltip = match (is_my_address, is_local, traffic_type) { (true, _, _) => your_network_adapter_translation(language), @@ -375,8 +378,11 @@ pub fn get_computer_tooltip( (false, false, TrafficType::Unicast) => unknown_translation(language), }; - Tooltip::new(content, tooltip, Position::FollowCursor) - .font(font) - .snap_within_viewport(true) - .style(ContainerType::Tooltip) + Tooltip::new( + content, + Text::new(tooltip).font(font), + Position::FollowCursor, + ) + .snap_within_viewport(true) + .style(ContainerType::Tooltip) } diff --git a/src/gui/app.rs b/src/gui/app.rs index dd672c60..6244be14 100644 --- a/src/gui/app.rs +++ b/src/gui/app.rs @@ -4,12 +4,12 @@ use std::time::Duration; -use iced::keyboard::{Event, KeyCode, Modifiers}; +use iced::keyboard::key::Named; +use iced::keyboard::{Event, Key, Modifiers}; use iced::widget::Column; +use iced::window::Id; use iced::Event::{Keyboard, Window}; -use iced::{ - executor, font, subscription, window, Application, Command, Element, Renderer, Subscription, -}; +use iced::{executor, window, Application, Command, Element, Subscription}; use crate::gui::components::footer::footer; use crate::gui::components::header::header; @@ -25,7 +25,6 @@ use crate::gui::pages::settings_notifications_page::settings_notifications_page; use crate::gui::pages::settings_style_page::settings_style_page; use crate::gui::pages::types::running_page::RunningPage; use crate::gui::pages::types::settings_page::SettingsPage; -use crate::gui::styles::style_constants::{ICONS_BYTES, SARASA_MONO_BOLD_BYTES, SARASA_MONO_BYTES}; use crate::gui::types::message::Message; use crate::gui::types::sniffer::Sniffer; use crate::{ConfigSettings, StyleType, SNIFFNET_TITLECASE}; @@ -43,14 +42,7 @@ impl Application for Sniffer { type Flags = Sniffer; fn new(flags: Sniffer) -> (Sniffer, Command) { - ( - flags, - Command::batch(vec![ - font::load(SARASA_MONO_BOLD_BYTES).map(Message::FontLoaded), - font::load(SARASA_MONO_BYTES).map(Message::FontLoaded), - font::load(ICONS_BYTES).map(Message::FontLoaded), - ]), - ) + (flags, Command::none()) } fn title(&self) -> String { @@ -61,7 +53,7 @@ impl Application for Sniffer { self.update(message) } - fn view(&self) -> Element> { + fn view(&self) -> Element { let ConfigSettings { style, language, @@ -130,37 +122,34 @@ impl Application for Sniffer { fn subscription(&self) -> Subscription { const NO_MODIFIER: Modifiers = Modifiers::empty(); - let window_events_subscription = subscription::events_with(|event, _| match event { - Window(window::Event::Focused) => Some(Message::WindowFocused), - Window(window::Event::Moved { x, y }) => Some(Message::WindowMoved(x, y)), - Window(window::Event::Resized { width, height }) => { + let window_events_subscription = iced::event::listen_with(|event, _| match event { + Window(Id::MAIN, window::Event::Focused) => Some(Message::WindowFocused), + Window(Id::MAIN, window::Event::Moved { x, y }) => Some(Message::WindowMoved(x, y)), + Window(Id::MAIN, window::Event::Resized { width, height }) => { Some(Message::WindowResized(width, height)) } - Window(window::Event::CloseRequested) => Some(Message::CloseRequested), + Window(Id::MAIN, window::Event::CloseRequested) => Some(Message::CloseRequested), _ => None, }); - let hot_keys_subscription = subscription::events_with(|event, _| match event { - Keyboard(Event::KeyPressed { - key_code, - modifiers, - }) => match modifiers { - Modifiers::COMMAND => match key_code { - KeyCode::Q => Some(Message::CloseRequested), - KeyCode::Comma => Some(Message::OpenLastSettings), - KeyCode::Backspace => Some(Message::ResetButtonPressed), - KeyCode::D => Some(Message::CtrlDPressed), - KeyCode::Left => Some(Message::ArrowPressed(false)), - KeyCode::Right => Some(Message::ArrowPressed(true)), + let hot_keys_subscription = iced::event::listen_with(|event, _| match event { + Keyboard(Event::KeyPressed { key, modifiers, .. }) => match modifiers { + Modifiers::COMMAND => match key.as_ref() { + Key::Character("q") => Some(Message::CloseRequested), + Key::Character(",") => Some(Message::OpenLastSettings), + Key::Named(Named::Backspace) => Some(Message::ResetButtonPressed), + Key::Character("d") => Some(Message::CtrlDPressed), + Key::Named(Named::ArrowLeft) => Some(Message::ArrowPressed(false)), + Key::Named(Named::ArrowRight) => Some(Message::ArrowPressed(true)), _ => None, }, - Modifiers::SHIFT => match key_code { - KeyCode::Tab => Some(Message::SwitchPage(false)), + Modifiers::SHIFT => match key { + Key::Named(Named::Tab) => Some(Message::SwitchPage(false)), _ => None, }, - NO_MODIFIER => match key_code { - KeyCode::Enter => Some(Message::ReturnKeyPressed), - KeyCode::Escape => Some(Message::EscKeyPressed), - KeyCode::Tab => Some(Message::SwitchPage(true)), + NO_MODIFIER => match key { + Key::Named(Named::Enter) => Some(Message::ReturnKeyPressed), + Key::Named(Named::Escape) => Some(Message::EscKeyPressed), + Key::Named(Named::Tab) => Some(Message::SwitchPage(true)), _ => None, }, _ => None, diff --git a/src/gui/components/button.rs b/src/gui/components/button.rs index ea3579ee..6179b35f 100644 --- a/src/gui/components/button.rs +++ b/src/gui/components/button.rs @@ -1,11 +1,13 @@ #![allow(clippy::module_name_repetitions)] use iced::alignment::{Horizontal, Vertical}; +use iced::widget::text::LineHeight; use iced::widget::tooltip::Position; -use iced::widget::{button, Text, Tooltip}; -use iced::{Font, Length, Renderer}; +use iced::widget::{button, Row, Text, Tooltip}; +use iced::{Alignment, Font}; use crate::gui::styles::container::ContainerType; +use crate::gui::styles::text::TextType; use crate::gui::types::message::Message; use crate::translations::translations::hide_translation; use crate::utils::types::file_info::FileInfo; @@ -16,24 +18,24 @@ pub fn button_hide( message: Message, language: Language, font: Font, -) -> Tooltip<'static, Message, Renderer> { +) -> Tooltip<'static, Message, StyleType> { Tooltip::new( button( Text::new("×") .font(font) .vertical_alignment(Vertical::Center) .horizontal_alignment(Horizontal::Center) - .size(15), + .size(15) + .line_height(LineHeight::Relative(1.0)), ) .padding(2) - .height(Length::Fixed(20.0)) - .width(Length::Fixed(20.0)) + .height(20) + .width(20) .on_press(message), - hide_translation(language), + Text::new(hide_translation(language)).font(font), Position::Right, ) .gap(5) - .font(font) .style(ContainerType::Tooltip) } @@ -44,7 +46,7 @@ pub fn button_open_file( font: Font, is_editable: bool, action: fn(String) -> Message, -) -> Tooltip<'static, Message, Renderer> { +) -> Tooltip<'static, Message, StyleType> { let mut tooltip_str = ""; let mut tooltip_style = ContainerType::Neutral; @@ -56,8 +58,8 @@ pub fn button_open_file( .size(16.0), ) .padding(0) - .height(Length::Fixed(25.0)) - .width(Length::Fixed(40.0)); + .height(25) + .width(40); if is_editable { tooltip_str = file_info.action_info(language); @@ -65,8 +67,15 @@ pub fn button_open_file( button = button.on_press(Message::OpenFile(old_file, file_info, action)); } - Tooltip::new(button, tooltip_str, Position::Right) + Tooltip::new(button, Text::new(tooltip_str).font(font), Position::Right) .gap(5) - .font(font) .style(tooltip_style) } + +pub fn row_open_link_tooltip(text: &'static str, font: Font) -> Row<'static, Message, StyleType> { + Row::new() + .align_items(Alignment::Center) + .spacing(10) + .push(Text::new(text).font(font)) + .push(Icon::OpenLink.to_text().size(16).style(TextType::Title)) +} diff --git a/src/gui/components/footer.rs b/src/gui/components/footer.rs index ade1ee71..1c4a7953 100644 --- a/src/gui/components/footer.rs +++ b/src/gui/components/footer.rs @@ -3,11 +3,13 @@ use std::sync::{Arc, Mutex}; use iced::alignment::{Horizontal, Vertical}; -use iced::widget::horizontal_space; +use iced::widget::text::LineHeight; use iced::widget::tooltip::Position; +use iced::widget::Space; use iced::widget::{button, Container, Row, Text, Tooltip}; -use iced::{Alignment, Font, Length, Renderer}; +use iced::{Alignment, Font, Length}; +use crate::gui::components::button::row_open_link_tooltip; use crate::gui::styles::button::ButtonType; use crate::gui::styles::container::ContainerType; use crate::gui::styles::style_constants::{FONT_SIZE_FOOTER, FONT_SIZE_SUBTITLE}; @@ -27,13 +29,12 @@ pub fn footer( font: Font, font_footer: Font, newer_release_available: &Arc>>, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let release_details_row = get_release_details(language, font, font_footer, newer_release_available); let footer_row = Row::new() .spacing(10) - .width(Length::Fill) .padding([0, 20]) .align_items(Alignment::Center) .push(release_details_row) @@ -42,71 +43,81 @@ pub fn footer( .push(get_button_sponsor(font)) .push( Text::new("Made with ❤ by Giuliano Bellini") - .width(Length::FillPortion(1)) + .width(Length::Fill) .horizontal_alignment(Horizontal::Right) .size(FONT_SIZE_FOOTER) .font(font_footer), ); Container::new(footer_row) - .height(Length::Fixed(45.0)) - .width(Length::Fill) + .height(45) .align_y(Vertical::Center) - .align_x(Horizontal::Center) .style(ContainerType::Gradient(color_gradient)) } -fn get_button_website(font: Font) -> Tooltip<'static, Message, Renderer> { +fn get_button_website(font: Font) -> Tooltip<'static, Message, StyleType> { let content = button( Icon::Globe .to_text() .size(17) .horizontal_alignment(Horizontal::Center) - .vertical_alignment(Vertical::Center), + .vertical_alignment(Vertical::Center) + .line_height(LineHeight::Relative(1.0)), ) - .height(Length::Fixed(30.0)) - .width(Length::Fixed(30.0)) + .height(30) + .width(30) .on_press(Message::OpenWebPage(WebPage::Website)); - Tooltip::new(content, "Website", Position::Top) - .font(font) - .style(ContainerType::Tooltip) + Tooltip::new( + content, + row_open_link_tooltip("Website", font), + Position::Top, + ) + .style(ContainerType::Tooltip) } -fn get_button_github(font: Font) -> Tooltip<'static, Message, Renderer> { +fn get_button_github(font: Font) -> Tooltip<'static, Message, StyleType> { let content = button( Icon::GitHub .to_text() .size(26) .horizontal_alignment(Horizontal::Center) - .vertical_alignment(Vertical::Center), + .vertical_alignment(Vertical::Center) + .line_height(LineHeight::Relative(1.0)), ) - .height(Length::Fixed(40.0)) - .width(Length::Fixed(40.0)) + .height(40) + .width(40) .on_press(Message::OpenWebPage(WebPage::Repo)); - Tooltip::new(content, "GitHub", Position::Top) - .font(font) - .style(ContainerType::Tooltip) + Tooltip::new( + content, + row_open_link_tooltip("GitHub", font), + Position::Top, + ) + .style(ContainerType::Tooltip) } -fn get_button_sponsor(font: Font) -> Tooltip<'static, Message, Renderer> { +fn get_button_sponsor(font: Font) -> Tooltip<'static, Message, StyleType> { let content = button( Text::new('❤'.to_string()) .font(font) .size(23) .style(TextType::Sponsor) .horizontal_alignment(Horizontal::Center) - .vertical_alignment(Vertical::Center), + .vertical_alignment(Vertical::Center) + .line_height(LineHeight::Relative(1.0)), ) .padding([2, 0, 0, 0]) - .height(Length::Fixed(30.0)) - .width(Length::Fixed(30.0)) + .height(30) + .width(30) .on_press(Message::OpenWebPage(WebPage::Sponsor)); - Tooltip::new(content, "Sponsor", Position::Top) - .font(font) - .style(ContainerType::Tooltip) + Tooltip::new( + content, + row_open_link_tooltip("Sponsor", font), + Position::Top, + ) + .style(ContainerType::Tooltip) } fn get_release_details( @@ -114,11 +125,11 @@ fn get_release_details( font: Font, font_footer: Font, newer_release_available: &Arc>>, -) -> Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { let mut ret_val = Row::new() .align_items(Alignment::Center) .height(Length::Fill) - .width(Length::FillPortion(1)) + .width(Length::Fill) .push( Text::new(format!("{SNIFFNET_TITLECASE} {APP_VERSION}")) .size(FONT_SIZE_FOOTER) @@ -132,23 +143,21 @@ fn get_release_details( .style(TextType::Danger) .size(28) .horizontal_alignment(Horizontal::Center) - .vertical_alignment(Vertical::Center), + .vertical_alignment(Vertical::Center) + .line_height(LineHeight::Relative(0.8)), ) .padding(0) - .height(Length::Fixed(35.0)) - .width(Length::Fixed(35.0)) + .height(35) + .width(35) .style(ButtonType::Alert) .on_press(Message::OpenWebPage(WebPage::WebsiteDownload)); let tooltip = Tooltip::new( button, - new_version_available_translation(language), + row_open_link_tooltip(new_version_available_translation(language), font), Position::Top, ) - .font(font) .style(ContainerType::Tooltip); - ret_val = ret_val - .push(horizontal_space(Length::Fixed(10.0))) - .push(tooltip); + ret_val = ret_val.push(Space::with_width(10)).push(tooltip); } else { // this is the latest release ret_val = ret_val.push(Text::new(" ✔").size(FONT_SIZE_SUBTITLE).font(font_footer)); diff --git a/src/gui/components/header.rs b/src/gui/components/header.rs index d5b30f30..05d29ea8 100644 --- a/src/gui/components/header.rs +++ b/src/gui/components/header.rs @@ -3,9 +3,8 @@ use iced::alignment::{Horizontal, Vertical}; use iced::widget::text::LineHeight; use iced::widget::tooltip::Position; -use iced::widget::{button, Container, Row, Tooltip}; -use iced::Length::FillPortion; -use iced::{Alignment, Font, Length, Renderer}; +use iced::widget::{button, horizontal_space, Container, Row, Space, Text, Tooltip}; +use iced::{Alignment, Font, Length}; use crate::gui::pages::types::settings_page::SettingsPage; use crate::gui::styles::container::ContainerType; @@ -21,66 +20,57 @@ pub fn header( back_button: bool, language: Language, last_opened_setting: SettingsPage, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let logo = Icon::Sniffnet .to_text() - .horizontal_alignment(Horizontal::Center) .vertical_alignment(Vertical::Center) - .width(FillPortion(6)) .height(Length::Fill) - .line_height(LineHeight::Relative(1.0)) - .size(100); + .line_height(LineHeight::Relative(0.8)) + .size(95); Container::new( Row::new() - .height(Length::Fill) - .width(Length::Fill) + .padding([0, 20]) .align_items(Alignment::Center) .push(if back_button { Container::new(get_button_reset(font, language)) - .width(FillPortion(1)) - .align_x(Horizontal::Center) } else { - Container::new(Row::new()) - .width(FillPortion(1)) - .align_x(Horizontal::Center) + Container::new(Space::with_width(60)) }) + .push(horizontal_space()) .push(logo) - .push( - Container::new(get_button_settings(font, language, last_opened_setting)) - .width(FillPortion(1)) - .align_x(Horizontal::Center), - ), + .push(horizontal_space()) + .push(Container::new(get_button_settings( + font, + language, + last_opened_setting, + ))), ) - .height(Length::Fixed(95.0)) + .height(90) .align_y(Vertical::Center) - .width(Length::Fill) .style(ContainerType::Gradient(color_gradient)) } -fn get_button_reset( - font: Font, - language: Language, -) -> Tooltip<'static, Message, Renderer> { +fn get_button_reset(font: Font, language: Language) -> Tooltip<'static, Message, StyleType> { let content = button( Icon::ArrowBack .to_text() .size(20) .horizontal_alignment(Horizontal::Center) - .vertical_alignment(Vertical::Center), + .vertical_alignment(Vertical::Center) + .line_height(LineHeight::Relative(1.0)), ) .padding(10) - .height(Length::Fixed(40.0)) - .width(Length::Fixed(60.0)) + .height(40) + .width(60) .on_press(Message::ResetButtonPressed); Tooltip::new( content, - quit_analysis_translation(language), + Text::new(quit_analysis_translation(language)).font(font), Position::Right, ) .gap(5) - .font(font) .style(ContainerType::Tooltip) } @@ -88,7 +78,7 @@ pub fn get_button_settings( font: Font, language: Language, open_overlay: SettingsPage, -) -> Tooltip<'static, Message, Renderer> { +) -> Tooltip<'static, Message, StyleType> { let content = button( Icon::Settings .to_text() @@ -97,12 +87,15 @@ pub fn get_button_settings( .vertical_alignment(Vertical::Center), ) .padding(0) - .height(Length::Fixed(40.0)) - .width(Length::Fixed(60.0)) + .height(40) + .width(60) .on_press(Message::OpenSettings(open_overlay)); - Tooltip::new(content, settings_translation(language), Position::Left) - .gap(5) - .font(font) - .style(ContainerType::Tooltip) + Tooltip::new( + content, + Text::new(settings_translation(language)).font(font), + Position::Left, + ) + .gap(5) + .style(ContainerType::Tooltip) } diff --git a/src/gui/components/modal.rs b/src/gui/components/modal.rs index eb35b803..729a7cc6 100644 --- a/src/gui/components/modal.rs +++ b/src/gui/components/modal.rs @@ -4,11 +4,8 @@ use iced::advanced::renderer; use iced::advanced::widget::{self, Widget}; use iced::advanced::{self, Clipboard, Shell}; use iced::alignment::{Alignment, Horizontal, Vertical}; -use iced::widget::{button, horizontal_space, vertical_space, Column, Container, Row, Text}; -use iced::{ - event, mouse, BorderRadius, Color, Element, Event, Font, Length, Point, Rectangle, Renderer, - Size, -}; +use iced::widget::{button, horizontal_space, Column, Container, Row, Space, Text}; +use iced::{event, mouse, Color, Element, Event, Font, Length, Point, Rectangle, Size, Vector}; use crate::gui::components::button::button_hide; use crate::gui::styles::button::ButtonType; @@ -27,7 +24,7 @@ pub fn get_exit_overlay( font: Font, font_headers: Font, language: Language, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let row_buttons = confirm_button_row(language, font, Message::Reset); let content = Column::new() @@ -40,7 +37,7 @@ pub fn get_exit_overlay( language, quit_analysis_translation(language), )) - .push(vertical_space(Length::Fixed(20.0))) + .push(Space::with_height(20)) .push( ask_quit_translation(language) .horizontal_alignment(Horizontal::Center) @@ -49,8 +46,8 @@ pub fn get_exit_overlay( .push(row_buttons); Container::new(content) - .height(Length::Fixed(160.0)) - .width(Length::Fixed(450.0)) + .height(160) + .width(450) .style(ContainerType::Modal) } @@ -59,7 +56,7 @@ pub fn get_clear_all_overlay( font: Font, font_headers: Font, language: Language, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let row_buttons = confirm_button_row(language, font, Message::ClearAllNotifications); let content = Column::new() @@ -72,7 +69,7 @@ pub fn get_clear_all_overlay( language, clear_all_translation(language), )) - .push(vertical_space(Length::Fixed(20.0))) + .push(Space::with_height(20)) .push( ask_clear_all_translation(language) .horizontal_alignment(Horizontal::Center) @@ -81,8 +78,8 @@ pub fn get_clear_all_overlay( .push(row_buttons); Container::new(content) - .height(Length::Fixed(160.0)) - .width(Length::Fixed(450.0)) + .height(160) + .width(450) .style(ContainerType::Modal) } @@ -92,10 +89,10 @@ fn get_modal_header( color_gradient: GradientType, language: Language, title: String, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { Container::new( Row::new() - .push(horizontal_space(Length::FillPortion(1))) + .push(horizontal_space()) .push( Text::new(title) .font(font_headers) @@ -105,13 +102,13 @@ fn get_modal_header( ) .push( Container::new(button_hide(Message::HideModal, language, font)) - .width(Length::FillPortion(1)) + .width(Length::Fill) .align_x(Horizontal::Center), ), ) .align_x(Horizontal::Center) .align_y(Vertical::Center) - .height(Length::Fixed(40.0)) + .height(40) .width(Length::Fill) .style(ContainerType::Gradient(color_gradient)) } @@ -120,7 +117,7 @@ fn confirm_button_row( language: Language, font: Font, message: Message, -) -> Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { Row::new() .height(Length::Fill) .align_items(Alignment::Center) @@ -132,30 +129,29 @@ fn confirm_button_row( .horizontal_alignment(Horizontal::Center), ) .padding(5) - .height(Length::Fixed(40.0)) - .width(Length::Fixed(80.0)) + .height(40) + .width(80) .style(ButtonType::Alert) .on_press(message), ) } -/// A widget that centers a modal element over some base element -pub struct Modal<'a, Message, Renderer> { - base: Element<'a, Message, Renderer>, - #[allow(clippy::struct_field_names)] - modal: Element<'a, Message, Renderer>, +/// A widget that centers an overlay element over some base element +pub struct Modal<'a, Message, Theme, Renderer> { + base: Element<'a, Message, Theme, Renderer>, + overlay: Element<'a, Message, Theme, Renderer>, on_blur: Option, } -impl<'a, Message, Renderer> Modal<'a, Message, Renderer> { +impl<'a, Message, Theme, Renderer> Modal<'a, Message, Theme, Renderer> { /// Returns a new [`Modal`] pub fn new( - base: impl Into>, - modal: impl Into>, + base: impl Into>, + modal: impl Into>, ) -> Self { Self { base: base.into(), - modal: modal.into(), + overlay: modal.into(), on_blur: None, } } @@ -170,7 +166,8 @@ impl<'a, Message, Renderer> Modal<'a, Message, Renderer> { } } -impl<'a, Message, Renderer> Widget for Modal<'a, Message, Renderer> +impl<'a, Message, Theme, Renderer> Widget + for Modal<'a, Message, Theme, Renderer> where Renderer: advanced::Renderer, Message: Clone, @@ -178,24 +175,27 @@ where fn children(&self) -> Vec { vec![ widget::Tree::new(&self.base), - widget::Tree::new(&self.modal), + widget::Tree::new(&self.overlay), ] } fn diff(&self, tree: &mut widget::Tree) { - tree.diff_children(&[&self.base, &self.modal]); - } - - fn width(&self) -> Length { - self.base.as_widget().width() + tree.diff_children(&[&self.base, &self.overlay]); } - fn height(&self) -> Length { - self.base.as_widget().height() + fn size(&self) -> Size { + self.base.as_widget().size() } - fn layout(&self, renderer: &Renderer, limits: &layout::Limits) -> layout::Node { - self.base.as_widget().layout(renderer, limits) + fn layout( + &self, + tree: &mut widget::Tree, + renderer: &Renderer, + limits: &layout::Limits, + ) -> layout::Node { + self.base + .as_widget() + .layout(&mut tree.children[0], renderer, limits) } fn on_event( @@ -225,7 +225,7 @@ where &self, state: &widget::Tree, renderer: &mut Renderer, - theme: &::Theme, + theme: &Theme, style: &renderer::Style, layout: Layout<'_>, cursor: mouse::Cursor, @@ -247,16 +247,15 @@ where state: &'b mut widget::Tree, layout: Layout<'_>, _renderer: &Renderer, - ) -> Option> { - Some(overlay::Element::new( - layout.position(), - Box::new(Overlay { - content: &mut self.modal, - tree: &mut state.children[1], - size: layout.bounds().size(), - on_blur: self.on_blur.clone(), - }), - )) + translation: Vector, + ) -> Option> { + Some(overlay::Element::new(Box::new(Overlay { + position: layout.position() + translation, + content: &mut self.overlay, + tree: &mut state.children[1], + size: layout.bounds().size(), + on_blur: self.on_blur.clone(), + }))) } fn mouse_interaction( @@ -289,31 +288,32 @@ where } } -struct Overlay<'a, 'b, Message, Renderer> { - content: &'b mut Element<'a, Message, Renderer>, +struct Overlay<'a, 'b, Message, Theme, Renderer> { + position: Point, + content: &'b mut Element<'a, Message, Theme, Renderer>, tree: &'b mut widget::Tree, size: Size, on_blur: Option, } -impl<'a, 'b, Message, Renderer> overlay::Overlay - for Overlay<'a, 'b, Message, Renderer> +impl<'a, 'b, Message, Theme, Renderer> overlay::Overlay + for Overlay<'a, 'b, Message, Theme, Renderer> where Renderer: advanced::Renderer, Message: Clone, { - fn layout(&self, renderer: &Renderer, _bounds: Size, position: Point) -> layout::Node { + fn layout(&mut self, renderer: &Renderer, _bounds: Size) -> layout::Node { let limits = layout::Limits::new(Size::ZERO, self.size) .width(Length::Fill) .height(Length::Fill); - let mut child = self.content.as_widget().layout(renderer, &limits); - child.align(Alignment::Center, Alignment::Center, limits.max()); - - let mut node = layout::Node::with_children(self.size, vec![child]); - node.move_to(position); + let child = self + .content + .as_widget() + .layout(self.tree, renderer, &limits) + .align(Alignment::Center, Alignment::Center, limits.max()); - node + layout::Node::with_children(self.size, vec![child]).move_to(self.position) } fn on_event( @@ -351,7 +351,7 @@ where fn draw( &self, renderer: &mut Renderer, - theme: &Renderer::Theme, + theme: &Theme, style: &renderer::Style, layout: Layout<'_>, cursor: mouse::Cursor, @@ -359,9 +359,7 @@ where renderer.fill_quad( renderer::Quad { bounds: layout.bounds(), - border_radius: BorderRadius::default(), - border_width: 0.0, - border_color: Color::TRANSPARENT, + ..renderer::Quad::default() }, Color { a: 0.80, @@ -414,19 +412,24 @@ where &'c mut self, layout: Layout<'_>, renderer: &Renderer, - ) -> Option> { - self.content - .as_widget_mut() - .overlay(self.tree, layout.children().next().unwrap(), renderer) + ) -> Option> { + self.content.as_widget_mut().overlay( + self.tree, + layout.children().next().unwrap(), + renderer, + Vector::ZERO, + ) } } -impl<'a, Message, Renderer> From> for Element<'a, Message, Renderer> +impl<'a, Message, Theme, Renderer> From> + for Element<'a, Message, Theme, Renderer> where - Renderer: 'a + advanced::Renderer, + Theme: 'a, Message: 'a + Clone, + Renderer: 'a + advanced::Renderer, { - fn from(modal: Modal<'a, Message, Renderer>) -> Self { + fn from(modal: Modal<'a, Message, Theme, Renderer>) -> Self { Element::new(modal) } } diff --git a/src/gui/components/tab.rs b/src/gui/components/tab.rs index 12168141..f3509563 100644 --- a/src/gui/components/tab.rs +++ b/src/gui/components/tab.rs @@ -1,8 +1,9 @@ //! Tab buttons to be used in the various pages just under the header use iced::alignment::Vertical; -use iced::widget::{button, horizontal_space, Button, Container, Row, Text}; -use iced::{alignment, Alignment, Font, Length, Renderer}; +use iced::widget::text::LineHeight; +use iced::widget::{button, horizontal_space, Button, Container, Row, Space, Text}; +use iced::{alignment, Alignment, Font, Length}; use crate::gui::pages::types::settings_page::SettingsPage; use crate::gui::styles::button::ButtonType; @@ -16,7 +17,7 @@ pub fn get_settings_tabs( active: SettingsPage, font: Font, language: Language, -) -> Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { let mut tabs = Row::new() .width(Length::Fill) .align_items(Alignment::Start) @@ -36,7 +37,7 @@ pub fn get_pages_tabs( font_headers: Font, language: Language, unread_notifications: usize, -) -> Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { let mut tabs = Row::new() .width(Length::Fill) .align_items(Alignment::Start) @@ -69,10 +70,11 @@ fn new_page_tab( font: Font, font_headers: Font, unread: Option, -) -> Button<'static, Message, Renderer> { +) -> Button<'static, Message, StyleType> { let mut content = Row::new() + .height(Length::Fill) .align_items(Alignment::Center) - .push(horizontal_space(Length::FillPortion(1))) + .push(horizontal_space()) .push( page.icon() .size(15) @@ -84,7 +86,7 @@ fn new_page_tab( .horizontal_alignment(alignment::Horizontal::Center) .vertical_alignment(alignment::Vertical::Center), ) - .push(horizontal_space(10)) + .push(Space::with_width(10)) .push( Text::new(page.get_tab_label(language).to_string()) .font(font) @@ -100,24 +102,26 @@ fn new_page_tab( if let Some(num) = unread { if num > 0 { - let notifications_badge = - Container::new(Text::new(num.to_string()).font(font_headers).size(14)) - .align_y(Vertical::Center) - .padding([2, 4]) - .height(Length::Fixed(20.0)) - .style(ContainerType::Highlighted); - content = content - .push(horizontal_space(Length::Fixed(7.0))) - .push(notifications_badge); + let notifications_badge = Container::new( + Text::new(num.to_string()) + .font(font_headers) + .size(14) + .line_height(LineHeight::Relative(1.0)), + ) + .align_y(Vertical::Center) + .padding([2, 4]) + .height(20) + .style(ContainerType::Highlighted); + content = content.push(Space::with_width(7)).push(notifications_badge); } } - content = content.push(horizontal_space(Length::FillPortion(1))); + content = content.push(horizontal_space()); button(content) - .height(Length::Fixed(if active { 35.0 } else { 30.0 })) + .height(if active { 35 } else { 30 }) .padding(0) - .width(Length::FillPortion(1)) + .width(Length::Fill) .style(if active { ButtonType::TabActive } else { @@ -131,10 +135,11 @@ fn new_settings_tab( active: bool, language: Language, font: Font, -) -> Button<'static, Message, Renderer> { +) -> Button<'static, Message, StyleType> { let content = Row::new() + .height(Length::Fill) .align_items(Alignment::Center) - .push(horizontal_space(Length::FillPortion(1))) + .push(horizontal_space()) .push( page.icon() .size(15) @@ -146,7 +151,7 @@ fn new_settings_tab( .horizontal_alignment(alignment::Horizontal::Center) .vertical_alignment(alignment::Vertical::Center), ) - .push(horizontal_space(10)) + .push(Space::with_width(10)) .push( Text::new(page.get_tab_label(language).to_string()) .font(font) @@ -159,12 +164,12 @@ fn new_settings_tab( .horizontal_alignment(alignment::Horizontal::Center) .vertical_alignment(alignment::Vertical::Center), ) - .push(horizontal_space(Length::FillPortion(1))); + .push(horizontal_space()); button(content) - .height(Length::Fixed(if active { 35.0 } else { 30.0 })) + .height(if active { 35 } else { 30 }) .padding(0) - .width(Length::FillPortion(1)) + .width(Length::Fill) .style(if active { ButtonType::TabActive } else { diff --git a/src/gui/pages/connection_details_page.rs b/src/gui/pages/connection_details_page.rs index ee9c67d1..470e00ed 100644 --- a/src/gui/pages/connection_details_page.rs +++ b/src/gui/pages/connection_details_page.rs @@ -5,8 +5,7 @@ use iced::widget::scrollable::Direction; use iced::widget::tooltip::Position; use iced::widget::{button, horizontal_space, lazy, vertical_space, Rule, Scrollable}; use iced::widget::{Column, Container, Row, Text, Tooltip}; -use iced::Length::Fixed; -use iced::{Alignment, Font, Length, Renderer}; +use iced::{Alignment, Font, Length}; use crate::countries::country_utils::{get_computer_tooltip, get_flag_tooltip}; use crate::countries::flags_pictures::FLAGS_WIDTH_BIG; @@ -45,7 +44,7 @@ use crate::{ByteMultiple, ConfigSettings, Language, Protocol, Sniffer, StyleType pub fn connection_details_page( sniffer: &Sniffer, key: AddressPortPair, -) -> Container> { +) -> Container { Container::new(lazy( ( sniffer.runtime_data.tot_out_packets + sniffer.runtime_data.tot_in_packets, @@ -59,7 +58,7 @@ pub fn connection_details_page( fn page_content( sniffer: &Sniffer, key: &AddressPortPair, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let ConfigSettings { style, language, @@ -149,8 +148,8 @@ fn page_content( let content = assemble_widgets(col_info, source_col, dest_col); Container::new(header_and_content.push(content)) - .width(Length::Fixed(1000.0)) - .height(Length::Fixed(500.0)) + .width(1000) + .height(500) .style(ContainerType::Modal) } @@ -159,10 +158,10 @@ fn page_header( font_headers: Font, color_gradient: GradientType, language: Language, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { Container::new( Row::new() - .push(horizontal_space(Length::FillPortion(1))) + .push(horizontal_space()) .push( Text::new(connection_details_translation(language)) .font(font_headers) @@ -172,13 +171,13 @@ fn page_header( ) .push( Container::new(button_hide(Message::HideModal, language, font)) - .width(Length::FillPortion(1)) + .width(Length::Fill) .align_x(Horizontal::Center), ), ) .align_x(Horizontal::Center) .align_y(Vertical::Center) - .height(Fixed(40.0)) + .height(40.0) .width(Length::Fill) .style(ContainerType::Gradient(color_gradient)) } @@ -188,14 +187,14 @@ fn col_info( val: &InfoAddressPortPair, font: Font, language: Language, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let is_icmp = key.protocol.eq(&Protocol::ICMP); let mut ret_val = Column::new() .spacing(10) .padding([20, 10, 20, 40]) .width(Length::FillPortion(2)) - .push(vertical_space(Length::FillPortion(1))) + .push(vertical_space()) .push( Row::new().spacing(5).push(Icon::Clock.to_text()).push( Text::new(format!( @@ -260,7 +259,7 @@ fn col_info( ); } - ret_val = ret_val.push(vertical_space(Length::FillPortion(1))); + ret_val = ret_val.push(vertical_space()); ret_val } @@ -270,7 +269,7 @@ fn get_host_info_col( host: &Host, font: Font, language: Language, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let mut host_info_col = Column::new().spacing(4); if r_dns.parse::().is_err() || (!host.asn.name.is_empty() && host.asn.number > 0) { host_info_col = host_info_col.push(Rule::horizontal(10.0)); @@ -296,7 +295,7 @@ fn get_local_tooltip( sniffer: &Sniffer, address_to_lookup: &str, key: &AddressPortPair, -) -> Tooltip<'static, Message, Renderer> { +) -> Tooltip<'static, Message, StyleType> { let ConfigSettings { style, language, .. } = sniffer.configs.lock().unwrap().settings; @@ -325,14 +324,14 @@ fn get_local_tooltip( } fn get_src_or_dest_col( - caption: Row<'static, Message, Renderer>, + caption: Row<'static, Message, StyleType>, ip: &String, port: Option, mac: &Option, font: Font, language: Language, timing_events: &TimingEvents, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let address_caption = if port.is_some() { socket_address_translation(language) } else { @@ -368,10 +367,10 @@ fn get_src_or_dest_col( } fn assemble_widgets( - col_info: Column<'static, Message, Renderer>, - source_col: Column<'static, Message, Renderer>, - dest_col: Column<'static, Message, Renderer>, -) -> Row<'static, Message, Renderer> { + col_info: Column<'static, Message, StyleType>, + source_col: Column<'static, Message, StyleType>, + dest_col: Column<'static, Message, StyleType>, +) -> Row<'static, Message, StyleType> { let [source_container, dest_container] = [source_col, dest_col].map(|col| { Container::new(col) .padding(7) @@ -390,11 +389,11 @@ fn assemble_widgets( .width(Length::FillPortion(3)) .align_items(Alignment::Center) .spacing(5) - .push(vertical_space(Length::FillPortion(1))) + .push(vertical_space()) .push(source_container) .push(Icon::ArrowsDown.to_text()) .push(dest_container) - .push(vertical_space(Length::FillPortion(1))), + .push(vertical_space()), ) } @@ -403,7 +402,7 @@ fn get_button_copy( font: Font, string: &String, timing_events: &TimingEvents, -) -> Tooltip<'static, Message, Renderer> { +) -> Tooltip<'static, Message, StyleType> { let icon = if timing_events.was_just_copy_ip(string) { Text::new("✔").font(font).size(14) } else { @@ -415,16 +414,15 @@ fn get_button_copy( .vertical_alignment(Vertical::Center), ) .padding(0) - .height(Length::Fixed(25.0)) - .width(Length::Fixed(25.0)) + .height(25) + .width(25) .on_press(Message::CopyIp(string.clone())); Tooltip::new( content, - format!("{} (IP)", copy_translation(language)), + Text::new(format!("{} (IP)", copy_translation(language))).font(font), Position::Right, ) .gap(5) - .font(font) .style(ContainerType::Tooltip) } diff --git a/src/gui/pages/initial_page.rs b/src/gui/pages/initial_page.rs index c83ab884..c100a927 100644 --- a/src/gui/pages/initial_page.rs +++ b/src/gui/pages/initial_page.rs @@ -8,11 +8,10 @@ use iced::alignment::{Horizontal, Vertical}; use iced::widget::scrollable::Direction; use iced::widget::tooltip::Position; use iced::widget::{ - button, horizontal_space, vertical_space, Button, Column, Container, Row, Rule, Scrollable, - Text, TextInput, Tooltip, + button, Button, Column, Container, Row, Rule, Scrollable, Space, Text, TextInput, Tooltip, }; use iced::Length::FillPortion; -use iced::{alignment, Font, Length, Renderer}; +use iced::{alignment, Font, Length}; use pcap::Device; use crate::gui::styles::button::ButtonType; @@ -37,7 +36,7 @@ use crate::utils::types::icon::Icon; use crate::{ConfigSettings, IpVersion, Language, Protocol, StyleType}; /// Computes the body of gui initial page -pub fn initial_page(sniffer: &Sniffer) -> Container> { +pub fn initial_page(sniffer: &Sniffer) -> Container { let ConfigSettings { style, language, @@ -96,10 +95,10 @@ pub fn initial_page(sniffer: &Sniffer) -> Container .align_x(Horizontal::Center), ); - let body = Column::new().push(vertical_space(Length::Fixed(5.0))).push( + let body = Column::new().push(Space::with_height(5)).push( Row::new() .push(col_adapter) - .push(horizontal_space(Length::Fixed(30.0))) + .push(Space::with_width(30)) .push(filters_pane), ); @@ -110,7 +109,7 @@ fn col_ip_buttons( active_ip_filters: &HashSet, font: Font, language: Language, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let mut buttons_row = Row::new().spacing(5).padding([0, 0, 0, 5]); for option in IpVersion::ALL { let is_active = active_ip_filters.contains(&option); @@ -122,8 +121,8 @@ fn col_ip_buttons( .vertical_alignment(Vertical::Center) .font(font), ) - .width(Length::Fixed(90.0)) - .height(Length::Fixed(35.0)) + .width(90) + .height(35) .style(if is_active { ButtonType::BorderedRoundSelected } else { @@ -149,7 +148,7 @@ fn col_protocol_buttons( active_protocol_filters: &HashSet, font: Font, language: Language, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let mut buttons_row = Row::new().spacing(5).padding([0, 0, 0, 5]); for option in Protocol::ALL { let is_active = active_protocol_filters.contains(&option); @@ -157,13 +156,12 @@ fn col_protocol_buttons( buttons_row = buttons_row.push( Button::new( Text::new(format!("{option} {check_symbol}")) - .width(Length::Fill) .horizontal_alignment(Horizontal::Center) .vertical_alignment(Vertical::Center) .font(font), ) - .width(Length::Fixed(90.0)) - .height(Length::Fixed(35.0)) + .width(90) + .height(35) .style(if is_active { ButtonType::BorderedRoundSelected } else { @@ -189,7 +187,7 @@ fn col_address_input( value: &str, font: Font, language: Language, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let is_error = if value.is_empty() { false } else { @@ -200,7 +198,7 @@ fn col_address_input( .padding([3, 5]) .on_input(Message::AddressFilter) .font(font) - .width(Length::Fixed(310.0)) + .width(310) .style(if is_error { TextInputType::Error } else { @@ -224,7 +222,7 @@ fn col_port_input( value: &str, font: Font, language: Language, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let is_error = if value.is_empty() { false } else { @@ -235,7 +233,7 @@ fn col_port_input( .padding([3, 5]) .on_input(Message::PortFilter) .font(font) - .width(Length::Fixed(180.0)) + .width(180) .style(if is_error { TextInputType::Error } else { @@ -260,7 +258,7 @@ fn button_start( language: Language, color_gradient: GradientType, filters: &Filters, -) -> Tooltip<'static, Message, Renderer> { +) -> Tooltip<'static, Message, StyleType> { let mut content = button( Icon::Rocket .to_text() @@ -269,8 +267,8 @@ fn button_start( .vertical_alignment(alignment::Vertical::Center), ) .padding(10) - .height(Length::Fixed(80.0)) - .width(Length::Fixed(160.0)) + .height(80) + .width(160) .style(ButtonType::Gradient(color_gradient)); let mut tooltip = start_translation(language).to_string(); @@ -284,13 +282,12 @@ fn button_start( position = Position::FollowCursor; } - Tooltip::new(content, tooltip, position) + Tooltip::new(content, Text::new(tooltip).font(font), position) .gap(5) - .font(font) .style(ContainerType::Tooltip) } -fn get_col_adapter(sniffer: &Sniffer, font: Font) -> Column> { +fn get_col_adapter(sniffer: &Sniffer, font: Font) -> Column { let ConfigSettings { language, .. } = sniffer.configs.lock().unwrap().settings; let mut dev_str_list = vec![]; diff --git a/src/gui/pages/inspect_page.rs b/src/gui/pages/inspect_page.rs index 32b4f3e2..c8cfb98e 100644 --- a/src/gui/pages/inspect_page.rs +++ b/src/gui/pages/inspect_page.rs @@ -2,11 +2,14 @@ use std::cmp::min; use iced::alignment::{Horizontal, Vertical}; use iced::widget::scrollable::Direction; +use iced::widget::text::LineHeight; use iced::widget::text_input::Side; use iced::widget::tooltip::Position; -use iced::widget::{button, horizontal_space, text_input, vertical_space, Rule, Toggler, Tooltip}; +use iced::widget::{ + button, horizontal_space, text_input, vertical_space, Rule, Space, Toggler, Tooltip, +}; use iced::widget::{lazy, Button, Column, Container, Row, Scrollable, Text, TextInput}; -use iced::{alignment, Alignment, Font, Length, Renderer}; +use iced::{alignment, Alignment, Font, Length, Pixels}; use crate::gui::components::tab::get_pages_tabs; use crate::gui::components::types::my_modal::MyModal; @@ -32,7 +35,7 @@ use crate::utils::types::icon::Icon; use crate::{ConfigSettings, Language, ReportSortType, RunningPage, Sniffer, StyleType}; /// Computes the body of gui inspect page -pub fn inspect_page(sniffer: &Sniffer) -> Container> { +pub fn inspect_page(sniffer: &Sniffer) -> Container { let ConfigSettings { style, language, .. } = sniffer.configs.lock().unwrap().settings; @@ -79,7 +82,7 @@ pub fn inspect_page(sniffer: &Sniffer) -> Container font, sniffer.report_sort_type, )) - .push(vertical_space(4)) + .push(Space::with_height(4)) .push(Rule::horizontal(5)) .push(report); @@ -94,14 +97,14 @@ pub fn inspect_page(sniffer: &Sniffer) -> Container .align_y(Vertical::Center) .align_x(Horizontal::Center) .padding([10, 7, 3, 7]) - .width(Length::Fixed(1042.0)) + .width(1042) .style(ContainerType::BorderedRound), ); Container::new(Column::new().push(tab_and_body.push(body))).height(Length::Fill) } -fn lazy_report(sniffer: &Sniffer) -> Column<'static, Message, Renderer> { +fn lazy_report(sniffer: &Sniffer) -> Column<'static, Message, StyleType> { let ConfigSettings { style, language, .. } = sniffer.configs.lock().unwrap().settings; @@ -151,11 +154,11 @@ fn lazy_report(sniffer: &Sniffer) -> Column<'static, Message, Renderer Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { let mut ret_val = Row::new().padding([0, 2]).align_items(Alignment::Center); for report_col in ReportCol::ALL { let (title_display, title_small_display, tooltip_val) = @@ -185,14 +188,17 @@ fn report_header_row( } else { ContainerType::Tooltip }; - let title_tooltip = Tooltip::new(title_row, tooltip_val, Position::FollowCursor) - .font(font) - .style(tooltip_style); + let title_tooltip = Tooltip::new( + title_row, + Text::new(tooltip_val).font(font), + Position::FollowCursor, + ) + .style(tooltip_style); let mut col_header = Column::new() .align_items(Alignment::Center) - .width(Length::Fixed(report_col.get_width())) - .height(Length::Fixed(56.0)) + .width(report_col.get_width()) + .height(56) .push(title_tooltip); if report_col != ReportCol::Packets && report_col != ReportCol::Bytes { col_header = col_header.push( @@ -250,7 +256,7 @@ fn title_report_col_display( fn sort_arrows( active_sort_type: ReportSortType, report_col: &ReportCol, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { Container::new( button( active_sort_type @@ -271,7 +277,7 @@ fn row_report_entry( key: &AddressPortPair, val: &InfoAddressPortPair, font: Font, -) -> Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { let text_type = if val.traffic_direction == TrafficDirection::Outgoing { TextType::Outgoing } else { @@ -294,7 +300,7 @@ fn row_report_entry( .style(text_type), ) .align_x(Horizontal::Center) - .width(Length::Fixed(report_col.get_width())), + .width(report_col.get_width()), ); } ret_val @@ -304,7 +310,7 @@ fn host_filters_col( search_params: &SearchParameters, font: Font, language: Language, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let search_params2 = search_params.clone(); let mut title_row = Row::new().spacing(10).align_items(Alignment::Center).push( @@ -320,12 +326,12 @@ fn host_filters_col( )); } - let input_country = filter_input(FilterInputType::Country, search_params.clone(), font) - .width(Length::Fixed(95.0)); - let input_domain = filter_input(FilterInputType::Domain, search_params.clone(), font) - .width(Length::Fixed(190.0)); - let input_as_name = filter_input(FilterInputType::AsName, search_params.clone(), font) - .width(Length::Fixed(190.0)); + let input_country = + filter_input(FilterInputType::Country, search_params.clone(), font).width(95); + let input_domain = + filter_input(FilterInputType::Domain, search_params.clone(), font).width(190); + let input_as_name = + filter_input(FilterInputType::AsName, search_params.clone(), font).width(190); let container_country = Row::new() .spacing(5) @@ -378,7 +384,7 @@ fn host_filters_col( Column::new() .align_items(Alignment::Start) .push(title_row) - .push(vertical_space(10)) + .push(Space::with_height(10)) .push( Row::new() .align_items(Alignment::Center) @@ -392,7 +398,7 @@ fn filter_input( filter_input_type: FilterInputType, search_params: SearchParameters, font: Font, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let filter_value = filter_input_type.current_value(&search_params); let is_filter_active = !filter_value.is_empty(); @@ -416,7 +422,7 @@ fn filter_input( input = input.icon(text_input::Icon { font: ICONS, code_point: Icon::Funnel.codepoint(), - size: Some(12.0), + size: Some(Pixels(12.0)), spacing: 2.0, side: Side::Left, }); @@ -444,7 +450,7 @@ fn filter_input( }) } -fn get_button_change_page(increment: bool) -> Button<'static, Message, Renderer> { +fn get_button_change_page(increment: bool) -> Button<'static, Message, StyleType> { button( if increment { Icon::ArrowRight @@ -457,8 +463,8 @@ fn get_button_change_page(increment: bool) -> Button<'static, Message, Renderer< .vertical_alignment(alignment::Vertical::Center), ) .padding(2) - .height(Length::Fixed(20.0)) - .width(Length::Fixed(25.0)) + .height(20) + .width(25) .on_press(Message::UpdatePageNumber(increment)) } @@ -469,16 +475,16 @@ fn get_change_page_row( start_entry_num: usize, end_entry_num: usize, results_number: usize, -) -> Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { Row::new() - .height(Length::Fixed(40.0)) + .height(40) .align_items(Alignment::Center) .spacing(10) - .push(horizontal_space(Length::Fill)) + .push(horizontal_space()) .push(if page_number > 1 { - Container::new(get_button_change_page(false).width(25.0)) + Container::new(get_button_change_page(false).width(25)) } else { - Container::new(horizontal_space(25.0)) + Container::new(Space::with_width(25)) }) .push( Text::new(showing_results_translation( @@ -490,27 +496,28 @@ fn get_change_page_row( .font(font), ) .push(if page_number < (results_number + 20 - 1) / 20 { - Container::new(get_button_change_page(true).width(25.0)) + Container::new(get_button_change_page(true).width(25)) } else { - Container::new(horizontal_space(25.0)) + Container::new(Space::with_width(25)) }) - .push(horizontal_space(Length::Fill)) + .push(horizontal_space()) } fn button_clear_filter( new_search_parameters: SearchParameters, font: Font, -) -> Button<'static, Message, Renderer> { +) -> Button<'static, Message, StyleType> { button( Text::new("×") .font(font) .vertical_alignment(Vertical::Center) .horizontal_alignment(Horizontal::Center) - .size(15), + .size(15) + .line_height(LineHeight::Relative(1.0)), ) .padding(2) - .height(Length::Fixed(20.0)) - .width(Length::Fixed(20.0)) + .height(20) + .width(20) .on_press(Message::Search(new_search_parameters)) } diff --git a/src/gui/pages/notifications_page.rs b/src/gui/pages/notifications_page.rs index d114f019..ac138ef2 100644 --- a/src/gui/pages/notifications_page.rs +++ b/src/gui/pages/notifications_page.rs @@ -1,10 +1,11 @@ use iced::alignment::{Horizontal, Vertical}; use iced::widget::scrollable::Direction; +use iced::widget::text::LineHeight; use iced::widget::tooltip::Position; -use iced::widget::{button, vertical_space}; +use iced::widget::{button, vertical_space, Space}; use iced::widget::{lazy, Column, Container, Row, Scrollable, Text, Tooltip}; use iced::Length::FillPortion; -use iced::{Alignment, Font, Length, Renderer}; +use iced::{Alignment, Font, Length}; use crate::countries::country_utils::get_flag_tooltip; use crate::countries::flags_pictures::FLAGS_WIDTH_BIG; @@ -31,7 +32,7 @@ use crate::utils::types::icon::Icon; use crate::{ByteMultiple, ConfigSettings, Language, RunningPage, Sniffer, StyleType}; /// Computes the body of gui notifications page -pub fn notifications_page(sniffer: &Sniffer) -> Container> { +pub fn notifications_page(sniffer: &Sniffer) -> Container { let ConfigSettings { style, language, @@ -53,9 +54,7 @@ pub fn notifications_page(sniffer: &Sniffer) -> Container Container Container Container Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { Column::new() .padding(5) .spacing(5) .align_items(Alignment::Center) .width(Length::Fill) - .push(vertical_space(FillPortion(1))) + .push(vertical_space()) .push( no_notifications_set_translation(language) .horizontal_alignment(Horizontal::Center) @@ -128,34 +127,34 @@ fn body_no_notifications_set( language, SettingsPage::Notifications, )) - .push(vertical_space(FillPortion(2))) + .push(Space::with_height(FillPortion(2))) } fn body_no_notifications_received( font: Font, language: Language, waiting: &str, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { Column::new() .padding(5) .spacing(5) .align_items(Alignment::Center) .width(Length::Fill) - .push(vertical_space(FillPortion(1))) + .push(vertical_space()) .push( no_notifications_received_translation(language) .horizontal_alignment(Horizontal::Center) .font(font), ) .push(Text::new(waiting.to_owned()).font(font).size(50)) - .push(vertical_space(FillPortion(2))) + .push(Space::with_height(FillPortion(2))) } fn packets_notification_log( logged_notification: PacketsThresholdExceeded, language: Language, font: Font, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let threshold_str = format!( "{}: {} {}", threshold_translation(language), @@ -176,17 +175,19 @@ fn packets_notification_log( .spacing(30) .push( Tooltip::new( - Icon::PacketsThreshold.to_text().size(80), - packets_exceeded_translation(language), + Icon::PacketsThreshold + .to_text() + .size(80) + .line_height(LineHeight::Relative(1.0)), + Text::new(packets_exceeded_translation(language)).font(font), Position::FollowCursor, ) - .font(font) .style(ContainerType::Tooltip), ) .push( Column::new() .spacing(7) - .width(Length::Fixed(250.0)) + .width(250) .push( Row::new() .spacing(5) @@ -219,8 +220,8 @@ fn packets_notification_log( .push(Text::new(outgoing_str).font(font)), ); Container::new(content) - .height(Length::Fixed(120.0)) - .width(Length::Fixed(800.0)) + .height(120) + .width(800) .padding(10) .style(ContainerType::BorderedRound) } @@ -229,7 +230,7 @@ fn bytes_notification_log( logged_notification: BytesThresholdExceeded, language: Language, font: Font, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let mut threshold_str = threshold_translation(language); threshold_str.push_str(": "); threshold_str.push_str(&ByteMultiple::formatted_string( @@ -255,17 +256,19 @@ fn bytes_notification_log( .height(Length::Fill) .push( Tooltip::new( - Icon::BytesThreshold.to_text().size(80), - bytes_exceeded_translation(language), + Icon::BytesThreshold + .to_text() + .size(80) + .line_height(LineHeight::Relative(1.0)), + Text::new(bytes_exceeded_translation(language)).font(font), Position::FollowCursor, ) - .font(font) .style(ContainerType::Tooltip), ) .push( Column::new() .spacing(7) - .width(Length::Fixed(250.0)) + .width(250) .push( Row::new() .spacing(5) @@ -300,8 +303,8 @@ fn bytes_notification_log( .push(Text::new(outgoing_str).font(font)), ); Container::new(content) - .height(Length::Fixed(120.0)) - .width(Length::Fixed(800.0)) + .height(120) + .width(800) .padding(10) .style(ContainerType::BorderedRound) } @@ -310,7 +313,7 @@ fn favorite_notification_log( logged_notification: FavoriteTransmitted, language: Language, font: Font, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let country = logged_notification.host.country; let asn = &logged_notification.host.asn; @@ -337,16 +340,19 @@ fn favorite_notification_log( .height(Length::Fill) .push( Tooltip::new( - Icon::Star.to_text().size(80).style(TextType::Starred), - favorite_transmitted_translation(language), + Icon::Star + .to_text() + .size(80) + .style(TextType::Starred) + .line_height(LineHeight::Relative(1.0)), + Text::new(favorite_transmitted_translation(language)).font(font), Position::FollowCursor, ) - .font(font) .style(ContainerType::Tooltip), ) .push( Column::new() - .width(Length::Fixed(250.0)) + .width(250) .spacing(7) .push( Row::new() @@ -367,16 +373,13 @@ fn favorite_notification_log( .push(row_flag_details), ); Container::new(content) - .height(Length::Fixed(120.0)) - .width(Length::Fixed(800.0)) + .height(120) + .width(800) .padding(10) .style(ContainerType::BorderedRound) } -fn get_button_clear_all( - font: Font, - language: Language, -) -> Tooltip<'static, Message, Renderer> { +fn get_button_clear_all(font: Font, language: Language) -> Tooltip<'static, Message, StyleType> { let content = button( Icon::Bin .to_text() @@ -385,23 +388,26 @@ fn get_button_clear_all( .vertical_alignment(Vertical::Center), ) .padding(10) - .height(Length::Fixed(50.0)) - .width(Length::Fixed(75.0)) + .height(50) + .width(75) .on_press(Message::ShowModal(MyModal::ClearAll)); - Tooltip::new(content, clear_all_translation(language), Position::Top) - .gap(5) - .font(font) - .style(ContainerType::Tooltip) + Tooltip::new( + content, + Text::new(clear_all_translation(language)).font(font), + Position::Top, + ) + .gap(5) + .style(ContainerType::Tooltip) } -fn lazy_logged_notifications(sniffer: &Sniffer) -> Column<'static, Message, Renderer> { +fn lazy_logged_notifications(sniffer: &Sniffer) -> Column<'static, Message, StyleType> { let ConfigSettings { style, language, .. } = sniffer.configs.lock().unwrap().settings; let font = style.get_extension().font; let mut ret_val = Column::new() - .width(Length::Fixed(830.0)) + .width(830) .padding(5) .spacing(10) .align_items(Alignment::Center); diff --git a/src/gui/pages/overview_page.rs b/src/gui/pages/overview_page.rs index 2da8de42..4575e94a 100644 --- a/src/gui/pages/overview_page.rs +++ b/src/gui/pages/overview_page.rs @@ -5,13 +5,14 @@ use iced::alignment::{Horizontal, Vertical}; use iced::widget::scrollable::Direction; +use iced::widget::text::LineHeight; use iced::widget::tooltip::Position; use iced::widget::{ - button, lazy, vertical_space, Button, Column, Container, Row, Scrollable, Text, Tooltip, + button, horizontal_space, lazy, vertical_space, Button, Column, Container, Row, Rule, + Scrollable, Space, Text, Tooltip, }; -use iced::widget::{horizontal_space, Rule}; -use iced::Length::{Fill, FillPortion, Fixed}; -use iced::{Alignment, Font, Length, Renderer}; +use iced::Length::{Fill, FillPortion}; +use iced::{Alignment, Font, Length}; use crate::countries::country_utils::get_flag_tooltip; use crate::countries::flags_pictures::FLAGS_WIDTH_BIG; @@ -48,7 +49,7 @@ use crate::utils::types::icon::Icon; use crate::{ByteMultiple, ChartType, ConfigSettings, Language, RunningPage, StyleType}; /// Computes the body of gui overview page -pub fn overview_page(sniffer: &Sniffer) -> Container> { +pub fn overview_page(sniffer: &Sniffer) -> Container { let ConfigSettings { style, language, .. } = sniffer.configs.lock().unwrap().settings; @@ -146,7 +147,7 @@ fn body_no_packets( font: Font, language: Language, waiting: &str, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let link_type = device.link_type; let mut adapter_info = device.name.clone(); adapter_info.push_str(&format!("\n{}", link_type.full_print_on_one_line(language))); @@ -178,12 +179,12 @@ fn body_no_packets( .padding(10) .spacing(10) .align_items(Alignment::Center) - .push(vertical_space(FillPortion(1))) + .push(vertical_space()) .push(icon_text) - .push(vertical_space(Length::Fixed(15.0))) + .push(Space::with_height(15)) .push(nothing_to_see_text) .push(Text::new(waiting.to_owned()).font(font).size(50)) - .push(vertical_space(FillPortion(2))) + .push(Space::with_height(FillPortion(2))) } fn body_no_observed( @@ -193,7 +194,7 @@ fn body_no_observed( font_headers: Font, language: Language, waiting: &str, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let tot_packets_text = some_observed_translation(language, observed) .horizontal_alignment(Horizontal::Center) .font(font); @@ -203,7 +204,7 @@ fn body_no_observed( .padding(10) .spacing(10) .align_items(Alignment::Center) - .push(vertical_space(FillPortion(1))) + .push(vertical_space()) .push(Icon::Funnel.to_text().size(60)) .push(get_active_filters_col( filters, @@ -215,7 +216,7 @@ fn body_no_observed( .push(Rule::horizontal(20)) .push(tot_packets_text) .push(Text::new(waiting.to_owned()).font(font).size(50)) - .push(vertical_space(FillPortion(2))) + .push(Space::with_height(FillPortion(2))) } fn body_pcap_error( @@ -223,7 +224,7 @@ fn body_pcap_error( waiting: &str, language: Language, font: Font, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { // let err_string = pcap_error.clone().unwrap(); let error_text = error_translation(language, pcap_error) .horizontal_alignment(Horizontal::Center) @@ -234,24 +235,20 @@ fn body_pcap_error( .padding(10) .spacing(10) .align_items(Alignment::Center) - .push(vertical_space(FillPortion(1))) + .push(vertical_space()) .push(Icon::Error.to_text().size(60)) - .push(vertical_space(Length::Fixed(15.0))) + .push(Space::with_height(15)) .push(error_text) .push(Text::new(waiting.to_owned()).font(font).size(50)) - .push(vertical_space(FillPortion(2))) + .push(Space::with_height(FillPortion(2))) } -fn lazy_row_report(sniffer: &Sniffer) -> Container<'static, Message, Renderer> { - let mut row_report = Row::new() - .padding([0, 10, 5, 10]) - .height(Length::Fill) - .width(Length::Fill); - +fn lazy_row_report(sniffer: &Sniffer) -> Container<'static, Message, StyleType> { let col_host = col_host(840.0, sniffer); let col_service = col_service(250.0, sniffer); - row_report = row_report + let row_report = Row::new() + .padding([0, 10, 5, 10]) .push(col_host) .push(Rule::vertical(40)) .push(col_service); @@ -261,16 +258,14 @@ fn lazy_row_report(sniffer: &Sniffer) -> Container<'static, Message, Renderer Column<'static, Message, Renderer> { +fn col_host(width: f32, sniffer: &Sniffer) -> Column<'static, Message, StyleType> { let ConfigSettings { style, language, .. } = sniffer.configs.lock().unwrap().settings; let font = style.get_extension().font; let chart_type = sniffer.traffic_chart.chart_type; - let mut scroll_host = Column::new() - .width(Length::Fixed(width)) - .align_items(Alignment::Center); + let mut scroll_host = Column::new().width(width).align_items(Alignment::Center); let entries = get_host_entries(&sniffer.info_traffic, chart_type, sniffer.host_sort_type); let first_entry_data_info = entries .iter() @@ -289,7 +284,7 @@ fn col_host(width: f32, sniffer: &Sniffer) -> Column<'static, Message, Renderer< let star_button = get_star_button(data_info_host.is_favorite, host.clone()); let host_bar = Column::new() - .width(Length::Fixed(width)) + .width(width) .spacing(1) .push( Row::new() @@ -302,7 +297,7 @@ fn col_host(width: f32, sniffer: &Sniffer) -> Column<'static, Message, Renderer< }) .font(font), ) - .push(horizontal_space(Length::FillPortion(1))) + .push(horizontal_space()) .push( Text::new(if chart_type.eq(&ChartType::Packets) { data_info_host.data_info.tot_packets().to_string() @@ -336,7 +331,7 @@ fn col_host(width: f32, sniffer: &Sniffer) -> Column<'static, Message, Renderer< } if entries.len() >= 30 { - scroll_host = scroll_host.push(vertical_space(Length::Fixed(25.0))).push( + scroll_host = scroll_host.push(Space::with_height(25)).push( Text::new(only_top_30_items_translation(language)) .font(font) .horizontal_alignment(Horizontal::Center), @@ -344,10 +339,10 @@ fn col_host(width: f32, sniffer: &Sniffer) -> Column<'static, Message, Renderer< } Column::new() - .width(Length::Fixed(width + 11.0)) + .width(width + 11.0) .push( Row::new() - .height(Length::Fixed(45.0)) + .height(45) .align_items(Alignment::Center) .push( Text::new(host_translation(language)) @@ -355,28 +350,27 @@ fn col_host(width: f32, sniffer: &Sniffer) -> Column<'static, Message, Renderer< .style(TextType::Title) .size(FONT_SIZE_TITLE), ) - .push(horizontal_space(Length::Fill)) + .push(horizontal_space()) .push(sort_arrows( sniffer.host_sort_type, Message::HostSortSelection, )), ) .push( - Scrollable::new(Container::new(scroll_host).width(Length::Fill)) + Scrollable::new(scroll_host) + .width(Length::Fill) .direction(Direction::Vertical(ScrollbarType::properties())), ) } -fn col_service(width: f32, sniffer: &Sniffer) -> Column<'static, Message, Renderer> { +fn col_service(width: f32, sniffer: &Sniffer) -> Column<'static, Message, StyleType> { let ConfigSettings { style, language, .. } = sniffer.configs.lock().unwrap().settings; let font = style.get_extension().font; let chart_type = sniffer.traffic_chart.chart_type; - let mut scroll_service = Column::new() - .width(Length::Fixed(width)) - .align_items(Alignment::Center); + let mut scroll_service = Column::new().width(width).align_items(Alignment::Center); let entries = get_service_entries(&sniffer.info_traffic, chart_type, sniffer.service_sort_type); let first_entry_data_info = entries .iter() @@ -390,11 +384,11 @@ fn col_service(width: f32, sniffer: &Sniffer) -> Column<'static, Message, Render let content = Column::new() .spacing(1) - .width(Length::Fixed(width)) + .width(width) .push( Row::new() .push(Text::new(service.to_string()).font(font)) - .push(horizontal_space(Length::FillPortion(1))) + .push(horizontal_space()) .push( Text::new(if chart_type.eq(&ChartType::Packets) { data_info.tot_packets().to_string() @@ -417,20 +411,18 @@ fn col_service(width: f32, sniffer: &Sniffer) -> Column<'static, Message, Render } if entries.len() >= 30 { - scroll_service = scroll_service - .push(vertical_space(Length::Fixed(25.0))) - .push( - Text::new(only_top_30_items_translation(language)) - .font(font) - .horizontal_alignment(Horizontal::Center), - ); + scroll_service = scroll_service.push(Space::with_height(25)).push( + Text::new(only_top_30_items_translation(language)) + .font(font) + .horizontal_alignment(Horizontal::Center), + ); } Column::new() - .width(Length::Fixed(width + 11.0)) + .width(width + 11.0) .push( Row::new() - .height(Length::Fixed(45.0)) + .height(45) .align_items(Alignment::Center) .push( Text::new(service_translation(language)) @@ -438,14 +430,15 @@ fn col_service(width: f32, sniffer: &Sniffer) -> Column<'static, Message, Render .style(TextType::Title) .size(FONT_SIZE_TITLE), ) - .push(horizontal_space(Length::Fill)) + .push(horizontal_space()) .push(sort_arrows( sniffer.service_sort_type, Message::ServiceSortSelection, )), ) .push( - Scrollable::new(Container::new(scroll_service).width(Length::Fill)) + Scrollable::new(scroll_service) + .width(Length::Fill) .direction(Direction::Vertical(ScrollbarType::properties())), ) } @@ -455,7 +448,7 @@ fn lazy_col_info( filtered: u128, dropped: u32, sniffer: &Sniffer, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let ConfigSettings { style, language, .. } = sniffer.configs.lock().unwrap().settings; @@ -483,31 +476,31 @@ fn lazy_col_info( .padding([5, 10]) .push( Row::new() - .height(Length::Fixed(120.0)) + .height(120) .push( Scrollable::new(col_device) - .width(Length::FillPortion(1)) + .width(Length::Fill) .direction(Direction::Horizontal(ScrollbarType::properties())), ) - .push(Rule::vertical(25)) - .push(col_data_representation.width(Length::FillPortion(1))), + .push(Container::new(Rule::vertical(25)).height(Length::Shrink)) + .push(col_data_representation.width(Length::Fill)), ) .push(Rule::horizontal(15)) .push( Scrollable::new(col_bytes_packets) + .height(Length::Fill) .width(Length::Fill) .direction(Direction::Vertical(ScrollbarType::properties())), ); Container::new(content) - .width(Length::Fixed(400.0)) + .width(400) .padding([10, 5, 5, 5]) - .height(Length::Fill) .align_x(Horizontal::Center) .style(ContainerType::BorderedRound) } -fn container_chart(sniffer: &Sniffer, font: Font) -> Container> { +fn container_chart(sniffer: &Sniffer, font: Font) -> Container { let ConfigSettings { language, .. } = sniffer.configs.lock().unwrap().settings; let traffic_chart = &sniffer.traffic_chart; @@ -524,7 +517,7 @@ fn container_chart(sniffer: &Sniffer, font: Font) -> Container Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let link_type = device.link_type; #[cfg(not(target_os = "windows"))] let adapter_info = &device.name; @@ -559,6 +552,7 @@ fn col_device( let adapter_info = device.desc.as_ref().unwrap_or(&device.name); Column::new() + .height(Length::Fill) .spacing(10) .push(TextType::highlighted_subtitle_with_desc( network_adapter_translation(language), @@ -572,7 +566,7 @@ fn col_data_representation( language: Language, font: Font, chart_type: ChartType, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let mut ret_val = Column::new().spacing(5).push( Text::new(format!("{}:", data_representation_translation(language))) .style(TextType::Subtitle) @@ -590,7 +584,7 @@ fn col_data_representation( .font(font), ) .width(Length::Fill) - .height(Length::Fixed(33.0)) + .height(33) .style(if is_active { ButtonType::BorderedRoundSelected } else { @@ -610,7 +604,7 @@ fn col_bytes_packets( font: Font, font_headers: Font, sniffer: &Sniffer, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let filtered_bytes = sniffer.runtime_data.tot_out_bytes + sniffer.runtime_data.tot_in_bytes; let all_bytes = sniffer.runtime_data.all_bytes; let filters = &sniffer.filters; @@ -735,25 +729,25 @@ fn get_bars_length( (in_len, out_len) } -fn get_bars(in_len: f32, out_len: f32) -> Row<'static, Message, Renderer> { +fn get_bars(in_len: f32, out_len: f32) -> Row<'static, Message, StyleType> { Row::new() .push(if in_len > 0.0 { Row::new() - .width(Length::Fixed(in_len)) + .width(in_len) .push(Rule::horizontal(1).style(RuleType::Incoming)) } else { Row::new() }) .push(if out_len > 0.0 { Row::new() - .width(Length::Fixed(out_len)) + .width(out_len) .push(Rule::horizontal(1).style(RuleType::Outgoing)) } else { Row::new() }) } -fn get_star_button(is_favorite: bool, host: Host) -> Button<'static, Message, Renderer> { +fn get_star_button(is_favorite: bool, host: Host) -> Button<'static, Message, StyleType> { button( Icon::Star .to_text() @@ -762,8 +756,8 @@ fn get_star_button(is_favorite: bool, host: Host) -> Button<'static, Message, Re .vertical_alignment(Vertical::Center), ) .padding(0) - .height(Length::Fixed(FLAGS_WIDTH_BIG * 0.75)) - .width(Length::Fixed(FLAGS_WIDTH_BIG)) + .height(FLAGS_WIDTH_BIG * 0.75) + .width(FLAGS_WIDTH_BIG) .style(if is_favorite { ButtonType::Starred } else { @@ -778,7 +772,7 @@ fn get_active_filters_col( font: Font, font_headers: Font, show: bool, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let mut ret_val = Column::new().push( Text::new(format!("{}:", active_filters_translation(language),)) .font(font) @@ -794,16 +788,20 @@ fn get_active_filters_col( } else { Row::new().padding([0, 0, 0, 20]).push( Tooltip::new( - Container::new(Text::new("i").font(font_headers).size(15)) - .align_x(Horizontal::Center) - .padding(2) - .height(Fixed(20.0)) - .width(Fixed(20.0)) - .style(ContainerType::Highlighted), - filters_string, + Container::new( + Text::new("i") + .font(font_headers) + .size(15) + .line_height(LineHeight::Relative(1.0)), + ) + .align_x(Horizontal::Center) + .align_y(Vertical::Center) + .height(20) + .width(20) + .style(ContainerType::Highlighted), + Text::new(filters_string).font(font), Position::FollowCursor, ) - .font(font) .style(ContainerType::Tooltip), ) }); @@ -814,7 +812,7 @@ fn get_active_filters_col( fn sort_arrows( active_sort_type: SortType, message: fn(SortType) -> Message, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { Container::new( button( active_sort_type diff --git a/src/gui/pages/settings_general_page.rs b/src/gui/pages/settings_general_page.rs index b0fed305..b1350296 100644 --- a/src/gui/pages/settings_general_page.rs +++ b/src/gui/pages/settings_general_page.rs @@ -1,15 +1,14 @@ use std::sync::Arc; use iced::alignment::{Horizontal, Vertical}; +use iced::widget::text::LineHeight; use iced::widget::tooltip::Position; use iced::widget::{ - button, horizontal_space, vertical_space, Column, Container, PickList, Row, Rule, Slider, Text, - Tooltip, + button, horizontal_space, Column, Container, PickList, Row, Rule, Slider, Space, Text, Tooltip, }; -use iced::Length::Fixed; -use iced::{Alignment, Font, Length, Renderer}; +use iced::{Alignment, Font, Length}; -use crate::gui::components::button::button_open_file; +use crate::gui::components::button::{button_open_file, row_open_link_tooltip}; use crate::gui::components::tab::get_settings_tabs; use crate::gui::pages::settings_notifications_page::settings_header; use crate::gui::pages::types::settings_page::SettingsPage; @@ -28,7 +27,7 @@ use crate::utils::types::file_info::FileInfo; use crate::utils::types::web_page::WebPage; use crate::{ConfigSettings, Language, RunningPage, Sniffer, StyleType}; -pub fn settings_general_page(sniffer: &Sniffer) -> Container> { +pub fn settings_general_page(sniffer: &Sniffer) -> Container { let ConfigSettings { style, language, @@ -48,19 +47,19 @@ pub fn settings_general_page(sniffer: &Sniffer) -> Container Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let ConfigSettings { language, scale_factor, @@ -84,7 +83,7 @@ fn column_all_general_setting( .padding(10.0) .style(ContainerType::Badge), ) - .push(vertical_space(Fixed(10.0))); + .push(Space::with_height(10)); } column = column.push(mmdb_settings( @@ -104,21 +103,18 @@ fn row_language_scale_factor( language: Language, font: Font, scale_factor: f64, -) -> Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { Row::new() .align_items(Alignment::Start) - .height(Length::Fixed(90.0)) + .height(90) .push(language_picklist(language, font)) .push(Rule::vertical(25)) .push(scale_factor_slider(language, font, scale_factor)) .push(Rule::vertical(25)) - .push(horizontal_space(Length::FillPortion(1))) + .push(horizontal_space()) } -fn language_picklist( - language: Language, - font: Font, -) -> Container<'static, Message, Renderer> { +fn language_picklist(language: Language, font: Font) -> Container<'static, Message, StyleType> { let mut flag_row = Row::new() .align_items(Alignment::Center) .spacing(10) @@ -131,16 +127,19 @@ fn language_picklist( .font(font) .vertical_alignment(Vertical::Center) .horizontal_alignment(Horizontal::Center) - .size(15), + .size(15) + .line_height(LineHeight::Relative(1.0)), ) .on_press(Message::OpenWebPage(WebPage::IssueLanguages)) .padding(2) - .height(Fixed(20.0)) - .width(Fixed(20.0)), - "The selected language is not\nfully updated to version 1.3 ↗", + .height(20) + .width(20), + row_open_link_tooltip( + "The selected language is not\nfully updated to version 1.3", + font, + ), Position::FollowCursor, ) - .font(font) .style(ContainerType::Tooltip), ); } @@ -166,7 +165,7 @@ fn language_picklist( ); Container::new(content) - .width(Length::FillPortion(1)) + .width(Length::Fill) .align_x(Horizontal::Center) .align_y(Vertical::Center) } @@ -175,7 +174,7 @@ fn scale_factor_slider( language: Language, font: Font, scale_factor: f64, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { #[allow(clippy::cast_possible_truncation)] let slider_width = 150.0 / scale_factor as f32; Container::new( @@ -192,10 +191,10 @@ fn scale_factor_slider( .push( Slider::new(0.5..=1.5, scale_factor, Message::ChangeScaleFactor) .step(0.05) - .width(Fixed(slider_width)), + .width(slider_width), ), ) - .width(Length::FillPortion(1)) + .width(Length::Fill) .align_x(Horizontal::Center) .align_y(Vertical::Center) } @@ -208,7 +207,7 @@ fn mmdb_settings( asn_path: &str, country_reader: &Arc, asn_reader: &Arc, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { Column::new() .spacing(5) .align_items(Alignment::Center) @@ -246,7 +245,7 @@ fn mmdb_selection_row( mmdb_reader: &Arc, caption: &str, language: Language, -) -> Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { let is_error = if custom_path.is_empty() { false } else { @@ -286,7 +285,7 @@ fn button_clear_mmdb( message: fn(String) -> Message, font: Font, is_editable: bool, -) -> Tooltip<'static, Message, Renderer> { +) -> Tooltip<'static, Message, StyleType> { let mut button = button( Text::new("×") .font(font) @@ -295,8 +294,8 @@ fn button_clear_mmdb( .size(15), ) .padding(2) - .height(Fixed(20.0)) - .width(Fixed(20.0)); + .height(20) + .width(20); if is_editable { button = button.on_press(message(String::new())); diff --git a/src/gui/pages/settings_notifications_page.rs b/src/gui/pages/settings_notifications_page.rs index fcb0a32b..f629c146 100644 --- a/src/gui/pages/settings_notifications_page.rs +++ b/src/gui/pages/settings_notifications_page.rs @@ -1,11 +1,8 @@ use iced::alignment::{Horizontal, Vertical}; use iced::widget::scrollable::Direction; -use iced::widget::{ - horizontal_space, vertical_space, Checkbox, Column, Container, Row, Scrollable, Text, TextInput, -}; -use iced::widget::{Button, Slider}; -use iced::Length::Fixed; -use iced::{Alignment, Font, Length, Renderer}; +use iced::widget::{horizontal_space, Button, Slider}; +use iced::widget::{Checkbox, Column, Container, Row, Scrollable, Space, Text, TextInput}; +use iced::{Alignment, Font, Length}; use crate::gui::components::button::button_hide; use crate::gui::components::tab::get_settings_tabs; @@ -30,7 +27,7 @@ use crate::translations::translations::{ use crate::utils::types::icon::Icon; use crate::{ConfigSettings, Language, Sniffer, StyleType}; -pub fn settings_notifications_page(sniffer: &Sniffer) -> Container> { +pub fn settings_notifications_page(sniffer: &Sniffer) -> Container { let ConfigSettings { style, language, @@ -54,7 +51,7 @@ pub fn settings_notifications_page(sniffer: &Sniffer) -> Container Container Container Container Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let checkbox = Checkbox::new( packets_threshold_translation(language), packets_notification.threshold.is_some(), - move |toggled| { - if toggled { - Message::UpdateNotificationSettings( - Notification::Packets(PacketsNotification { - threshold: Some(packets_notification.previous_threshold), - ..packets_notification - }), - false, - ) - } else { - Message::UpdateNotificationSettings( - Notification::Packets(PacketsNotification { - threshold: None, - ..packets_notification - }), - false, - ) - } - }, ) + .on_toggle(move |toggled| { + if toggled { + Message::UpdateNotificationSettings( + Notification::Packets(PacketsNotification { + threshold: Some(packets_notification.previous_threshold), + ..packets_notification + }), + false, + ) + } else { + Message::UpdateNotificationSettings( + Notification::Packets(PacketsNotification { + threshold: None, + ..packets_notification + }), + false, + ) + } + }) .size(18) .font(font); @@ -138,7 +135,7 @@ fn get_packets_notify( Column::new().padding(5).push( Container::new(ret_val) .padding(10) - .width(Fixed(700.0)) + .width(700) .style(ContainerType::BorderedRound), ) } else { @@ -148,7 +145,7 @@ fn get_packets_notify( Column::new().padding(5).push( Container::new(ret_val) .padding(10) - .width(Fixed(700.0)) + .width(700) .style(ContainerType::BorderedRound), ) } @@ -158,30 +155,30 @@ fn get_bytes_notify( bytes_notification: BytesNotification, language: Language, font: Font, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let checkbox = Checkbox::new( bytes_threshold_translation(language), bytes_notification.threshold.is_some(), - move |toggled| { - if toggled { - Message::UpdateNotificationSettings( - Notification::Bytes(BytesNotification { - threshold: Some(bytes_notification.previous_threshold), - ..bytes_notification - }), - false, - ) - } else { - Message::UpdateNotificationSettings( - Notification::Bytes(BytesNotification { - threshold: None, - ..bytes_notification - }), - false, - ) - } - }, ) + .on_toggle(move |toggled| { + if toggled { + Message::UpdateNotificationSettings( + Notification::Bytes(BytesNotification { + threshold: Some(bytes_notification.previous_threshold), + ..bytes_notification + }), + false, + ) + } else { + Message::UpdateNotificationSettings( + Notification::Bytes(BytesNotification { + threshold: None, + ..bytes_notification + }), + false, + ) + } + }) .size(18) .font(font); @@ -191,7 +188,7 @@ fn get_bytes_notify( Column::new().padding(5).push( Container::new(ret_val) .padding(10) - .width(Fixed(700.0)) + .width(700) .style(ContainerType::BorderedRound), ) } else { @@ -201,7 +198,7 @@ fn get_bytes_notify( Column::new().padding(5).push( Container::new(ret_val) .padding(10) - .width(Fixed(700.0)) + .width(700) .style(ContainerType::BorderedRound), ) } @@ -211,21 +208,21 @@ fn get_favorite_notify( favorite_notification: FavoriteNotification, language: Language, font: Font, -) -> Column<'static, Message, Renderer> { +) -> Column<'static, Message, StyleType> { let checkbox = Checkbox::new( favorite_notification_translation(language), favorite_notification.notify_on_favorite, - move |toggled| { - Message::UpdateNotificationSettings( - if toggled { - Notification::Favorite(FavoriteNotification::on(favorite_notification.sound)) - } else { - Notification::Favorite(FavoriteNotification::off(favorite_notification.sound)) - }, - false, - ) - }, ) + .on_toggle(move |toggled| { + Message::UpdateNotificationSettings( + if toggled { + Notification::Favorite(FavoriteNotification::on(favorite_notification.sound)) + } else { + Notification::Favorite(FavoriteNotification::off(favorite_notification.sound)) + }, + false, + ) + }) .size(18) .font(font); @@ -241,14 +238,14 @@ fn get_favorite_notify( Column::new().padding(5).push( Container::new(ret_val) .padding(10) - .width(Fixed(700.0)) + .width(700) .style(ContainerType::BorderedRound), ) } else { Column::new().padding(5).push( Container::new(ret_val) .padding(10) - .width(Fixed(700.0)) + .width(700) .style(ContainerType::BorderedRound), ) } @@ -258,12 +255,12 @@ fn input_group_packets( packets_notification: PacketsNotification, font: Font, language: Language, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let curr_threshold_str = &packets_notification.threshold.unwrap().to_string(); let input_row = Row::new() .align_items(Alignment::Center) .spacing(5) - .push(horizontal_space(Fixed(45.0))) + .push(Space::with_width(45)) .push(Text::new(format!("{}:", threshold_translation(language))).font(font)) .push( TextInput::new( @@ -284,7 +281,7 @@ fn input_group_packets( }) .padding([3, 5]) .font(font) - .width(Length::Fixed(100.0)), + .width(100), ) .push( Text::new(per_second_translation(language)) @@ -301,7 +298,7 @@ fn input_group_bytes( bytes_notification: BytesNotification, font: Font, language: Language, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let info_str = format!( "{}; {}", per_second_translation(language), @@ -314,7 +311,7 @@ fn input_group_bytes( let input_row = Row::new() .spacing(5) .align_items(Alignment::Center) - .push(horizontal_space(Fixed(45.0))) + .push(Space::with_width(45)) .push(Text::new(format!("{}:", threshold_translation(language))).font(font)) .push( TextInput::new( @@ -331,7 +328,7 @@ fn input_group_bytes( }) .padding([3, 5]) .font(font) - .width(Length::Fixed(100.0)), + .width(100), ) .push( Text::new(info_str) @@ -348,7 +345,7 @@ fn volume_slider( language: Language, font: Font, volume: u8, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { Container::new( Column::new() .spacing(5) @@ -359,16 +356,16 @@ fn volume_slider( .push( Icon::AudioMute .to_text() - .width(Fixed(30.0)) + .width(30) .vertical_alignment(Vertical::Center) .size(20), ) .push( Slider::new(0..=100, volume, Message::ChangeVolume) .step(5) - .width(Fixed(200.0)), + .width(200), ) - .push(horizontal_space(Length::Fixed(15.0))) + .push(Space::with_width(15)) .push( Icon::AudioHigh .to_text() @@ -379,7 +376,7 @@ fn volume_slider( ) .padding(5) .width(Length::Fill) - .height(Length::Fixed(60.0)) + .height(60) .align_x(Horizontal::Center) .align_y(Vertical::Center) } @@ -388,7 +385,7 @@ fn sound_buttons( notification: Notification, font: Font, language: Language, -) -> Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { let current_sound = match notification { Notification::Packets(n) => n.sound, Notification::Bytes(n) => n.sound, @@ -398,7 +395,7 @@ fn sound_buttons( let mut ret_val = Row::new() .align_items(Alignment::Center) .spacing(5) - .push(horizontal_space(Fixed(45.0))) + .push(Space::with_width(45)) .push(Text::new(format!("{}:", sound_translation(language))).font(font)); for option in Sound::ALL { @@ -415,8 +412,8 @@ fn sound_buttons( ret_val = ret_val.push( Button::new(option.get_text(font)) .padding(0) - .width(Length::Fixed(80.0)) - .height(Length::Fixed(25.0)) + .width(80) + .height(25) .style(if is_active { ButtonType::BorderedRoundSelected } else { @@ -436,10 +433,10 @@ pub fn settings_header( font_headers: Font, color_gradient: GradientType, language: Language, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { Container::new( Row::new() - .push(horizontal_space(Length::FillPortion(1))) + .push(horizontal_space()) .push( Text::new(settings_translation(language)) .font(font_headers) @@ -449,13 +446,13 @@ pub fn settings_header( ) .push( Container::new(button_hide(Message::CloseSettings, language, font)) - .width(Length::FillPortion(1)) + .width(Length::Fill) .align_x(Horizontal::Center), ), ) .align_x(Horizontal::Center) .align_y(Vertical::Center) - .height(Fixed(40.0)) + .height(40) .width(Length::Fill) .style(ContainerType::Gradient(color_gradient)) } diff --git a/src/gui/pages/settings_style_page.rs b/src/gui/pages/settings_style_page.rs index af992031..11a33a34 100644 --- a/src/gui/pages/settings_style_page.rs +++ b/src/gui/pages/settings_style_page.rs @@ -1,9 +1,8 @@ use iced::alignment::{Horizontal, Vertical}; use iced::widget::scrollable::Direction; -use iced::widget::{button, horizontal_space, lazy, vertical_space, Rule}; -use iced::widget::{Button, Column, Container, Row, Scrollable, Space, Text}; -use iced::Length::Fixed; -use iced::{Alignment, Color, Element, Font, Length, Renderer}; +use iced::widget::{button, lazy, Rule, Space}; +use iced::widget::{Button, Column, Container, Row, Scrollable, Text}; +use iced::{Alignment, Color, Element, Font, Length}; use crate::gui::components::button::button_open_file; use crate::gui::components::tab::get_settings_tabs; @@ -31,7 +30,7 @@ use crate::utils::types::icon::Icon; use crate::StyleType::{Day, DeepSea, MonAmour, Night}; use crate::{ConfigSettings, Language, Sniffer, StyleType}; -pub fn settings_style_page(sniffer: &Sniffer) -> Container> { +pub fn settings_style_page(sniffer: &Sniffer) -> Container { let ConfigSettings { style, language, @@ -53,16 +52,16 @@ pub fn settings_style_page(sniffer: &Sniffer) -> Container Container Container Container Container Container Container Row<'static, Message, Renderer> { +) -> Row<'static, Message, StyleType> { Row::new() .align_items(Alignment::Center) .spacing(10) @@ -140,11 +139,11 @@ fn gradients_row( ) .padding(0) .height(20.0) - .width(Fixed(if color_gradient.eq(&GradientType::None) { - 60.0 + .width(if color_gradient.eq(&GradientType::None) { + 60 } else { - 20.0 - })) + 20 + }) .style(ButtonType::Gradient(GradientType::None)) .on_press(Message::GradientsSelection(GradientType::None)), ) @@ -158,11 +157,11 @@ fn gradients_row( ) .padding(0) .height(20.0) - .width(Fixed(if color_gradient.eq(&GradientType::Mild) { - 60.0 + .width(if color_gradient.eq(&GradientType::Mild) { + 60 } else { - 20.0 - })) + 20 + }) .on_press(Message::GradientsSelection(GradientType::Mild)) .style(ButtonType::Gradient(GradientType::Mild)), ) @@ -176,11 +175,11 @@ fn gradients_row( ) .padding(0) .height(20.0) - .width(Fixed(if color_gradient.eq(&GradientType::Wild) { - 60.0 + .width(if color_gradient.eq(&GradientType::Wild) { + 60 } else { - 20.0 - })) + 20 + }) .on_press(Message::GradientsSelection(GradientType::Wild)) .style(ButtonType::Gradient(GradientType::Wild)), ) @@ -191,7 +190,7 @@ fn get_palette_container( name: String, description: String, on_press: StyleType, -) -> Button<'static, Message, Renderer> { +) -> Button<'static, Message, StyleType> { let font = style.get_extension().font; let is_custom = matches!(on_press, StyleType::Custom(_)); @@ -212,8 +211,8 @@ fn get_palette_container( } Button::new(content) - .height(Length::Fixed(if is_custom { 75.0 } else { 110.0 })) - .width(Length::Fixed(380.0)) + .height(if is_custom { 75 } else { 110 }) + .width(380) .padding(5) .style(if on_press.eq(&style) { ButtonType::BorderedRoundSelected @@ -227,21 +226,21 @@ fn get_palette_rule( palette: Palette, buttons_color: Color, is_custom: bool, -) -> Container<'static, Message, Renderer> { +) -> Container<'static, Message, StyleType> { let height = if is_custom { 25 } else { 40 }; Container::new( Row::new() - .push(Row::new().width(Length::Fixed(120.0)).push( + .push(Row::new().width(120).push( Rule::horizontal(height).style(RuleType::PaletteColor(palette.primary, height)), )) - .push(Row::new().width(Length::Fixed(80.0)).push( + .push(Row::new().width(80).push( Rule::horizontal(height).style(RuleType::PaletteColor(palette.secondary, height)), )) - .push(Row::new().width(Length::Fixed(60.0)).push( + .push(Row::new().width(60).push( Rule::horizontal(height).style(RuleType::PaletteColor(palette.outgoing, height)), )) - .push(Row::new().width(Length::Fixed(40.0)).push( + .push(Row::new().width(40).push( Rule::horizontal(height).style(RuleType::PaletteColor(buttons_color, height)), )), ) @@ -256,7 +255,7 @@ fn get_palette_rule( fn get_extra_palettes( styles: &[ExtraStyles], current_style: StyleType, -) -> Vec>> { +) -> Vec> { // Map each extra style into a palette container let mut styles = styles.iter().map(|&style| { let name = style.to_string(); @@ -277,19 +276,15 @@ fn get_extra_palettes( children.extend([ Row::new() .push(first) - .push(horizontal_space(Length::Fixed(15.0))) + .push(Space::with_width(10)) .push(second) .into(), - >>>::into(vertical_space( - Length::Fixed(10.0), - )), + >>::into(Space::with_height(10)), ]); } else { children.extend([ Row::new().push(first).into(), - >>>::into(vertical_space( - Length::Fixed(10.0), - )), + >>::into(Space::with_height(10)), ]); } } @@ -302,7 +297,7 @@ fn lazy_custom_style_input( font: Font, custom_path: &str, style: StyleType, -) -> Button<'static, Message, Renderer> { +) -> Button<'static, Message, StyleType> { let is_custom_toml_style_set = matches!(style, StyleType::Custom(ExtraStyles::CustomToml(_))); let custom_palette = Palette::from_file(custom_path); @@ -333,6 +328,7 @@ fn lazy_custom_style_input( )); let mut content = Column::new() + .width(Length::Fill) .align_items(Alignment::Center) .spacing(5) .push(Text::new(custom_style_translation(language)).font(font)) @@ -353,14 +349,12 @@ fn lazy_custom_style_input( } Button::new(content) - .height(Length::Fixed( - if custom_palette.is_ok() || is_custom_toml_style_set { - 110.0 - } else { - 75.0 - }, - )) - .width(Length::Fixed(380.0)) + .height(if custom_palette.is_ok() || is_custom_toml_style_set { + 110 + } else { + 75 + }) + .width(380) .padding([10, 0, 5, 0]) .style(if is_custom_toml_style_set { ButtonType::BorderedRoundSelected diff --git a/src/gui/pages/types/running_page.rs b/src/gui/pages/types/running_page.rs index 3a2db7e2..23a84979 100644 --- a/src/gui/pages/types/running_page.rs +++ b/src/gui/pages/types/running_page.rs @@ -1,5 +1,3 @@ -use iced::Renderer; - use crate::gui::types::message::Message; use crate::translations::translations::{notifications_translation, overview_translation}; use crate::translations::translations_2::inspect_translation; @@ -53,7 +51,7 @@ impl RunningPage { } } - pub fn icon(self) -> iced::widget::Text<'static, Renderer> { + pub fn icon(self) -> iced::widget::Text<'static, StyleType> { match self { RunningPage::Overview => Icon::Overview, RunningPage::Inspect => Icon::Inspect, diff --git a/src/gui/pages/types/settings_page.rs b/src/gui/pages/types/settings_page.rs index 7fe21ac7..969ba4c6 100644 --- a/src/gui/pages/types/settings_page.rs +++ b/src/gui/pages/types/settings_page.rs @@ -1,5 +1,3 @@ -use iced::Renderer; - use crate::gui::types::message::Message; use crate::translations::translations::{notifications_translation, style_translation}; use crate::translations::translations_3::general_translation; @@ -48,7 +46,7 @@ impl SettingsPage { } } - pub fn icon(self) -> iced::widget::Text<'static, Renderer> { + pub fn icon(self) -> iced::widget::Text<'static, StyleType> { match self { SettingsPage::Notifications => Icon::Notification, SettingsPage::Appearance => Icon::HalfSun, diff --git a/src/gui/styles/button.rs b/src/gui/styles/button.rs index 7f0fda1d..c2bd5e0a 100644 --- a/src/gui/styles/button.rs +++ b/src/gui/styles/button.rs @@ -4,7 +4,7 @@ use iced::widget::button; use iced::widget::button::Appearance; -use iced::{Background, Color, Vector}; +use iced::{Background, Border, Color, Shadow, Vector}; use crate::gui::styles::style_constants::{BORDER_BUTTON_RADIUS, BORDER_WIDTH}; use crate::gui::styles::types::gradient_type::{ @@ -59,27 +59,39 @@ impl button::StyleSheet for StyleType { )), _ => Background::Color(ext.buttons_color), }), - border_radius: match style { - ButtonType::Neutral => 0.0.into(), - ButtonType::TabActive | ButtonType::TabInactive => [0.0, 0.0, 30.0, 30.0].into(), - ButtonType::BorderedRound | ButtonType::BorderedRoundSelected => 12.0.into(), - ButtonType::Starred | ButtonType::NotStarred => 100.0.into(), - _ => BORDER_BUTTON_RADIUS.into(), - }, - border_width: match style { - ButtonType::TabActive - | ButtonType::TabInactive - | ButtonType::SortArrows - | ButtonType::SortArrowActive - | ButtonType::Starred - | ButtonType::NotStarred - | ButtonType::Neutral => 0.0, - ButtonType::BorderedRound => BORDER_WIDTH * 2.0, - _ => BORDER_WIDTH, + border: Border { + radius: match style { + ButtonType::Neutral => 0.0.into(), + ButtonType::TabActive | ButtonType::TabInactive => { + [0.0, 0.0, 30.0, 30.0].into() + } + ButtonType::BorderedRound | ButtonType::BorderedRoundSelected => 12.0.into(), + ButtonType::Starred | ButtonType::NotStarred => 100.0.into(), + _ => BORDER_BUTTON_RADIUS.into(), + }, + width: match style { + ButtonType::TabActive + | ButtonType::TabInactive + | ButtonType::SortArrows + | ButtonType::SortArrowActive + | ButtonType::Starred + | ButtonType::NotStarred + | ButtonType::Neutral => 0.0, + ButtonType::BorderedRound => BORDER_WIDTH * 2.0, + _ => BORDER_WIDTH, + }, + color: match style { + ButtonType::Alert => Color::new(0.8, 0.15, 0.15, 1.0), + ButtonType::BorderedRound => Color { + a: ext.alpha_round_borders, + ..ext.buttons_color + }, + _ => colors.secondary, + }, }, shadow_offset: match style { ButtonType::TabActive | ButtonType::TabInactive => Vector::new(3.0, 2.0), - _ => Vector::new(0.0, 0.0), + _ => Vector::default(), }, text_color: match style { ButtonType::Starred => Color::BLACK, @@ -91,13 +103,13 @@ impl button::StyleSheet for StyleType { ButtonType::Gradient(_) => colors.text_headers, _ => colors.text_body, }, - border_color: match style { - ButtonType::Alert => Color::new(0.8, 0.15, 0.15, 1.0), - ButtonType::BorderedRound => Color { - a: ext.alpha_round_borders, - ..ext.buttons_color + shadow: match style { + ButtonType::TabActive | ButtonType::TabInactive => Shadow { + color: Color::BLACK, + offset: Vector::new(3.0, 2.0), + blur_radius: 4.0, }, - _ => colors.secondary, + _ => Shadow::default(), }, } } @@ -113,6 +125,22 @@ impl button::StyleSheet for StyleType { ButtonType::TabActive | ButtonType::TabInactive => Vector::new(3.0, 3.0), _ => Vector::new(0.0, 2.0), }, + shadow: match style { + ButtonType::Neutral | ButtonType::SortArrows | ButtonType::SortArrowActive => { + Shadow::default() + } + _ => Shadow { + color: Color::BLACK, + offset: match style { + ButtonType::TabActive | ButtonType::TabInactive => Vector::new(3.0, 3.0), + _ => Vector::new(0.0, 2.0), + }, + blur_radius: match style { + ButtonType::TabActive | ButtonType::TabInactive => 4.0, + _ => 2.0, + }, + }, + }, background: Some(match style { ButtonType::Starred => Background::Color(colors.starred), ButtonType::SortArrows | ButtonType::SortArrowActive => { @@ -130,30 +158,34 @@ impl button::StyleSheet for StyleType { ), _ => Background::Color(mix_colors(colors.primary, ext.buttons_color)), }), - border_radius: match style { - ButtonType::Neutral => 0.0.into(), - ButtonType::TabActive | ButtonType::TabInactive => [0.0, 0.0, 30.0, 30.0].into(), - ButtonType::BorderedRound | ButtonType::BorderedRoundSelected => 12.0.into(), - ButtonType::Starred | ButtonType::NotStarred => 100.0.into(), - _ => BORDER_BUTTON_RADIUS.into(), - }, - border_width: match style { - ButtonType::Starred - | ButtonType::TabActive - | ButtonType::SortArrows - | ButtonType::SortArrowActive - | ButtonType::TabInactive - | ButtonType::BorderedRound => 0.0, - _ => BORDER_WIDTH, - }, - border_color: match style { - ButtonType::Alert => Color::new(0.8, 0.15, 0.15, 1.0), - ButtonType::BorderedRound | ButtonType::NotStarred => Color { - a: ext.alpha_round_borders, - ..ext.buttons_color + border: Border { + radius: match style { + ButtonType::Neutral => 0.0.into(), + ButtonType::TabActive | ButtonType::TabInactive => { + [0.0, 0.0, 30.0, 30.0].into() + } + ButtonType::BorderedRound | ButtonType::BorderedRoundSelected => 12.0.into(), + ButtonType::Starred | ButtonType::NotStarred => 100.0.into(), + _ => BORDER_BUTTON_RADIUS.into(), + }, + width: match style { + ButtonType::Starred + | ButtonType::TabActive + | ButtonType::SortArrows + | ButtonType::SortArrowActive + | ButtonType::TabInactive + | ButtonType::BorderedRound => 0.0, + _ => BORDER_WIDTH, + }, + color: match style { + ButtonType::Alert => Color::new(0.8, 0.15, 0.15, 1.0), + ButtonType::BorderedRound | ButtonType::NotStarred => Color { + a: ext.alpha_round_borders, + ..ext.buttons_color + }, + ButtonType::Neutral => ext.buttons_color, + _ => colors.secondary, }, - ButtonType::Neutral => ext.buttons_color, - _ => colors.secondary, }, text_color: match style { ButtonType::Starred => Color::BLACK, @@ -184,34 +216,40 @@ impl button::StyleSheet for StyleType { } _ => Background::Color(ext.buttons_color), }), - border_radius: BORDER_BUTTON_RADIUS.into(), - border_width: BORDER_WIDTH, - shadow_offset: Vector::new(0.0, 0.0), + border: Border { + radius: BORDER_BUTTON_RADIUS.into(), + width: BORDER_WIDTH, + color: Color { + a: ext.alpha_chart_badge, + ..colors.secondary + }, + }, + shadow_offset: Vector::default(), text_color: Color { a: ext.alpha_chart_badge, ..colors.text_headers }, - border_color: Color { - a: ext.alpha_chart_badge, - ..colors.secondary - }, + shadow: Shadow::default(), }, ButtonType::Standard => Appearance { - shadow_offset: Vector::new(0.0, 0.0), + shadow_offset: Vector::default(), background: Some(Background::Color(Color { a: ext.alpha_chart_badge, ..ext.buttons_color })), - border_radius: BORDER_BUTTON_RADIUS.into(), - border_width: BORDER_WIDTH, - border_color: Color { - a: ext.alpha_chart_badge, - ..colors.secondary + border: Border { + radius: BORDER_BUTTON_RADIUS.into(), + width: BORDER_WIDTH, + color: Color { + a: ext.alpha_chart_badge, + ..colors.secondary + }, }, text_color: Color { a: ext.alpha_chart_badge, ..colors.text_body }, + shadow: Shadow::default(), }, _ => button::StyleSheet::active(self, style), } diff --git a/src/gui/styles/checkbox.rs b/src/gui/styles/checkbox.rs index 6c6fbf3c..0897b649 100644 --- a/src/gui/styles/checkbox.rs +++ b/src/gui/styles/checkbox.rs @@ -3,7 +3,7 @@ #![allow(clippy::module_name_repetitions)] use iced::widget::checkbox::Appearance; -use iced::Background; +use iced::{Background, Border}; use crate::gui::styles::style_constants::BORDER_WIDTH; use crate::StyleType; @@ -25,9 +25,11 @@ impl iced::widget::checkbox::StyleSheet for StyleType { Appearance { background: Background::Color(ext.buttons_color), icon_color: colors.text_body, - border_radius: CHECKBOX_BORDER_RADIUS.into(), - border_width: if is_checked { BORDER_WIDTH } else { 0.0 }, - border_color: colors.secondary, + border: Border { + radius: CHECKBOX_BORDER_RADIUS.into(), + width: if is_checked { BORDER_WIDTH } else { 0.0 }, + color: colors.secondary, + }, text_color: None, } } @@ -38,9 +40,11 @@ impl iced::widget::checkbox::StyleSheet for StyleType { Appearance { background: Background::Color(ext.buttons_color), icon_color: colors.text_body, - border_radius: CHECKBOX_BORDER_RADIUS.into(), - border_width: BORDER_WIDTH, - border_color: colors.secondary, + border: Border { + radius: CHECKBOX_BORDER_RADIUS.into(), + width: BORDER_WIDTH, + color: colors.secondary, + }, text_color: None, } } diff --git a/src/gui/styles/container.rs b/src/gui/styles/container.rs index 10432686..b8816974 100644 --- a/src/gui/styles/container.rs +++ b/src/gui/styles/container.rs @@ -3,7 +3,7 @@ #![allow(clippy::module_name_repetitions)] use iced::widget::container::Appearance; -use iced::{Background, Color}; +use iced::{Background, Border, Color, Shadow}; use crate::gui::styles::style_constants::{BORDER_ROUNDED_RADIUS, BORDER_WIDTH}; use crate::gui::styles::types::gradient_type::{get_gradient_headers, GradientType}; @@ -56,32 +56,35 @@ impl iced::widget::container::StyleSheet for StyleType { ContainerType::Modal => Background::Color(colors.primary), ContainerType::Standard => Background::Color(Color::TRANSPARENT), }), - border_radius: match style { - ContainerType::BorderedRound => BORDER_ROUNDED_RADIUS.into(), - ContainerType::Modal => { - [0.0, 0.0, BORDER_ROUNDED_RADIUS, BORDER_ROUNDED_RADIUS].into() - } - ContainerType::Tooltip => 7.0.into(), - ContainerType::Badge | ContainerType::Highlighted => 100.0.into(), - _ => 0.0.into(), - }, - border_width: match style { - ContainerType::Standard - | ContainerType::Modal - | ContainerType::Neutral - | ContainerType::Gradient(_) - | ContainerType::Highlighted => 0.0, - ContainerType::Tooltip => BORDER_WIDTH / 2.0, - ContainerType::BorderedRound => BORDER_WIDTH * 2.0, - _ => BORDER_WIDTH, - }, - border_color: match style { - ContainerType::Palette => Color::BLACK, - _ => Color { - a: ext.alpha_round_borders, - ..ext.buttons_color + border: Border { + radius: match style { + ContainerType::BorderedRound => BORDER_ROUNDED_RADIUS.into(), + ContainerType::Modal => { + [0.0, 0.0, BORDER_ROUNDED_RADIUS, BORDER_ROUNDED_RADIUS].into() + } + ContainerType::Tooltip => 7.0.into(), + ContainerType::Badge | ContainerType::Highlighted => 100.0.into(), + _ => 0.0.into(), + }, + width: match style { + ContainerType::Standard + | ContainerType::Modal + | ContainerType::Neutral + | ContainerType::Gradient(_) + | ContainerType::Highlighted => 0.0, + ContainerType::Tooltip => BORDER_WIDTH / 2.0, + ContainerType::BorderedRound => BORDER_WIDTH * 2.0, + _ => BORDER_WIDTH, + }, + color: match style { + ContainerType::Palette => Color::BLACK, + _ => Color { + a: ext.alpha_round_borders, + ..ext.buttons_color + }, }, }, + shadow: Shadow::default(), } } } diff --git a/src/gui/styles/picklist.rs b/src/gui/styles/picklist.rs index 5f36d612..12982fb4 100644 --- a/src/gui/styles/picklist.rs +++ b/src/gui/styles/picklist.rs @@ -3,7 +3,7 @@ #![allow(clippy::module_name_repetitions)] use iced::widget::pick_list; -use iced::{Background, Color}; +use iced::{Background, Border, Color}; use crate::gui::styles::style_constants::BORDER_WIDTH; use crate::gui::styles::types::palette::mix_colors; @@ -26,9 +26,11 @@ impl iced::overlay::menu::StyleSheet for StyleType { iced::overlay::menu::Appearance { text_color: colors.text_body, background: Background::Color(ext.buttons_color), - border_width: BORDER_WIDTH, - border_radius: PICKLIST_BORDER_RADIUS.into(), - border_color: colors.secondary, + border: Border { + width: BORDER_WIDTH, + radius: PICKLIST_BORDER_RADIUS.into(), + color: colors.secondary, + }, selected_text_color: colors.text_body, selected_background: Background::Color(mix_colors(ext.buttons_color, colors.primary)), } @@ -46,9 +48,11 @@ impl pick_list::StyleSheet for StyleType { placeholder_color: colors.text_body, handle_color: colors.text_body, background: Background::Color(ext.buttons_color), - border_radius: PICKLIST_BORDER_RADIUS.into(), - border_width: 0.0, - border_color: Color::TRANSPARENT, + border: Border { + radius: PICKLIST_BORDER_RADIUS.into(), + width: 0.0, + color: Color::TRANSPARENT, + }, } } @@ -60,9 +64,11 @@ impl pick_list::StyleSheet for StyleType { placeholder_color: colors.text_body, handle_color: colors.text_body, background: Background::Color(mix_colors(ext.buttons_color, colors.primary)), - border_radius: PICKLIST_BORDER_RADIUS.into(), - border_width: BORDER_WIDTH, - border_color: colors.secondary, + border: Border { + radius: PICKLIST_BORDER_RADIUS.into(), + width: BORDER_WIDTH, + color: colors.secondary, + }, } } } diff --git a/src/gui/styles/scrollbar.rs b/src/gui/styles/scrollbar.rs index cf7b1834..6e575cc4 100644 --- a/src/gui/styles/scrollbar.rs +++ b/src/gui/styles/scrollbar.rs @@ -2,9 +2,10 @@ #![allow(clippy::module_name_repetitions)] -use iced::widget::scrollable::Properties; +use iced::widget::container; +use iced::widget::scrollable::{Appearance, Properties}; use iced::widget::scrollable::{Scrollbar, Scroller}; -use iced::{Background, Color}; +use iced::{Background, Border, Color}; use crate::gui::styles::style_constants::BORDER_ROUNDED_RADIUS; use crate::gui::styles::types::palette::mix_colors; @@ -25,46 +26,62 @@ impl ScrollbarType { impl iced::widget::scrollable::StyleSheet for StyleType { type Style = ScrollbarType; - fn active(&self, _: &Self::Style) -> Scrollbar { + fn active(&self, _: &Self::Style) -> Appearance { let ext = self.get_extension(); - Scrollbar { - background: Some(Background::Color(Color::TRANSPARENT)), - border_radius: BORDER_ROUNDED_RADIUS.into(), - border_width: 0.0, - border_color: Color::TRANSPARENT, - scroller: Scroller { - color: Color { - a: ext.alpha_round_borders, - ..ext.buttons_color + Appearance { + container: container::Appearance::default(), + scrollbar: Scrollbar { + background: Some(Background::Color(Color::TRANSPARENT)), + scroller: Scroller { + color: Color { + a: ext.alpha_round_borders, + ..ext.buttons_color + }, + border: Border { + radius: BORDER_ROUNDED_RADIUS.into(), + width: 0.0, + color: Color::TRANSPARENT, + }, + }, + border: Border { + radius: BORDER_ROUNDED_RADIUS.into(), + width: 0.0, + color: Color::TRANSPARENT, }, - border_radius: BORDER_ROUNDED_RADIUS.into(), - border_width: 0.0, - border_color: Color::TRANSPARENT, }, + gap: None, } } - fn hovered(&self, _: &Self::Style, is_mouse_over_scrollbar: bool) -> Scrollbar { + fn hovered(&self, _: &Self::Style, is_mouse_over_scrollbar: bool) -> Appearance { let colors = self.get_palette(); let ext = self.get_extension(); - Scrollbar { - background: Some(Background::Color(Color { - a: ext.alpha_round_borders, - ..ext.buttons_color - })), - border_radius: BORDER_ROUNDED_RADIUS.into(), - border_width: 0.0, - border_color: Color::TRANSPARENT, - scroller: Scroller { - color: if is_mouse_over_scrollbar { - colors.secondary - } else { - mix_colors(colors.secondary, ext.buttons_color) + Appearance { + container: container::Appearance::default(), + scrollbar: Scrollbar { + background: Some(Background::Color(Color { + a: ext.alpha_round_borders, + ..ext.buttons_color + })), + scroller: Scroller { + color: if is_mouse_over_scrollbar { + colors.secondary + } else { + mix_colors(colors.secondary, ext.buttons_color) + }, + border: Border { + radius: BORDER_ROUNDED_RADIUS.into(), + width: 0.0, + color: Color::TRANSPARENT, + }, + }, + border: Border { + radius: BORDER_ROUNDED_RADIUS.into(), + width: 0.0, + color: Color::TRANSPARENT, }, - border_radius: BORDER_ROUNDED_RADIUS.into(), - border_width: 0.0, - border_color: Color::TRANSPARENT, }, + gap: None, } } } diff --git a/src/gui/styles/style_constants.rs b/src/gui/styles/style_constants.rs index 64fc09a7..720ff6b8 100644 --- a/src/gui/styles/style_constants.rs +++ b/src/gui/styles/style_constants.rs @@ -1,6 +1,6 @@ //! Module defining the constants used for aesthetic purposes (colors, borders...) -use iced::font::{Family, Stretch, Weight}; +use iced::font::{Family, Stretch, Style, Weight}; use iced::{Color, Font}; use crate::gui::app::{FONT_FAMILY_NAME, ICON_FONT_FAMILY_NAME}; @@ -196,7 +196,7 @@ pub const SARASA_MONO_BOLD: Font = Font { family: Family::Name(FONT_FAMILY_NAME), weight: Weight::Bold, stretch: Stretch::Normal, - monospaced: true, + style: Style::Normal, }; pub const SARASA_MONO_BYTES: &[u8] = @@ -205,7 +205,7 @@ pub const SARASA_MONO: Font = Font { family: Family::Name(FONT_FAMILY_NAME), weight: Weight::Normal, stretch: Stretch::Normal, - monospaced: true, + style: Style::Normal, }; //font to display icons diff --git a/src/gui/styles/text.rs b/src/gui/styles/text.rs index 443ba91c..63a1cf60 100644 --- a/src/gui/styles/text.rs +++ b/src/gui/styles/text.rs @@ -4,7 +4,7 @@ use iced::widget::text::Appearance; use iced::widget::{Column, Text}; -use iced::{Color, Font, Renderer}; +use iced::{Color, Font}; use crate::gui::types::message::Message; use crate::StyleType; @@ -28,7 +28,7 @@ impl TextType { subtitle: &str, desc: &str, font: Font, - ) -> Column<'static, Message, Renderer> { + ) -> Column<'static, Message, StyleType> { Column::new() .push( Text::new(format!("{subtitle}:")) diff --git a/src/gui/styles/text_input.rs b/src/gui/styles/text_input.rs index c494068d..1863f5c3 100644 --- a/src/gui/styles/text_input.rs +++ b/src/gui/styles/text_input.rs @@ -3,7 +3,7 @@ #![allow(clippy::module_name_repetitions)] use iced::widget::text_input::Appearance; -use iced::{Background, Color}; +use iced::{Background, Border, Color}; use crate::gui::styles::style_constants::BORDER_WIDTH; use crate::StyleType; @@ -32,12 +32,14 @@ impl iced::widget::text_input::StyleSheet for StyleType { ..ext.buttons_color }, }), - border_radius: TEXT_INPUT_BORDER_RADIUS.into(), - border_width: BORDER_WIDTH, - border_color: match style { - TextInputType::Badge => Color::TRANSPARENT, - TextInputType::Standard => ext.buttons_color, - TextInputType::Error => Color::new(0.8, 0.15, 0.15, 1.0), + border: Border { + radius: TEXT_INPUT_BORDER_RADIUS.into(), + width: BORDER_WIDTH, + color: match style { + TextInputType::Badge => Color::TRANSPARENT, + TextInputType::Standard => ext.buttons_color, + TextInputType::Error => Color::new(0.8, 0.15, 0.15, 1.0), + }, }, icon_color: Color { a: if ext.is_nightly { 0.2 } else { 0.7 }, @@ -51,11 +53,13 @@ impl iced::widget::text_input::StyleSheet for StyleType { let is_nightly = self.get_extension().is_nightly; Appearance { background: Background::Color(colors.primary), - border_radius: TEXT_INPUT_BORDER_RADIUS.into(), - border_width: BORDER_WIDTH, - border_color: match style { - TextInputType::Error => Color::new(0.8, 0.15, 0.15, 1.0), - _ => colors.secondary, + border: Border { + radius: TEXT_INPUT_BORDER_RADIUS.into(), + width: BORDER_WIDTH, + color: match style { + TextInputType::Error => Color::new(0.8, 0.15, 0.15, 1.0), + _ => colors.secondary, + }, }, icon_color: Color { a: if is_nightly { 0.2 } else { 0.7 }, @@ -103,11 +107,13 @@ impl iced::widget::text_input::StyleSheet for StyleType { TextInputType::Badge => Color::TRANSPARENT, _ => ext.buttons_color, }), - border_radius: TEXT_INPUT_BORDER_RADIUS.into(), - border_width: BORDER_WIDTH, - border_color: match style { - TextInputType::Error => Color::new(0.8, 0.15, 0.15, 1.0), - _ => colors.secondary, + border: Border { + radius: TEXT_INPUT_BORDER_RADIUS.into(), + width: BORDER_WIDTH, + color: match style { + TextInputType::Error => Color::new(0.8, 0.15, 0.15, 1.0), + _ => colors.secondary, + }, }, icon_color: Color { a: if ext.is_nightly { 0.2 } else { 0.7 }, @@ -127,15 +133,17 @@ impl iced::widget::text_input::StyleSheet for StyleType { ..ext.buttons_color }, }), - border_radius: TEXT_INPUT_BORDER_RADIUS.into(), - border_width: BORDER_WIDTH, - border_color: match style { - TextInputType::Badge => Color::TRANSPARENT, - TextInputType::Standard => Color { - a: ext.alpha_round_borders, - ..ext.buttons_color + border: Border { + radius: TEXT_INPUT_BORDER_RADIUS.into(), + width: BORDER_WIDTH, + color: match style { + TextInputType::Badge => Color::TRANSPARENT, + TextInputType::Standard => Color { + a: ext.alpha_round_borders, + ..ext.buttons_color + }, + TextInputType::Error => Color::new(0.8, 0.15, 0.15, ext.alpha_round_borders), }, - TextInputType::Error => Color::new(0.8, 0.15, 0.15, ext.alpha_round_borders), }, icon_color: Color { a: if ext.is_nightly { 0.2 } else { 0.7 }, diff --git a/src/gui/styles/toggler.rs b/src/gui/styles/toggler.rs index 73b6ca69..74c16a55 100644 --- a/src/gui/styles/toggler.rs +++ b/src/gui/styles/toggler.rs @@ -2,6 +2,7 @@ #![allow(clippy::module_name_repetitions)] +use crate::gui::styles::style_constants::BORDER_WIDTH; use iced::widget::toggler::Appearance; use iced::Color; @@ -19,44 +20,50 @@ impl iced::widget::toggler::StyleSheet for StyleType { fn active(&self, _: &Self::Style, is_active: bool) -> iced::widget::toggler::Appearance { let colors = self.get_palette(); let ext = self.get_extension(); + let bg_color = if is_active { + Color { + a: ext.alpha_chart_badge, + ..colors.secondary + } + } else { + ext.buttons_color + }; Appearance { - background: if is_active { - Color { - a: ext.alpha_chart_badge, - ..colors.secondary - } - } else { - ext.buttons_color - }, - background_border: Some(ext.buttons_color), + background: bg_color, + background_border_width: BORDER_WIDTH, + background_border_color: bg_color, foreground: colors.primary, - foreground_border: Some(if is_active { + foreground_border_width: BORDER_WIDTH, + foreground_border_color: if is_active { colors.secondary } else { - ext.buttons_color - }), + Color::TRANSPARENT + }, } } fn hovered(&self, _: &Self::Style, is_active: bool) -> iced::widget::toggler::Appearance { let colors = self.get_palette(); let ext = self.get_extension(); + let bg_color = if is_active { + Color { + a: ext.alpha_chart_badge, + ..colors.secondary + } + } else { + ext.buttons_color + }; Appearance { - background: if is_active { - Color { - a: ext.alpha_chart_badge, - ..colors.secondary - } - } else { - ext.buttons_color - }, - background_border: Some(colors.secondary), + background: bg_color, + background_border_width: BORDER_WIDTH, + background_border_color: colors.secondary, foreground: colors.primary, - foreground_border: Some(if is_active { + foreground_border_width: BORDER_WIDTH, + foreground_border_color: if is_active { colors.secondary } else { - ext.buttons_color - }), + Color::TRANSPARENT + }, } } } diff --git a/src/gui/styles/types/gradient_type.rs b/src/gui/styles/types/gradient_type.rs index 56cb32fa..9b960860 100644 --- a/src/gui/styles/types/gradient_type.rs +++ b/src/gui/styles/types/gradient_type.rs @@ -25,7 +25,7 @@ pub fn get_gradient_headers( Color::WHITE }; Gradient::Linear( - iced::gradient::Linear::new(Degrees(180.0)) + iced::gradient::Linear::new(Degrees(90.0)) .add_stop( 0.0, match gradient_type { @@ -59,7 +59,7 @@ pub fn get_gradient_buttons( Color::WHITE }; Gradient::Linear( - iced::gradient::Linear::new(Degrees(225.0)) + iced::gradient::Linear::new(Degrees(135.0)) .add_stop( 0.0, Color { @@ -92,7 +92,7 @@ pub fn get_gradient_hovered_buttons( Color::WHITE }; Gradient::Linear( - iced::gradient::Linear::new(Degrees(225.0)) + iced::gradient::Linear::new(Degrees(135.0)) .add_stop(0.0, colors.secondary) .add_stop( 1.0, diff --git a/src/gui/types/message.rs b/src/gui/types/message.rs index 3a85881d..f7ded251 100644 --- a/src/gui/types/message.rs +++ b/src/gui/types/message.rs @@ -1,5 +1,3 @@ -use iced::font; - use crate::gui::components::types::my_modal::MyModal; use crate::gui::pages::types::running_page::RunningPage; use crate::gui::pages::types::settings_page::SettingsPage; @@ -89,8 +87,6 @@ pub enum Message { ArrowPressed(bool), /// Emit when the main window be focused WindowFocused, - /// Result after loading a custom font - FontLoaded(Result<(), font::Error>), /// Enable or disable gradients GradientsSelection(GradientType), /// Set UI scale factor diff --git a/src/gui/types/sniffer.rs b/src/gui/types/sniffer.rs index f8c478d4..66db58f0 100644 --- a/src/gui/types/sniffer.rs +++ b/src/gui/types/sniffer.rs @@ -6,6 +6,7 @@ use std::path::PathBuf; use std::sync::{Arc, Mutex}; use std::thread; +use iced::window::Id; use iced::{window, Command}; use pcap::Device; use rfd::FileHandle; @@ -294,7 +295,7 @@ impl Sniffer { // } Message::CloseRequested => { self.configs.lock().unwrap().clone().store(); - return window::close(); + return window::close(Id::MAIN); } Message::CopyIp(string) => { self.timing_events.copy_ip_now(string.clone()); @@ -316,7 +317,7 @@ impl Sniffer { Message::ServiceSortSelection(sort_type) => { self.service_sort_type = sort_type; } - Message::TickInit | Message::FontLoaded(_) => {} + Message::TickInit => {} } Command::none() } diff --git a/src/main.rs b/src/main.rs index 0df1b33c..58b3d056 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,12 +2,13 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +use std::borrow::Cow; use std::sync::{Arc, Mutex}; use std::{panic, process, thread}; #[cfg(target_os = "linux")] -use iced::window::PlatformSpecific; -use iced::{window, Application, Font, Settings}; +use iced::window::settings::PlatformSpecific; +use iced::{window, Application, Font, Pixels, Settings}; use chart::types::chart_type::ChartType; use chart::types::traffic_chart::TrafficChart; @@ -28,9 +29,10 @@ use report::types::report_sort_type::ReportSortType; use translations::types::language::Language; use utils::formatted_strings::print_cli_welcome_message; -use crate::configs::types::config_window::{ConfigWindow, ToPosition}; +use crate::configs::types::config_window::{ConfigWindow, ToPosition, ToSize}; use crate::configs::types::configs::Configs; use crate::gui::app::FONT_FAMILY_NAME; +use crate::gui::styles::style_constants::{ICONS_BYTES, SARASA_MONO_BOLD_BYTES, SARASA_MONO_BYTES}; use crate::secondary_threads::check_updates::set_newer_release_status; mod chart; @@ -91,9 +93,9 @@ pub fn main() -> iced::Result { // id needed for Linux Wayland; should match StartupWMClass in .desktop file; see issue #292 id: Some(String::from(SNIFFNET_LOWERCASE)), window: window::Settings { - size, // start size + size: size.to_size(), // start size position: position.to_position(), - min_size: Some((800, 500)), // min size allowed + min_size: Some((800, 500).to_size()), // min size allowed max_size: None, visible: true, resizable: true, @@ -104,12 +106,17 @@ pub fn main() -> iced::Result { platform_specific: PlatformSpecific { application_id: String::from(SNIFFNET_LOWERCASE), }, + exit_on_close_request: false, ..Default::default() }, flags: Sniffer::new(&configs1, newer_release_available1), + fonts: vec![ + Cow::Borrowed(SARASA_MONO_BYTES), + Cow::Borrowed(SARASA_MONO_BOLD_BYTES), + Cow::Borrowed(ICONS_BYTES), + ], default_font: Font::with_name(FONT_FAMILY_NAME), - default_text_size: FONT_SIZE_BODY, + default_text_size: Pixels(FONT_SIZE_BODY), antialiasing: false, - exit_on_close_request: false, }) } diff --git a/src/networking/types/my_link_type.rs b/src/networking/types/my_link_type.rs index 7aff1c2f..68a77fbc 100644 --- a/src/networking/types/my_link_type.rs +++ b/src/networking/types/my_link_type.rs @@ -1,5 +1,5 @@ use iced::widget::Column; -use iced::{Font, Renderer}; +use iced::Font; use pcap::Linktype; use crate::gui::styles::text::TextType; @@ -61,7 +61,7 @@ impl MyLinkType { self, language: Language, font: Font, - ) -> Column<'static, Message, Renderer> { + ) -> Column<'static, Message, StyleType> { match self { Self::Null(l) | Self::Ethernet(l) diff --git a/src/notifications/types/sound.rs b/src/notifications/types/sound.rs index a0c16d45..4b0cb23a 100644 --- a/src/notifications/types/sound.rs +++ b/src/notifications/types/sound.rs @@ -3,7 +3,7 @@ use std::thread; use iced::alignment::{Horizontal, Vertical}; use iced::widget::Text; -use iced::{Font, Length, Renderer}; +use iced::{Font, Length}; use rodio::{Decoder, OutputStream, Sink}; use serde::{Deserialize, Serialize}; @@ -43,7 +43,7 @@ impl Sound { } } - pub fn get_text(self, font: Font) -> iced::widget::Text<'static, Renderer> { + pub fn get_text(self, font: Font) -> iced::widget::Text<'static, StyleType> { match self { Sound::Gulp => Text::new("Gulp").font(font), Sound::Pop => Text::new("Pop").font(font), diff --git a/src/report/types/report_sort_type.rs b/src/report/types/report_sort_type.rs index b435e9cc..4de73273 100644 --- a/src/report/types/report_sort_type.rs +++ b/src/report/types/report_sort_type.rs @@ -1,7 +1,6 @@ use std::fmt::Debug; use iced::widget::Text; -use iced::Renderer; use crate::gui::styles::button::ButtonType; use crate::gui::styles::types::style_type::StyleType; @@ -31,7 +30,7 @@ impl ReportSortType { } } - pub fn icon(self, report_col: &ReportCol) -> Text<'static, Renderer> { + pub fn icon(self, report_col: &ReportCol) -> Text<'static, StyleType> { match report_col { ReportCol::Bytes => self.byte_sort.icon(), ReportCol::Packets => self.packet_sort.icon(), diff --git a/src/report/types/sort_type.rs b/src/report/types/sort_type.rs index 3f514674..bd47abdc 100644 --- a/src/report/types/sort_type.rs +++ b/src/report/types/sort_type.rs @@ -2,7 +2,6 @@ use crate::gui::styles::button::ButtonType; use crate::gui::styles::types::style_type::StyleType; use crate::utils::types::icon::Icon; use iced::widget::Text; -use iced::Renderer; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] pub enum SortType { @@ -21,7 +20,7 @@ impl SortType { } } - pub fn icon(self) -> Text<'static, Renderer> { + pub fn icon(self) -> Text<'static, StyleType> { let mut size = 14; match self { SortType::Ascending => Icon::SortAscending, diff --git a/src/translations/translations.rs b/src/translations/translations.rs index 5e3579de..aa6778de 100644 --- a/src/translations/translations.rs +++ b/src/translations/translations.rs @@ -1,12 +1,11 @@ // EXTRA NEEDED CHARACTERS: Б use iced::widget::Text; -use iced::Renderer; use crate::translations::types::language::Language; use crate::StyleType; -pub fn choose_adapters_translation(language: Language) -> Text<'static, Renderer> { +pub fn choose_adapters_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => "Select network adapter to inspect", Language::IT => "Seleziona la scheda di rete da ispezionare", @@ -54,7 +53,7 @@ pub fn choose_adapters_translation(language: Language) -> Text<'static, Renderer // } // } -pub fn select_filters_translation(language: Language) -> Text<'static, Renderer> { +pub fn select_filters_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => "Select filters to be applied on network traffic", Language::IT => "Seleziona i filtri da applicare al traffico di rete", @@ -212,7 +211,7 @@ pub fn protocol_translation(language: Language) -> &'static str { } } -pub fn traffic_rate_translation(language: Language) -> Text<'static, Renderer> { +pub fn traffic_rate_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => "Traffic rate", Language::IT => "Intensità del traffico", @@ -236,7 +235,7 @@ pub fn traffic_rate_translation(language: Language) -> Text<'static, Renderer Text<'static, Renderer> { +// pub fn relevant_connections_translation(language: Language) -> Text<'static, StyleType> { // Text::new(match language { // Language::EN => "Relevant connections:", // Language::IT => "Connessioni rilevanti:", @@ -282,7 +281,7 @@ pub fn settings_translation(language: Language) -> &'static str { } } -pub fn yes_translation(language: Language) -> Text<'static, Renderer> { +pub fn yes_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => "Yes", Language::IT => "Sì", @@ -305,7 +304,7 @@ pub fn yes_translation(language: Language) -> Text<'static, Renderer> }) } -pub fn ask_quit_translation(language: Language) -> Text<'static, Renderer> { +pub fn ask_quit_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => "Are you sure you want to quit this analysis?", Language::IT => "Sei sicuro di voler interrompere questa analisi?", @@ -353,7 +352,7 @@ pub fn quit_analysis_translation(language: Language) -> String { } } -pub fn ask_clear_all_translation(language: Language) -> Text<'static, Renderer> { +pub fn ask_clear_all_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => "Are you sure you want to clear notifications?", Language::IT => "Sei sicuro di voler eliminare le notifiche?", @@ -449,10 +448,7 @@ pub fn network_adapter_translation(language: Language) -> &'static str { } } -pub fn no_addresses_translation( - language: Language, - adapter: &str, -) -> Text<'static, Renderer> { +pub fn no_addresses_translation(language: Language, adapter: &str) -> Text<'static, StyleType> { let network_adapter_translation = network_adapter_translation(language); Text::new(match language { Language::EN => format!("No traffic can be observed because the adapter you selected has no active addresses...\n\n\ @@ -515,10 +511,7 @@ pub fn no_addresses_translation( }) } -pub fn waiting_translation( - language: Language, - adapter: &str, -) -> Text<'static, Renderer> { +pub fn waiting_translation(language: Language, adapter: &str) -> Text<'static, StyleType> { let network_adapter_translation = network_adapter_translation(language); Text::new(match language { Language::EN => format!("No traffic has been observed yet. Waiting for network packets...\n\n\ @@ -582,10 +575,7 @@ pub fn waiting_translation( }) } -pub fn some_observed_translation( - language: Language, - observed: u128, -) -> Text<'static, Renderer> { +pub fn some_observed_translation(language: Language, observed: u128) -> Text<'static, StyleType> { Text::new(match language { Language::EN => format!("Total intercepted packets: {observed}\n\n\ Filtered packets: 0\n\n\ @@ -733,7 +723,7 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { } } -// pub fn filtered_application_translation(language: Language) -> Text<'static, Renderer> { +// pub fn filtered_application_translation(language: Language) -> Text<'static,StyleType> { // Text::new(match language { // Language::EN => "Filtered packets per application protocol:", // Language::IT => "Pacchetti filtrati per protocollo applicativo:", @@ -755,7 +745,7 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { // }) // } -// pub fn no_favorites_translation(language: Language) -> Text<'static, Renderer> { +// pub fn no_favorites_translation(language: Language) -> Text<'static, StyleType> { // Text::new(match language { // Language::EN => "Nothing to show at the moment.\n\ // To add a connection to your favorites, click on the star symbol near the connection.", @@ -794,7 +784,7 @@ pub fn of_total_translation(language: Language, percentage: &str) -> String { // }) // } -pub fn error_translation(language: Language, error: &str) -> Text<'static, Renderer> { +pub fn error_translation(language: Language, error: &str) -> Text<'static, StyleType> { Text::new(match language { Language::EN => format!( "An error occurred! \n\n\ @@ -1119,7 +1109,7 @@ pub fn bytes_chart_translation(language: Language) -> &'static str { // } // } -pub fn notifications_title_translation(language: Language) -> Text<'static, Renderer> { +pub fn notifications_title_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => "Customize your notifications", Language::IT => "Personalizza le tue notifiche", @@ -1143,7 +1133,7 @@ pub fn notifications_title_translation(language: Language) -> Text<'static, Rend }) } -pub fn appearance_title_translation(language: Language) -> Text<'static, Renderer> { +pub fn appearance_title_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => "Choose your favorite theme", Language::IT => "Scegli il tuo tema preferito", @@ -1774,7 +1764,7 @@ pub fn favorite_transmitted_translation(language: Language) -> &'static str { } } -pub fn no_notifications_set_translation(language: Language) -> Text<'static, Renderer> { +pub fn no_notifications_set_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => "You haven't enabled notifications yet!\n\n\ After enabling them, this page will display a log of your notifications\n\n\ @@ -1836,9 +1826,7 @@ pub fn no_notifications_set_translation(language: Language) -> Text<'static, Ren }) } -pub fn no_notifications_received_translation( - language: Language, -) -> Text<'static, Renderer> { +pub fn no_notifications_received_translation(language: Language) -> Text<'static, StyleType> { Text::new(match language { Language::EN => { "Nothing to see at the moment...\n\n\ diff --git a/src/translations/translations_3.rs b/src/translations/translations_3.rs index b6ed4ca1..2e84a6db 100644 --- a/src/translations/translations_3.rs +++ b/src/translations/translations_3.rs @@ -1,7 +1,6 @@ #![allow(clippy::match_same_arms)] use iced::widget::Text; -use iced::Renderer; use crate::translations::translations::network_adapter_translation; use crate::{Language, StyleType}; @@ -105,7 +104,7 @@ pub fn link_type_translation(language: Language) -> &'static str { pub fn unsupported_link_type_translation( language: Language, adapter: &str, -) -> Text<'static, Renderer> { +) -> Text<'static, StyleType> { let mut string = match language { Language::EN => "The link type associated with this adapter is not supported by Sniffnet yet...", Language::ES => "La conexión asociada con este adaptador aún no esta implementada en Sniffnet...", diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index bfa62e60..cc0fab48 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -2,7 +2,6 @@ use std::fmt; use iced::widget::svg::Handle; use iced::widget::Svg; -use iced::{Length, Renderer}; use serde::{Deserialize, Serialize}; use crate::countries::flags_pictures::{ @@ -81,7 +80,7 @@ impl Language { Language::ZH, ]; - pub fn get_flag(self) -> Svg> { + pub fn get_flag(self) -> Svg { Svg::new(Handle::from_memory(Vec::from(match self { Language::ZH => CN, Language::DE => DE, @@ -103,7 +102,7 @@ impl Language { Language::JA => JP, Language::UZ => UZ, }))) - .width(Length::Fixed(FLAGS_WIDTH_BIG)) + .width(FLAGS_WIDTH_BIG) } } diff --git a/src/utils/types/icon.rs b/src/utils/types/icon.rs index 6b2d6044..62606a1d 100644 --- a/src/utils/types/icon.rs +++ b/src/utils/types/icon.rs @@ -1,5 +1,4 @@ use iced::widget::Text; -use iced::Renderer; use crate::gui::styles::style_constants::ICONS; use crate::StyleType; @@ -29,6 +28,7 @@ pub enum Icon { Inspect, Lightning, Notification, + OpenLink, Overview, PacketsThreshold, // Restore, @@ -82,14 +82,15 @@ impl Icon { Icon::SortAscending => 'm', Icon::SortDescending => 'l', Icon::SortNeutral => 'n', + Icon::OpenLink => 'o', } } - pub fn to_text(&self) -> iced::widget::Text<'static, Renderer> { + pub fn to_text(&self) -> iced::widget::Text<'static, StyleType> { Text::new(self.codepoint().to_string()).font(ICONS) } - pub fn get_hourglass(num: usize) -> iced::widget::Text<'static, Renderer> { + pub fn get_hourglass(num: usize) -> iced::widget::Text<'static, StyleType> { match num { 1 => Icon::Hourglass1.to_text(), 2 => Icon::Hourglass2.to_text(),