diff --git a/Cargo.lock b/Cargo.lock index 0073d005..1b5dc416 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,53 +20,53 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.16.3" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b76d84ee70e30a4a7e39ab9018e2b17a6a09e31084176cc7c0b2dec036ba45" +checksum = "e25ae84c0260bdf5df07796d7cc4882460de26a2b406ec0e6c42461a723b271b" [[package]] name = "accesskit_atspi_common" -version = "0.9.3" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5393c75d4666f580f4cac0a968bc97c36076bb536a129f28210dac54ee127ed" +checksum = "29bd41de2e54451a8ca0dd95ebf45b54d349d29ebceb7f20be264eee14e3d477" dependencies = [ "accesskit", "accesskit_consumer", "atspi-common", "serde", "thiserror 1.0.64", - "zvariant", + "zvariant 5.5.3", ] [[package]] name = "accesskit_consumer" -version = "0.24.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a12dc159d52233c43d9fe5415969433cbdd52c3d6e0df51bda7d447427b9986" +checksum = "8bfae7c152994a31dc7d99b8eeac7784a919f71d1b306f4b83217e110fd3824c" dependencies = [ "accesskit", - "immutable-chunkmap", + "hashbrown 0.15.3", ] [[package]] name = "accesskit_macos" -version = "0.17.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49509c722e8da39e6c569f7d13ec51620208988913e738abbc67e3c65f06e6d5" +checksum = "692dd318ff8a7a0ffda67271c4bd10cf32249656f4e49390db0b26ca92b095f2" dependencies = [ "accesskit", "accesskit_consumer", + "hashbrown 0.15.3", "objc2", "objc2-app-kit", "objc2-foundation", - "once_cell", ] [[package]] name = "accesskit_unix" -version = "0.12.3" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be7f5cf6165be10a54b2655fa2e0e12b2509f38ed6fc43e11c31fdb7ee6230bb" +checksum = "c5f7474c36606d0fe4f438291d667bae7042ea2760f506650ad2366926358fc8" dependencies = [ "accesskit", "accesskit_atspi_common", @@ -77,28 +77,28 @@ dependencies = [ "futures-lite", "futures-util", "serde", - "zbus", + "zbus 5.7.1", ] [[package]] name = "accesskit_windows" -version = "0.23.2" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "974e96c347384d9133427167fb8a58c340cb0496988dacceebdc1ed27071023b" +checksum = "70a042b62c9c05bf7b616f015515c17d2813f3ba89978d6f4fc369735d60700a" dependencies = [ "accesskit", "accesskit_consumer", - "paste", + "hashbrown 0.15.3", "static_assertions", - "windows 0.58.0", - "windows-core 0.58.0", + "windows 0.61.1", + "windows-core 0.61.2", ] [[package]] name = "accesskit_winit" -version = "0.22.3" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9987e852fe7e4e5a493f8c8af0b729b47da2750f0dea10a4c8984fe1117ebaec" +checksum = "5c1f0d3d13113d8857542a4f8d1a1c24d1dc1527b77aee8426127f4901588708" dependencies = [ "accesskit", "accesskit_macos", @@ -307,15 +307,15 @@ checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_log-sys" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ecc8056bf6ab9892dcd53216c83d1597487d7dacac16c8df6b877d127df9937" +checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d" [[package]] name = "android_logger" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b07e8e73d720a1f2e4b6014766e6039fd2e96a4fa44e2a78d0e1fa2ff49826" +checksum = "f6f39be698127218cca460cb624878c9aa4e2b47dba3b277963d2bf00bad263b" dependencies = [ "android_log-sys", "env_filter", @@ -538,7 +538,7 @@ dependencies = [ "wayland-backend", "wayland-client", "wayland-protocols", - "zbus", + "zbus 4.4.0", ] [[package]] @@ -818,9 +818,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atspi" -version = "0.22.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be534b16650e35237bb1ed189ba2aab86ce65e88cc84c66f4935ba38575cecbf" +checksum = "c83247582e7508838caf5f316c00791eee0e15c0bf743e6880585b867e16815c" dependencies = [ "atspi-common", "atspi-connection", @@ -829,42 +829,41 @@ dependencies = [ [[package]] name = "atspi-common" -version = "0.6.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1909ed2dc01d0a17505d89311d192518507e8a056a48148e3598fef5e7bb6ba7" +checksum = "33dfc05e7cdf90988a197803bf24f5788f94f7c94a69efa95683e8ffe76cfdfb" dependencies = [ "enumflags2", "serde", "static_assertions", - "zbus", + "zbus 5.7.1", "zbus-lockstep", "zbus-lockstep-macros", - "zbus_names", - "zvariant", + "zbus_names 4.2.0", + "zvariant 5.5.3", ] [[package]] name = "atspi-connection" -version = "0.6.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "430c5960624a4baaa511c9c0fcc2218e3b58f5dbcc47e6190cafee344b873333" +checksum = "4193d51303d8332304056ae0004714256b46b6635a5c556109b319c0d3784938" dependencies = [ "atspi-common", "atspi-proxies", "futures-lite", - "zbus", + "zbus 5.7.1", ] [[package]] name = "atspi-proxies" -version = "0.6.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e6c5de3e524cf967569722446bcd458d5032348554d9a17d7d72b041ab7496" +checksum = "d2eebcb9e7e76f26d0bcfd6f0295e1cd1e6f33bedbc5698a971db8dc43d7751c" dependencies = [ "atspi-common", "serde", - "zbus", - "zvariant", + "zbus 5.7.1", ] [[package]] @@ -954,12 +953,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -1027,11 +1020,11 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec 0.7.0", + "bit-vec 0.8.0", ] [[package]] @@ -1042,9 +1035,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bit-vec" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bit_field" @@ -1243,9 +1236,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" dependencies = [ "bytemuck_derive", ] @@ -1375,12 +1368,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "cfg_aliases" version = "0.2.1" @@ -1527,10 +1514,11 @@ dependencies = [ [[package]] name = "codespan-reporting" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ + "serde", "termcolor", "unicode-width", ] @@ -1547,37 +1535,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" -[[package]] -name = "com" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" -dependencies = [ - "com_macros", -] - -[[package]] -name = "com_macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" -dependencies = [ - "com_macros_support", - "proc-macro2 1.0.93", - "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 1.0.93", - "quote 1.0.37", - "syn 1.0.109", -] - [[package]] name = "combine" version = "4.6.7" @@ -1730,6 +1687,15 @@ dependencies = [ "objc", ] +[[package]] +name = "core_maths" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" +dependencies = [ + "libm", +] + [[package]] name = "cpufeatures" version = "0.2.14" @@ -1952,17 +1918,6 @@ dependencies = [ "syn 2.0.96", ] -[[package]] -name = "d3d12" -version = "22.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" -dependencies = [ - "bitflags 2.9.0", - "libloading", - "winapi 0.3.9", -] - [[package]] name = "darling" version = "0.14.4" @@ -2131,7 +2086,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1b84d32b18d9a256d81e4fec2e4cfd0ab6dde5e5ff49be1713ae0adbd0060c2" dependencies = [ "heck 0.5.0", - "indexmap 2.6.0", + "indexmap 2.9.0", "itertools 0.13.0", "proc-macro-crate", "proc-macro2 1.0.93", @@ -2149,13 +2104,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b48e8e38a4aa565da767322b5ca55fb0f8347983c5bc7f7647db069405420479" dependencies = [ "heck 0.5.0", - "indexmap 2.6.0", + "indexmap 2.9.0", "itertools 0.14.0", "proc-macro-crate", "proc-macro2 1.0.93", "quote 1.0.37", "sha3 0.10.8", - "strum 0.26.3", + "strum 0.27.1", "syn 2.0.96", "void", ] @@ -2376,9 +2331,9 @@ checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" [[package]] name = "document-features" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" +checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" dependencies = [ "litrs", ] @@ -2454,8 +2409,8 @@ dependencies = [ [[package]] name = "ecolor" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ "bytemuck", "emath", @@ -2524,8 +2479,8 @@ dependencies = [ [[package]] name = "eframe" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ "ahash", "bytemuck", @@ -2534,7 +2489,7 @@ dependencies = [ "egui-wgpu", "egui-winit", "egui_glow", - "glow 0.14.1", + "glow", "glutin", "glutin-winit", "image", @@ -2545,7 +2500,8 @@ dependencies = [ "objc2-foundation", "parking_lot 0.12.3", "percent-encoding", - "pollster", + "pollster 0.4.0", + "profiling", "raw-window-handle", "static_assertions", "wasm-bindgen", @@ -2554,27 +2510,30 @@ dependencies = [ "web-time", "wgpu", "winapi 0.3.9", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "winit", ] [[package]] name = "egui" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ "accesskit", "ahash", + "bitflags 2.9.0", "emath", "epaint", "log", "nohash-hasher", + "profiling", + "unicode-segmentation", ] [[package]] name = "egui-wgpu" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ "ahash", "bytemuck", @@ -2582,6 +2541,7 @@ dependencies = [ "egui", "epaint", "log", + "profiling", "thiserror 1.0.64", "type-map", "web-time", @@ -2591,14 +2551,16 @@ dependencies = [ [[package]] name = "egui-winit" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ "accesskit_winit", "ahash", "arboard", + "bytemuck", "egui", "log", + "profiling", "raw-window-handle", "smithay-clipboard", "web-time", @@ -2608,8 +2570,8 @@ dependencies = [ [[package]] name = "egui_extras" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ "ahash", "egui", @@ -2617,20 +2579,22 @@ dependencies = [ "image", "log", "mime_guess2", + "profiling", "resvg", ] [[package]] name = "egui_glow" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ "ahash", "bytemuck", "egui", - "glow 0.14.1", + "glow", "log", "memoffset", + "profiling", "wasm-bindgen", "web-sys", "winit", @@ -2663,8 +2627,8 @@ dependencies = [ [[package]] name = "emath" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ "bytemuck", ] @@ -2697,7 +2661,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" dependencies = [ "enum-map-derive", - "serde", ] [[package]] @@ -2779,8 +2742,8 @@ dependencies = [ [[package]] name = "epaint" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" dependencies = [ "ab_glyph", "ahash", @@ -2791,12 +2754,13 @@ dependencies = [ "log", "nohash-hasher", "parking_lot 0.12.3", + "profiling", ] [[package]] name = "epaint_default_fonts" -version = "0.29.1" -source = "git+https://github.com/emilk/egui?rev=5b846b4554fe47269affb43efef2cad8710a8a47#5b846b4554fe47269affb43efef2cad8710a8a47" +version = "0.31.1" +source = "git+https://github.com/ardocrat/egui?branch=back_button_android#1d498ae5660c5990e3caa9525f75bb9355e50e50" [[package]] name = "equivalent" @@ -2806,12 +2770,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3030,6 +2994,29 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +[[package]] +name = "fontconfig-parser" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbc773e24e02d4ddd8395fd30dc147524273a83e54e0f312d986ea30de5f5646" +dependencies = [ + "roxmltree", +] + +[[package]] +name = "fontdb" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2", + "slotmap", + "tinyvec", + "ttf-parser", +] + [[package]] name = "foreign-types" version = "0.3.2" @@ -3222,9 +3209,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" dependencies = [ "fastrand", "futures-core", @@ -3439,21 +3426,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.13.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "glow" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4a888dbe8181a7535853469c21c67ca9a1cea9460b16808fc018ea9e55d248" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" dependencies = [ "js-sys", "slotmap", @@ -3468,7 +3443,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec69412a0bf07ea7607e638b415447857a808846c2b685a43c8aa18bc6d5e499" dependencies = [ "bitflags 2.9.0", - "cfg_aliases 0.2.1", + "cfg_aliases", "cgl", "core-foundation 0.9.4", "dispatch", @@ -3492,7 +3467,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" dependencies = [ - "cfg_aliases 0.2.1", + "cfg_aliases", "glutin", "raw-window-handle", "winit", @@ -3548,15 +3523,14 @@ dependencies = [ [[package]] name = "gpu-allocator" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ "log", "presser", "thiserror 1.0.64", - "winapi 0.3.9", - "windows 0.52.0", + "windows 0.58.0", ] [[package]] @@ -3654,6 +3628,7 @@ dependencies = [ "tor-rtcompat", "ur", "url", + "usvg", "wgpu", "winit", ] @@ -3754,7 +3729,7 @@ dependencies = [ "rand 0.6.5", "serde", "serde_derive", - "siphasher", + "siphasher 0.3.11", "thiserror 1.0.64", "zeroize", ] @@ -4138,7 +4113,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.6.0", + "indexmap 2.9.0", "slab", "tokio 1.44.1", "tokio-util 0.7.12", @@ -4147,12 +4122,13 @@ dependencies = [ [[package]] name = "half" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" dependencies = [ "cfg-if 1.0.0", "crunchy", + "num-traits 0.2.19", ] [[package]] @@ -4173,9 +4149,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" dependencies = [ "allocator-api2", "equivalent", @@ -4191,21 +4167,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "hassle-rs" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" -dependencies = [ - "bitflags 2.9.0", - "com", - "libc", - "libloading", - "thiserror 1.0.64", - "widestring", - "winapi 0.3.9", -] - [[package]] name = "heck" version = "0.3.3" @@ -4660,9 +4621,9 @@ dependencies = [ [[package]] name = "imagesize" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" [[package]] name = "imgref" @@ -4670,15 +4631,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" -[[package]] -name = "immutable-chunkmap" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4419f022e55cc63d5bbd6b44b71e1d226b9c9480a47824c706e9d54e5c40c5eb" -dependencies = [ - "arrayvec 0.7.6", -] - [[package]] name = "indexmap" version = "1.9.3" @@ -4692,12 +4644,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.3", "serde", ] @@ -4891,10 +4843,11 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -4979,11 +4932,12 @@ dependencies = [ [[package]] name = "kurbo" -version = "0.9.5" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" +checksum = "1077d333efea6170d9ccb96d3c3026f300ca0773da4938cc4c811daa6df68b0c" dependencies = [ "arrayvec 0.7.6", + "smallvec", ] [[package]] @@ -5226,7 +5180,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.0", + "hashbrown 0.15.3", ] [[package]] @@ -5340,9 +5294,9 @@ dependencies = [ [[package]] name = "metal" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" dependencies = [ "bitflags 2.9.0", "block", @@ -5527,23 +5481,27 @@ dependencies = [ [[package]] name = "naga" -version = "22.1.0" +version = "25.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" +checksum = "2b977c445f26e49757f9aca3631c3b8b836942cb278d69a92e7b80d3b24da632" dependencies = [ "arrayvec 0.7.6", "bit-set", "bitflags 2.9.0", - "cfg_aliases 0.1.1", + "cfg_aliases", "codespan-reporting", + "half", + "hashbrown 0.15.3", "hexf-parse", - "indexmap 2.6.0", + "indexmap 2.9.0", "log", + "num-traits 0.2.19", + "once_cell", "rustc-hash", "spirv", - "termcolor", - "thiserror 1.0.64", - "unicode-xid 0.2.6", + "strum 0.26.3", + "thiserror 2.0.11", + "unicode-ident", ] [[package]] @@ -5670,7 +5628,20 @@ checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.9.0", "cfg-if 1.0.0", - "cfg_aliases 0.2.1", + "cfg_aliases", + "libc", + "memoffset", +] + +[[package]] +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags 2.9.0", + "cfg-if 1.0.0", + "cfg_aliases", "libc", "memoffset", ] @@ -6247,9 +6218,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "oneshot-fused-workaround" @@ -6593,7 +6564,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -6712,6 +6683,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + [[package]] name = "poly1305" version = "0.7.2" @@ -6723,6 +6700,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + [[package]] name = "postage" version = "0.5.0" @@ -6800,7 +6783,7 @@ checksum = "714c75db297bc88a63783ffc6ab9f830698a6705aa0201416931759ef4c8183d" dependencies = [ "autocfg 1.4.0", "equivalent", - "indexmap 2.6.0", + "indexmap 2.9.0", ] [[package]] @@ -6856,18 +6839,18 @@ dependencies = [ [[package]] name = "profiling" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" +checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" dependencies = [ "profiling-procmacros", ] [[package]] name = "profiling-procmacros" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" +checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" dependencies = [ "quote 1.0.37", "syn 2.0.96", @@ -6923,9 +6906,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.30.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" dependencies = [ "memchr", "serde", @@ -6933,9 +6916,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.36.2" +version = "0.37.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" dependencies = [ "memchr", ] @@ -7298,12 +7281,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rctree" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" - [[package]] name = "rdrand" version = "0.4.0" @@ -7466,9 +7443,9 @@ dependencies = [ [[package]] name = "resvg" -version = "0.37.0" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadccb3d99a9efb8e5e00c16fbb732cbe400db2ec7fc004697ee7d97d86cf1f4" +checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43" dependencies = [ "log", "pico-args", @@ -7507,7 +7484,7 @@ dependencies = [ "objc2", "objc2-app-kit", "objc2-foundation", - "pollster", + "pollster 0.3.0", "raw-window-handle", "urlencoding", "wasm-bindgen", @@ -7576,9 +7553,9 @@ dependencies = [ [[package]] name = "roxmltree" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "rqrr" @@ -7741,15 +7718,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags 2.9.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -7796,6 +7773,24 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +[[package]] +name = "rustybuzz" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" +dependencies = [ + "bitflags 2.9.0", + "bytemuck", + "core_maths", + "log", + "smallvec", + "ttf-parser", + "unicode-bidi-mirroring", + "unicode-ccc", + "unicode-properties", + "unicode-script", +] + [[package]] name = "ryu" version = "1.0.18" @@ -8105,7 +8100,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.6.0", + "indexmap 2.9.0", "serde", "serde_derive", "serde_json", @@ -8143,7 +8138,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.9.0", "itoa 1.0.11", "ryu", "serde", @@ -8301,6 +8296,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + [[package]] name = "slab" version = "0.4.9" @@ -8335,9 +8336,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "smithay-client-toolkit" @@ -8583,12 +8584,12 @@ checksum = "171758edb47aa306a78dfa4ab9aeb5167405bd4e3dc2b64e88f6a84bbe98bd63" [[package]] name = "svgtypes" -version = "0.13.0" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e44e288cd960318917cbd540340968b90becc8bc81f171345d706e7a89d9d70" +checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc" dependencies = [ "kurbo", - "siphasher", + "siphasher 1.0.1", ] [[package]] @@ -9144,7 +9145,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.9.0", "serde", "serde_spanned", "toml_datetime", @@ -9157,7 +9158,7 @@ version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.9.0", "serde", "serde_spanned", "toml_datetime", @@ -10311,6 +10312,9 @@ name = "ttf-parser" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5902c5d130972a0000f60860bfbf46f7ca3db5391eddfedd1b8728bd9dc96c0e" +dependencies = [ + "core_maths", +] [[package]] name = "type-map" @@ -10396,6 +10400,18 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +[[package]] +name = "unicode-bidi-mirroring" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe" + +[[package]] +name = "unicode-ccc" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" + [[package]] name = "unicode-ident" version = "1.0.13" @@ -10411,12 +10427,30 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + +[[package]] +name = "unicode-script" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f" + [[package]] name = "unicode-segmentation" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "unicode-vo" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" + [[package]] name = "unicode-width" version = "0.1.14" @@ -10499,46 +10533,29 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "usvg" -version = "0.37.0" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b0a51b72ab80ca511d126b77feeeb4fb1e972764653e61feac30adc161a756" -dependencies = [ - "base64 0.21.7", - "log", - "pico-args", - "usvg-parser", - "usvg-tree", - "xmlwriter", -] - -[[package]] -name = "usvg-parser" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd4e3c291f45d152929a31f0f6c819245e2921bfd01e7bd91201a9af39a2bdc" +checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef" dependencies = [ + "base64 0.22.1", "data-url", "flate2", + "fontdb", "imagesize", "kurbo", "log", + "pico-args", "roxmltree", + "rustybuzz", "simplecss", - "siphasher", - "svgtypes", - "usvg-tree", -] - -[[package]] -name = "usvg-tree" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee3d202ebdb97a6215604b8f5b4d6ef9024efd623cf2e373a6416ba976ec7d3" -dependencies = [ - "rctree", + "siphasher 1.0.1", "strict-num", "svgtypes", "tiny-skia-path", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", ] [[package]] @@ -10686,12 +10703,13 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if 1.0.0", "once_cell", + "rustversion", "serde", "serde_json", "wasm-bindgen-macro", @@ -10699,13 +10717,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2 1.0.93", "quote 1.0.37", "syn 2.0.96", @@ -10714,21 +10731,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if 1.0.0", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote 1.0.37", "wasm-bindgen-macro-support", @@ -10736,9 +10754,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2 1.0.93", "quote 1.0.37", @@ -10749,15 +10767,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wayland-backend" -version = "0.3.7" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" +checksum = "fe770181423e5fc79d3e2a7f4410b7799d5aab1de4372853de3c6aa13ca24121" dependencies = [ "cc", "downcast-rs 1.2.1", @@ -10769,9 +10790,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.6" +version = "0.31.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" +checksum = "978fa7c67b0847dbd6a9f350ca2569174974cd4082737054dbb7fbb79d7d9a61" dependencies = [ "bitflags 2.9.0", "rustix", @@ -10803,9 +10824,9 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.32.4" +version = "0.32.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" +checksum = "779075454e1e9a521794fed15886323ea0feda3f8b0fc1390f5398141310422a" dependencies = [ "bitflags 2.9.0", "wayland-backend", @@ -10815,9 +10836,9 @@ dependencies = [ [[package]] name = "wayland-protocols-plasma" -version = "0.3.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0a41a6875e585172495f7a96dfa42ca7e0213868f4f15c313f7c33221a7eff" +checksum = "4fd38cdad69b56ace413c6bcc1fbf5acc5e2ef4af9d5f8f1f9570c0c83eae175" dependencies = [ "bitflags 2.9.0", "wayland-backend", @@ -10841,20 +10862,20 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.5" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" +checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" dependencies = [ "proc-macro2 1.0.93", - "quick-xml 0.36.2", + "quick-xml 0.37.5", "quote 1.0.37", ] [[package]] name = "wayland-sys" -version = "0.31.5" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" +checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" dependencies = [ "dlib", "log", @@ -10870,9 +10891,9 @@ checksum = "323f4da9523e9a669e1eaf9c6e763892769b1d38c623913647bfdc1532fe4549" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -10933,17 +10954,20 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" -version = "22.1.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" +checksum = "ec8fb398f119472be4d80bc3647339f56eb63b2a331f6a3d16e25d8144197dd9" dependencies = [ "arrayvec 0.7.6", - "cfg_aliases 0.1.1", + "bitflags 2.9.0", + "cfg_aliases", "document-features", + "hashbrown 0.15.3", "js-sys", "log", "naga", "parking_lot 0.12.3", + "portable-atomic", "profiling", "raw-window-handle", "smallvec", @@ -10958,34 +10982,67 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "22.1.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" +checksum = "f7b882196f8368511d613c6aeec80655160db6646aebddf8328879a88d54e500" dependencies = [ "arrayvec 0.7.6", - "bit-vec 0.7.0", + "bit-set", + "bit-vec 0.8.0", "bitflags 2.9.0", - "cfg_aliases 0.1.1", + "cfg_aliases", "document-features", - "indexmap 2.6.0", + "hashbrown 0.15.3", + "indexmap 2.9.0", "log", "naga", "once_cell", "parking_lot 0.12.3", + "portable-atomic", "profiling", "raw-window-handle", "rustc-hash", "smallvec", - "thiserror 1.0.64", + "thiserror 2.0.11", + "wgpu-core-deps-apple", + "wgpu-core-deps-emscripten", + "wgpu-core-deps-windows-linux-android", "wgpu-hal", "wgpu-types", ] [[package]] -name = "wgpu-hal" -version = "22.0.0" +name = "wgpu-core-deps-apple" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" +checksum = "cfd488b3239b6b7b185c3b045c39ca6bf8af34467a4c5de4e0b1a564135d093d" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-emscripten" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f09ad7aceb3818e52539acc679f049d3475775586f3f4e311c30165cf2c00445" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cba5fb5f7f9c98baa7c889d444f63ace25574833df56f5b817985f641af58e46" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-hal" +version = "25.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f968767fe4d3d33747bbd1473ccd55bf0f6451f55d733b5597e67b5deab4ad17" dependencies = [ "android_system_properties", "arrayvec 0.7.6", @@ -10993,47 +11050,52 @@ dependencies = [ "bit-set", "bitflags 2.9.0", "block", - "cfg_aliases 0.1.1", + "bytemuck", + "cfg-if 1.0.0", + "cfg_aliases", "core-graphics-types", - "d3d12", - "glow 0.13.1", + "glow", "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", - "hassle-rs", + "hashbrown 0.15.3", "js-sys", "khronos-egl", "libc", "libloading", "log", - "metal 0.29.0", + "metal 0.31.0", "naga", "ndk-sys 0.5.0+25.2.9519653", "objc", - "once_cell", + "ordered-float 3.9.2", "parking_lot 0.12.3", + "portable-atomic", "profiling", "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash", "smallvec", - "thiserror 1.0.64", + "thiserror 2.0.11", "wasm-bindgen", "web-sys", "wgpu-types", - "winapi 0.3.9", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] name = "wgpu-types" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" +checksum = "2aa49460c2a8ee8edba3fca54325540d904dd85b2e086ada762767e17d06e8bc" dependencies = [ "bitflags 2.9.0", + "bytemuck", "js-sys", + "log", + "thiserror 2.0.11", "web-sys", ] @@ -11113,16 +11175,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" -dependencies = [ - "windows-core 0.52.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.58.0" @@ -11133,6 +11185,28 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -11148,13 +11222,37 @@ version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-implement", - "windows-interface", - "windows-result", - "windows-strings", + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement 0.60.0", + "windows-interface 0.59.1", + "windows-link", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link", + "windows-threading", +] + [[package]] name = "windows-implement" version = "0.58.0" @@ -11166,6 +11264,17 @@ dependencies = [ "syn 2.0.96", ] +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.37", + "syn 2.0.96", +] + [[package]] name = "windows-interface" version = "0.58.0" @@ -11177,6 +11286,33 @@ dependencies = [ "syn 2.0.96", ] +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.37", + "syn 2.0.96", +] + +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link", +] + [[package]] name = "windows-result" version = "0.2.0" @@ -11186,16 +11322,34 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-strings" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-result", + "windows-result 0.2.0", "windows-targets 0.52.6", ] +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -11278,6 +11432,15 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -11412,9 +11575,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.30.5" +version = "0.30.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0be9e76a1f1077e04a411f0b989cbd3c93339e1771cb41e71ac4aee95bfd2c67" +checksum = "a4409c10174df8779dc29a4788cac85ed84024ccbc1743b776b21a520ee1aaf4" dependencies = [ "ahash", "android-activity", @@ -11423,7 +11586,7 @@ dependencies = [ "block2", "bytemuck", "calloop", - "cfg_aliases 0.2.1", + "cfg_aliases", "concurrent-queue", "core-foundation 0.9.4", "core-graphics 0.23.2", @@ -11480,6 +11643,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.7.0" @@ -11676,7 +11848,7 @@ dependencies = [ "futures-sink", "futures-util", "hex", - "nix", + "nix 0.29.0", "ordered-stream", "rand 0.8.5", "serde", @@ -11687,33 +11859,66 @@ dependencies = [ "uds_windows", "windows-sys 0.52.0", "xdg-home", - "zbus_macros", - "zbus_names", - "zvariant", + "zbus_macros 4.4.0", + "zbus_names 3.0.0", + "zvariant 4.2.0", +] + +[[package]] +name = "zbus" +version = "5.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a7c7cee313d044fca3f48fa782cb750c79e4ca76ba7bc7718cd4024cdf6f68" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "nix 0.30.1", + "ordered-stream", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "windows-sys 0.59.0", + "winnow 0.7.10", + "zbus_macros 5.7.1", + "zbus_names 4.2.0", + "zvariant 5.5.3", ] [[package]] name = "zbus-lockstep" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca2c5dceb099bddaade154055c926bb8ae507a18756ba1d8963fd7b51d8ed1d" +checksum = "a22426b1bc2aca91de97772506f0655fa373448e6010d79d5d5880915c388409" dependencies = [ "zbus_xml", - "zvariant", + "zvariant 5.5.3", ] [[package]] name = "zbus-lockstep-macros" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709ab20fc57cb22af85be7b360239563209258430bccf38d8b979c5a2ae3ecce" +checksum = "100ffec29ed51859052f4563061abe35557acb56ba574510571f8398efc70a29" dependencies = [ "proc-macro2 1.0.93", "quote 1.0.37", "syn 2.0.96", "zbus-lockstep", "zbus_xml", - "zvariant", + "zvariant 5.5.3", ] [[package]] @@ -11726,7 +11931,22 @@ dependencies = [ "proc-macro2 1.0.93", "quote 1.0.37", "syn 2.0.96", - "zvariant_utils", + "zvariant_utils 2.1.0", +] + +[[package]] +name = "zbus_macros" +version = "5.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17e7e5eec1550f747e71a058df81a9a83813ba0f6a95f39c4e218bdc7ba366a" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.93", + "quote 1.0.37", + "syn 2.0.96", + "zbus_names 4.2.0", + "zvariant 5.5.3", + "zvariant_utils 3.2.0", ] [[package]] @@ -11737,20 +11957,32 @@ checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", - "zvariant", + "zvariant 4.2.0", +] + +[[package]] +name = "zbus_names" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" +dependencies = [ + "serde", + "static_assertions", + "winnow 0.7.10", + "zvariant 5.5.3", ] [[package]] name = "zbus_xml" -version = "4.0.0" +version = "5.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f374552b954f6abb4bd6ce979e6c9b38fb9d0cd7cc68a7d796e70c9f3a233" +checksum = "589e9a02bfafb9754bb2340a9e3b38f389772684c63d9637e76b1870377bec29" dependencies = [ - "quick-xml 0.30.0", + "quick-xml 0.36.2", "serde", "static_assertions", - "zbus_names", - "zvariant", + "zbus_names 4.2.0", + "zvariant 5.5.3", ] [[package]] @@ -11888,7 +12120,21 @@ dependencies = [ "serde", "static_assertions", "url", - "zvariant_derive", + "zvariant_derive 4.2.0", +] + +[[package]] +name = "zvariant" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d30786f75e393ee63a21de4f9074d4c038d52c5b1bb4471f955db249f9dffb1" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow 0.7.10", + "zvariant_derive 5.5.3", + "zvariant_utils 3.2.0", ] [[package]] @@ -11901,7 +12147,20 @@ dependencies = [ "proc-macro2 1.0.93", "quote 1.0.37", "syn 2.0.96", - "zvariant_utils", + "zvariant_utils 2.1.0", +] + +[[package]] +name = "zvariant_derive" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75fda702cd42d735ccd48117b1630432219c0e9616bf6cb0f8350844ee4d9580" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.93", + "quote 1.0.37", + "syn 2.0.96", + "zvariant_utils 3.2.0", ] [[package]] @@ -11914,3 +12173,17 @@ dependencies = [ "quote 1.0.37", "syn 2.0.96", ] + +[[package]] +name = "zvariant_utils" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16edfee43e5d7b553b77872d99bc36afdda75c223ca7ad5e3fbecd82ca5fc34" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.37", + "serde", + "static_assertions", + "syn 2.0.96", + "winnow 0.7.10", +] diff --git a/Cargo.toml b/Cargo.toml index 8d69ae03..0178a7b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,8 +45,8 @@ grin_wallet_util = "5.3.3" grin_wallet_controller = "5.3.3" ## ui -egui = { version = "0.29.1", default-features = false } -egui_extras = { version = "0.29.1", features = ["image", "svg"] } +egui = { version = "0.31.1", default-features = false } +egui_extras = { version = "0.31.1", features = ["image", "svg"] } rust-i18n = "2.3.1" ## other @@ -75,6 +75,7 @@ qrcode = "0.14.1" ur = "0.4.1" gif = "0.13.1" rkv = { version = "0.19.0", features = ["lmdb"] } +usvg = "0.45.1" ## tor arti-client = { version = "0.29.0", features = ["pt-client", "static", "onion-service-service", "onion-service-client"] } @@ -110,23 +111,23 @@ nokhwa-mac = { git = "https://github.com/l1npengtul/nokhwa", rev = "612c861ef153 [target.'cfg(not(target_os = "android"))'.dependencies] env_logger = "0.11.3" -winit = { version = "0.30.5" } -eframe = { version = "0.29.1", features = ["wgpu", "glow"] } +winit = { version = "0.30.7" } +eframe = { version = "0.31.1", features = ["wgpu", "glow"] } arboard = "3.2.0" rfd = "0.15.0" interprocess = { version = "2.2.1", features = ["tokio"] } [target.'cfg(target_os = "android")'.dependencies] -android_logger = "0.14.1" +android_logger = "0.15.0" jni = "0.21.1" -wgpu = "22.1.0" +wgpu = "25.0.0" android-activity = { version = "0.6.0", features = ["game-activity"] } -winit = { version = "0.30.5", features = ["android-game-activity"] } -eframe = { version = "0.29.1", features = ["wgpu", "android-game-activity"] } +winit = { version = "0.30.7", features = ["android-game-activity"] } +eframe = { version = "0.31.1", features = ["wgpu", "android-game-activity"] } [patch.crates-io] -egui_extras = { git = "https://github.com/emilk/egui", rev = "5b846b4554fe47269affb43efef2cad8710a8a47" } -egui = { git = "https://github.com/emilk/egui", rev = "5b846b4554fe47269affb43efef2cad8710a8a47" } -eframe = { git = "https://github.com/emilk/egui", rev = "5b846b4554fe47269affb43efef2cad8710a8a47" } +egui_extras = { git = "https://github.com/ardocrat/egui", branch = "back_button_android" } +egui = { git = "https://github.com/ardocrat/egui", branch = "back_button_android" } +eframe = { git = "https://github.com/ardocrat/egui", branch = "back_button_android" } ### patch grin store #grin_store = { path = "../grin-store" } diff --git a/src/gui/app.rs b/src/gui/app.rs index 373ae41e..f5988acd 100755 --- a/src/gui/app.rs +++ b/src/gui/app.rs @@ -14,7 +14,7 @@ use std::sync::atomic::{AtomicBool, Ordering}; use lazy_static::lazy_static; -use egui::{Align, Context, CursorIcon, Layout, Modifiers, ResizeDirection, Rounding, Stroke, UiBuilder, ViewportCommand}; +use egui::{Align, Context, CornerRadius, CursorIcon, Layout, Modifiers, ResizeDirection, Stroke, UiBuilder, ViewportCommand, StrokeKind}; use egui::epaint::{RectShape}; use crate::AppConfig; @@ -163,9 +163,10 @@ impl App { r }; let content_bg = RectShape::new(content_bg_rect, - Rounding::ZERO, + CornerRadius::ZERO, Colors::fill_lite(), - View::default_stroke()); + View::default_stroke(), + StrokeKind::Middle); // Draw content background. ui.painter().add(content_bg); @@ -174,7 +175,7 @@ impl App { content_rect = content_rect.shrink(Content::WINDOW_FRAME_MARGIN); } // Draw window content. - ui.allocate_new_ui(UiBuilder::new().max_rect(content_rect), |ui| { + ui.scope_builder(UiBuilder::new().max_rect(content_rect), |ui| { // Draw window title. self.window_title_ui(ui, is_fullscreen); ui.add_space(-1.0); @@ -217,7 +218,7 @@ impl App { rect.max.y = rect.min.y + View::get_top_inset() + TitlePanel::HEIGHT; rect }; - let title_bg = RectShape::filled(title_rect, Rounding::ZERO, Colors::yellow()); + let title_bg = RectShape::filled(title_rect, CornerRadius::ZERO, Colors::yellow()); ui.painter().add(title_bg); } @@ -236,15 +237,15 @@ impl App { }; let is_mac = egui::os::OperatingSystem::from_target_os() == egui::os::OperatingSystem::Mac; let window_title_bg = RectShape::new(title_bg_rect, if is_fullscreen || is_mac { - Rounding::ZERO + CornerRadius::ZERO } else { - Rounding { - nw: 8.0, - ne: 8.0, - sw: 0.0, - se: 0.0, + CornerRadius { + nw: 8.0 as u8, + ne: 8.0 as u8, + sw: 0.0 as u8, + se: 0.0 as u8, } - }, Colors::yellow_dark(), Stroke::new(1.0, Colors::STROKE)); + }, Colors::yellow_dark(), Stroke::new(1.0, Colors::STROKE), StrokeKind::Middle); // Draw title background. ui.painter().add(window_title_bg); @@ -294,7 +295,7 @@ impl App { Colors::title(true), ); - ui.allocate_new_ui(UiBuilder::new().max_rect(title_rect), |ui| { + ui.scope_builder(UiBuilder::new().max_rect(title_rect), |ui| { ui.with_layout(Layout::right_to_left(Align::Center), |ui| { // Draw button to close window. View::title_button_small(ui, X, |_| { diff --git a/src/gui/views/camera.rs b/src/gui/views/camera.rs index 020040e8..7cff7086 100644 --- a/src/gui/views/camera.rs +++ b/src/gui/views/camera.rs @@ -78,7 +78,7 @@ impl CameraContent { r.min.x = r.max.x - 52.0; r }; - ui.allocate_new_ui(UiBuilder::new().max_rect(r), |ui| { + ui.scope_builder(UiBuilder::new().max_rect(r), |ui| { let rotate_img = CAMERA_ROTATE.to_string(); View::button(ui, rotate_img, Colors::white_or_black(false), || { cb.switch_camera(); diff --git a/src/gui/views/content.rs b/src/gui/views/content.rs index b20b7f6b..b2177d78 100644 --- a/src/gui/views/content.rs +++ b/src/gui/views/content.rs @@ -15,7 +15,7 @@ use std::fs; use std::sync::atomic::{AtomicBool, Ordering}; use egui::os::OperatingSystem; -use egui::{Align, Layout, RichText}; +use egui::{Align, Layout, RichText, StrokeKind}; use lazy_static::lazy_static; use crate::gui::Colors; @@ -317,7 +317,11 @@ impl Content { // Draw round background. let bg_rect = rect.clone(); let item_rounding = View::item_rounding(index, len, false); - ui.painter().rect(bg_rect, item_rounding, Colors::fill(), View::item_stroke()); + ui.painter().rect(bg_rect, + item_rounding, + Colors::fill(), + View::item_stroke(), + StrokeKind::Middle); ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { // Draw button to select language. diff --git a/src/gui/views/input/edit.rs b/src/gui/views/input/edit.rs index 18d2f034..e471ebeb 100644 --- a/src/gui/views/input/edit.rs +++ b/src/gui/views/input/edit.rs @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use eframe::emath::Align; -use egui::{Layout, TextBuffer, TextStyle, Widget}; +use egui::{Layout, TextBuffer, TextStyle, Widget, Align}; use egui::text_edit::TextEditState; use crate::gui::Colors; use crate::gui::icons::{CLIPBOARD_TEXT, COPY, EYE, EYE_SLASH, SCAN}; @@ -49,7 +48,7 @@ pub struct TextEdit { impl TextEdit { /// Default height of [`egui::TextEdit`] view. - const TEXT_EDIT_HEIGHT: f32 = 37.0; + const TEXT_EDIT_HEIGHT: f32 = 41.0; pub fn new(id: egui::Id) -> Self { Self { diff --git a/src/gui/views/input/keyboard.rs b/src/gui/views/input/keyboard.rs index 79108ca5..c8181f11 100644 --- a/src/gui/views/input/keyboard.rs +++ b/src/gui/views/input/keyboard.rs @@ -12,9 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use eframe::emath::Align; -use eframe::epaint::{Margin, Shadow}; -use egui::{Align2, Button, Color32, CursorIcon, Layout, Rect, Response, RichText, Vec2, Widget}; +use egui::{Align, Align2, Button, Color32, CursorIcon, Layout, Margin, Rect, Response, RichText, Shadow, Vec2, Widget}; use lazy_static::lazy_static; use parking_lot::RwLock; use std::sync::atomic::{AtomicBool, Ordering}; @@ -73,15 +71,15 @@ impl KeyboardContent { .frame(egui::Frame { shadow: Shadow { offset: Default::default(), - blur: 30.0, - spread: 3.0, + blur: 30.0 as u8, + spread: 3.0 as u8, color: Color32::from_black_alpha(32), }, - inner_margin: Margin { - left: View::get_left_inset(), - right: View::get_right_inset(), - top: 1.0, - bottom: View::get_bottom_inset(), + inner_margin: Margin { + left: View::get_left_inset() as i8, + right: View::get_right_inset() as i8, + top: 1.0 as i8, + bottom: View::get_bottom_inset() as i8, }, fill: Colors::fill(), ..Default::default() @@ -125,7 +123,7 @@ impl KeyboardContent { KeyboardLayout::SYMBOLS => Self::symbols_ui(ui), KeyboardLayout::NUMBERS => Self::numbers_ui(ui), }; - ui.add_space(2.0); + ui.add_space(1.0); // Draw bottom keyboard buttons. let bottom_size = { @@ -141,7 +139,7 @@ impl KeyboardContent { ui.allocate_ui_with_layout(bottom_size, Layout::right_to_left(Align::Center), |ui| { if self.layout == KeyboardLayout::NUMBERS { ui.horizontal_centered(|ui| { - ui.set_max_width(button_width * 2.0 + 1.0); + ui.set_max_width(button_width * 2.0); Self::custom_button_ui(KEY_RETURN.to_string(), Colors::white_or_black(false), Some(Colors::green()), @@ -161,7 +159,7 @@ impl KeyboardContent { } else { // Enter key input. ui.horizontal_centered(|ui| { - ui.set_max_width(button_width * 2.0 + 1.0); + ui.set_max_width(button_width * 2.0); Self::custom_button_ui(KEY_RETURN.to_string(), Colors::white_or_black(false), Some(Colors::green()), @@ -255,7 +253,7 @@ impl KeyboardContent { button_rect = Self::input_button_ui(s, !last, &mut columns[index]); } }); - ui.add_space(2.0); + ui.add_space(1.0); let tl_1: Vec<&str> = vec!["4", "5", "6", "+"]; ui.columns(tl_1.len(), |columns| { @@ -264,7 +262,7 @@ impl KeyboardContent { Self::input_button_ui(s, !last, &mut columns[index]); } }); - ui.add_space(2.0); + ui.add_space(1.0); let tl_2: Vec<&str> = vec!["7", "8", "9", BACKSPACE]; ui.columns(tl_2.len(), |columns| { @@ -295,7 +293,7 @@ impl KeyboardContent { button_rect = Self::input_button_ui(s, true, &mut columns[index]); } }); - ui.add_space(2.0); + ui.add_space(1.0); let tl_1: Vec<&str> = vec!["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "p1"]; ui.columns(tl_1.len(), |columns| { @@ -303,7 +301,7 @@ impl KeyboardContent { Self::input_button_ui(s, true, &mut columns[index]); } }); - ui.add_space(2.0); + ui.add_space(1.0); let tl_2: Vec<&str> = vec!["a", "s", "d", "f", "g", "h", "j", "k", "l", "l1", "l2"]; ui.columns(tl_2.len(), |columns| { @@ -311,7 +309,7 @@ impl KeyboardContent { Self::input_button_ui(s, true, &mut columns[index]); } }); - ui.add_space(2.0); + ui.add_space(1.0); let tl_3: Vec<&str> = vec!["z1", "z", "x", "c", "v", "b", "n", "m", "m1", "m2", "m3"]; ui.columns(tl_3.len(), |columns| { @@ -332,7 +330,7 @@ impl KeyboardContent { button_rect = Self::input_button_ui(s, false, &mut columns[index]); } }); - ui.add_space(2.0); + ui.add_space(1.0); let tl_1: Vec<&str> = vec!["_", "\\", "|", "~", "<", ">", "№", "√", "π", "•"]; ui.columns(tl_1.len(), |columns| { @@ -340,7 +338,7 @@ impl KeyboardContent { Self::input_button_ui(s, false, &mut columns[index]); } }); - ui.add_space(2.0); + ui.add_space(1.0); let tl_2: Vec<&str> = vec!["-", "/", ":", ";", "(", ")", "`", "&", "@", "\""]; ui.columns(tl_2.len(), |columns| { @@ -348,7 +346,7 @@ impl KeyboardContent { Self::input_button_ui(s, false, &mut columns[index]); } }); - ui.add_space(2.0); + ui.add_space(1.0); let tl_3: Vec<&str> = vec![".", ",", "?", "!", "€", "£", "¥", "$", "¢", "ツ"]; ui.columns(tl_3.len(), |columns| { @@ -385,7 +383,7 @@ impl KeyboardContent { s.to_string() }; let mut button = Button::new(RichText::new(label.clone()).size(17.0).color(color)) - .rounding(egui::Rounding::ZERO); + .corner_radius(egui::CornerRadius::ZERO); if let Some(bg) = bg { button = button.fill(bg); } diff --git a/src/gui/views/modal.rs b/src/gui/views/modal.rs index e9c1e319..0d43e149 100755 --- a/src/gui/views/modal.rs +++ b/src/gui/views/modal.rs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use lazy_static::lazy_static; -use std::sync::Arc; -use parking_lot::RwLock; -use std::sync::atomic::{AtomicBool, Ordering}; -use egui::{Align2, RichText, Rounding, Stroke, UiBuilder, Vec2}; use egui::epaint::{RectShape, Shadow}; use egui::os::OperatingSystem; +use egui::{Align2, CornerRadius, RichText, Stroke, UiBuilder, Vec2, StrokeKind}; +use lazy_static::lazy_static; +use parking_lot::RwLock; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Arc; -use crate::gui::Colors; -use crate::gui::views::{Content, KeyboardContent, View}; use crate::gui::views::types::{ModalPosition, ModalState}; +use crate::gui::views::{Content, KeyboardContent, View}; +use crate::gui::Colors; lazy_static! { /// Showing [`Modal`] state to be accessible from different ui parts. @@ -242,11 +242,11 @@ impl Modal { .frame(egui::Frame { shadow: Shadow { offset: Default::default(), - blur: 30.0, - spread: 3.0, + blur: 30.0 as u8, + spread: 3.0 as u8, color: egui::Color32::from_black_alpha(32), }, - rounding: Rounding::same(8.0), + corner_radius: CornerRadius::same(8.0 as u8), ..Default::default() }) .show(ctx, |ui| { @@ -301,20 +301,20 @@ impl Modal { // Create background shape. let mut bg_shape = RectShape::new(rect, if self.title.is_none() { - Rounding::same(8.0) + CornerRadius::same(8.0 as u8) } else { - Rounding { - nw: 0.0, - ne: 0.0, - sw: 8.0, - se: 8.0, + CornerRadius { + nw: 0.0 as u8, + ne: 0.0 as u8, + sw: 8.0 as u8, + se: 8.0 as u8, } - }, Colors::fill(), Stroke::NONE); - let bg_idx = ui.painter().add(bg_shape); + }, Colors::fill(), Stroke::NONE, StrokeKind::Middle); + let bg_idx = ui.painter().add(bg_shape.clone()); rect.min += egui::emath::vec2(6.0, 0.0); rect.max -= egui::emath::vec2(6.0, 0.0); - let resp = ui.allocate_new_ui(UiBuilder::new().max_rect(rect), |ui| { + let resp = ui.scope_builder(UiBuilder::new().max_rect(rect), |ui| { (add_content)(ui, self); }).response; @@ -335,13 +335,13 @@ fn title_ui(title: &String, ui: &mut egui::Ui) { let rect = ui.available_rect_before_wrap(); // Create background shape. - let mut bg_shape = RectShape::new(rect, Rounding { - nw: 8.0, - ne: 8.0, - sw: 0.0, - se: 0.0, - }, Colors::yellow(), Stroke::NONE); - let bg_idx = ui.painter().add(bg_shape); + let mut bg_shape = RectShape::new(rect, CornerRadius { + nw: 8.0 as u8, + ne: 8.0 as u8, + sw: 0.0 as u8, + se: 0.0 as u8, + }, Colors::yellow(), Stroke::NONE, StrokeKind::Middle); + let bg_idx = ui.painter().add(bg_shape.clone()); // Draw title content. let resp = ui.vertical_centered(|ui| { diff --git a/src/gui/views/network/connections.rs b/src/gui/views/network/connections.rs index 8c8e9ae1..59241049 100644 --- a/src/gui/views/network/connections.rs +++ b/src/gui/views/network/connections.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use egui::{Align, Layout, RichText, Rounding}; +use egui::{Align, Layout, RichText, CornerRadius, StrokeKind}; use crate::AppConfig; use crate::gui::Colors; @@ -113,7 +113,7 @@ impl ConnectionsContent { View::item_button(ui, button_rounding, TRASH, None, || { ConnectionsConfig::remove_ext_conn(conn.id); }); - View::item_button(ui, Rounding::default(), PENCIL, None, || { + View::item_button(ui, CornerRadius::default(), PENCIL, None, || { self.show_add_ext_conn_modal(Some(conn.clone())); }); }); @@ -128,7 +128,7 @@ impl ConnectionsContent { let mut rect = ui.available_rect_before_wrap(); rect.set_height(78.0); let rounding = View::item_rounding(0, 1, false); - ui.painter().rect(rect, rounding, Colors::fill(), View::item_stroke()); + ui.painter().rect(rect, rounding, Colors::fill(), View::item_stroke(), StrokeKind::Middle); ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { // Draw custom button. @@ -137,11 +137,11 @@ impl ConnectionsContent { // Draw buttons to start/stop node. if Node::get_error().is_none() { if !Node::is_running() { - View::item_button(ui, Rounding::default(), POWER, Some(Colors::green()), || { + View::item_button(ui, CornerRadius::default(), POWER, Some(Colors::green()), || { Node::start(); }); } else if !Node::is_starting() && !Node::is_stopping() && !Node::is_restarting() { - View::item_button(ui, Rounding::default(), POWER, Some(Colors::red()), || { + View::item_button(ui, CornerRadius::default(), POWER, Some(Colors::red()), || { Node::stop(false); }); } @@ -200,7 +200,11 @@ impl ConnectionsContent { // Draw round background. let bg_rect = rect.clone(); let item_rounding = View::item_rounding(index, len, false); - ui.painter().rect(bg_rect, item_rounding, Colors::fill(), View::item_stroke()); + ui.painter().rect(bg_rect, + item_rounding, + Colors::fill(), + View::item_stroke(), + StrokeKind::Middle); ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { // Draw provided buttons. diff --git a/src/gui/views/network/content.rs b/src/gui/views/network/content.rs index 16851a33..fa749610 100644 --- a/src/gui/views/network/content.rs +++ b/src/gui/views/network/content.rs @@ -58,10 +58,10 @@ impl NetworkContent { .resizable(false) .frame(egui::Frame { inner_margin: Margin { - left: View::get_left_inset() + View::TAB_ITEMS_PADDING, - right: View::far_right_inset_margin(ui) + View::TAB_ITEMS_PADDING, - top: View::TAB_ITEMS_PADDING, - bottom: View::get_bottom_inset() + View::TAB_ITEMS_PADDING, + left: (View::get_left_inset() + View::TAB_ITEMS_PADDING) as i8, + right: (View::far_right_inset_margin(ui) + View::TAB_ITEMS_PADDING) as i8, + top: View::TAB_ITEMS_PADDING as i8, + bottom: (View::get_bottom_inset() + View::TAB_ITEMS_PADDING) as i8, }, fill: Colors::fill(), ..Default::default() @@ -94,10 +94,10 @@ impl NetworkContent { egui::CentralPanel::default() .frame(egui::Frame { inner_margin: Margin { - left: View::get_left_inset() + 4.0, - right: View::far_right_inset_margin(ui) + 4.0, - top: 3.0, - bottom: 4.0, + left: (View::get_left_inset() + 4.0) as i8, + right: (View::far_right_inset_margin(ui) + 4.0) as i8, + top: 3.0 as i8, + bottom: 4.0 as i8, }, ..Default::default() }) @@ -143,14 +143,14 @@ impl NetworkContent { View::get_left_inset() + 4.0 } else { 0.0 - }, + } as i8, right: if show_connections { View::far_right_inset_margin(ui) + 4.0 } else { 0.0 - }, - top: 3.0, - bottom: 4.0 + View::get_bottom_inset(), + } as i8, + top: 3.0 as i8, + bottom:(4.0 + View::get_bottom_inset()) as i8, }, ..Default::default() }) diff --git a/src/gui/views/network/metrics.rs b/src/gui/views/network/metrics.rs index 534ec068..975d1e4b 100644 --- a/src/gui/views/network/metrics.rs +++ b/src/gui/views/network/metrics.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use egui::{RichText, Rounding, ScrollArea, vec2}; +use egui::{RichText, CornerRadius, ScrollArea, vec2, StrokeKind}; use egui::scroll_area::ScrollBarVisibility; use grin_core::consensus::{DAY_HEIGHT, GRIN_BASE, HOUR_SEC, REWARD}; use grin_servers::{DiffBlock, ServerStats}; @@ -138,7 +138,7 @@ fn blocks_ui(ui: &mut egui::Ui, stats: &ServerStats) { } /// Draw block difficulty item. -fn block_item_ui(ui: &mut egui::Ui, db: &DiffBlock, rounding: Rounding) { +fn block_item_ui(ui: &mut egui::Ui, db: &DiffBlock, rounding: CornerRadius) { let mut rect = ui.available_rect_before_wrap(); rect.set_height(BLOCK_ITEM_HEIGHT); ui.allocate_ui(rect.size(), |ui| { @@ -150,7 +150,11 @@ fn block_item_ui(ui: &mut egui::Ui, db: &DiffBlock, rounding: Rounding) { // Draw round background. rect.min += vec2(8.0, 0.0); rect.max -= vec2(8.0, 0.0); - ui.painter().rect(rect, rounding, Colors::white_or_black(false), View::item_stroke()); + ui.painter().rect(rect, + rounding, + Colors::white_or_black(false), + View::item_stroke(), + StrokeKind::Middle); // Draw block hash. ui.horizontal(|ui| { diff --git a/src/gui/views/network/mining.rs b/src/gui/views/network/mining.rs index 1de1823d..acfaf2c8 100644 --- a/src/gui/views/network/mining.rs +++ b/src/gui/views/network/mining.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use egui::{RichText, Rounding, ScrollArea}; +use egui::{RichText, CornerRadius, ScrollArea, StrokeKind}; use egui::scroll_area::ScrollBarVisibility; use grin_chain::SyncStatus; use grin_servers::WorkerStats; @@ -190,13 +190,17 @@ impl NodeTab for NetworkMining { const WORKER_ITEM_HEIGHT: f32 = 76.0; /// Draw worker statistics item. -fn worker_item_ui(ui: &mut egui::Ui, ws: &WorkerStats, rounding: Rounding) { +fn worker_item_ui(ui: &mut egui::Ui, ws: &WorkerStats, rounding: CornerRadius) { ui.horizontal_wrapped(|ui| { ui.vertical_centered_justified(|ui| { // Draw round background. let mut rect = ui.available_rect_before_wrap(); rect.set_height(WORKER_ITEM_HEIGHT); - ui.painter().rect(rect, rounding, Colors::white_or_black(false), View::item_stroke()); + ui.painter().rect(rect, + rounding, + Colors::white_or_black(false), + View::item_stroke(), + StrokeKind::Middle); ui.add_space(2.0); ui.horizontal(|ui| { diff --git a/src/gui/views/network/node.rs b/src/gui/views/network/node.rs index fc9080f4..9054b0ea 100644 --- a/src/gui/views/network/node.rs +++ b/src/gui/views/network/node.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use egui::{RichText, Rounding, ScrollArea}; +use egui::{RichText, CornerRadius, ScrollArea, StrokeKind}; use egui::scroll_area::ScrollBarVisibility; use grin_servers::PeerStats; @@ -176,7 +176,7 @@ fn node_stats_ui(ui: &mut egui::Ui) { const PEER_ITEM_HEIGHT: f32 = 77.0; /// Draw connected peer info item. -fn peer_item_ui(ui: &mut egui::Ui, peer: &PeerStats, rounding: Rounding) { +fn peer_item_ui(ui: &mut egui::Ui, peer: &PeerStats, rounding: CornerRadius) { let mut rect = ui.available_rect_before_wrap(); rect.set_height(PEER_ITEM_HEIGHT); ui.allocate_ui(rect.size(), |ui| { @@ -184,7 +184,7 @@ fn peer_item_ui(ui: &mut egui::Ui, peer: &PeerStats, rounding: Rounding) { ui.add_space(4.0); // Draw round background. - ui.painter().rect(rect, rounding, Colors::fill_lite(), View::item_stroke()); + ui.painter().rect(rect, rounding, Colors::fill_lite(), View::item_stroke(), StrokeKind::Middle); // Draw IP address. ui.horizontal(|ui| { diff --git a/src/gui/views/network/setup/p2p.rs b/src/gui/views/network/setup/p2p.rs index a839499a..eef18c5b 100644 --- a/src/gui/views/network/setup/p2p.rs +++ b/src/gui/views/network/setup/p2p.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use egui::{Align, Id, Layout, RichText}; +use egui::{Align, Id, Layout, RichText, StrokeKind}; use grin_core::global::ChainTypes; use crate::AppConfig; @@ -775,7 +775,11 @@ fn peer_item_ui(ui: &mut egui::Ui, let mut bg_rect = rect.clone(); bg_rect.min += egui::emath::vec2(6.0, 0.0); let item_rounding = View::item_rounding(index, len, false); - ui.painter().rect(bg_rect, item_rounding, Colors::white_or_black(false), View::item_stroke()); + ui.painter().rect(bg_rect, + item_rounding, + Colors::white_or_black(false), + View::item_stroke(), + StrokeKind::Middle); ui.vertical(|ui| { ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { diff --git a/src/gui/views/qr.rs b/src/gui/views/qr.rs index 68ed708c..6be3cd2a 100644 --- a/src/gui/views/qr.rs +++ b/src/gui/views/qr.rs @@ -237,14 +237,15 @@ impl QrCodeContent { // Create background shape. let mut bg_shape = RectShape::new( rect, - egui::Rounding::default(), + egui::CornerRadius::default(), egui::Color32::WHITE, - egui::Stroke::NONE + egui::Stroke::NONE, + egui::StrokeKind::Outside ); - let bg_idx = ui.painter().add(bg_shape); + let bg_idx = ui.painter().add(bg_shape.clone()); // Draw QR code image content. - let mut content_rect = ui.allocate_new_ui(UiBuilder::new().max_rect(rect), |ui| { + let mut content_rect = ui.scope_builder(UiBuilder::new().max_rect(rect), |ui| { ui.add_space(10.0); let size = SizeHint::Size(ui.available_width() as u32, ui.available_width() as u32); self.texture_handle = Some(View::svg_image(ui, "qr_code", svg.as_slice(), Some(size))); diff --git a/src/gui/views/title_panel.rs b/src/gui/views/title_panel.rs index 6e0eb957..be077c31 100644 --- a/src/gui/views/title_panel.rs +++ b/src/gui/views/title_panel.rs @@ -16,7 +16,7 @@ use egui::{Margin, Id, Layout, Align, UiBuilder}; use crate::gui::Colors; use crate::gui::views::{Content, View}; -use crate::gui::views::types::{LinePosition, TitleContentType, TitleType}; +use crate::gui::views::types::{TitleContentType, TitleType}; /// Title panel with left/right action buttons and text in the middle. pub struct TitlePanel { @@ -46,10 +46,10 @@ impl TitlePanel { .exact_height(Self::HEIGHT + View::get_top_inset()) .frame(egui::Frame { inner_margin: Margin { - left: View::far_left_inset_margin(ui), - right: View::far_right_inset_margin(ui), - top: View::get_top_inset(), - bottom: 0.0, + left: View::far_left_inset_margin(ui) as i8, + right: View::far_right_inset_margin(ui) as i8, + top: View::get_top_inset() as i8, + bottom: 0.0 as i8, }, ..Default::default() }) @@ -72,7 +72,7 @@ impl TitlePanel { r.max.x -= Self::HEIGHT; r }; - ui.allocate_new_ui(UiBuilder::new().max_rect(content_rect), |ui| { + ui.scope_builder(UiBuilder::new().max_rect(content_rect), |ui| { Self::title_text_content(ui, content); }); } @@ -84,7 +84,7 @@ impl TitlePanel { r }; // Draw first title content. - ui.allocate_new_ui(UiBuilder::new().max_rect(first_rect), |ui| { + ui.scope_builder(UiBuilder::new().max_rect(first_rect), |ui| { Self::title_text_content(ui, first); }); @@ -95,23 +95,12 @@ impl TitlePanel { r }; // Draw second title content. - ui.allocate_new_ui(UiBuilder::new().max_rect(second_rect), |ui| { + ui.scope_builder(UiBuilder::new().max_rect(second_rect), |ui| { Self::title_text_content(ui, second); }); } } }); - - // Draw content divider line. - let r = { - let mut r = rect.clone(); - r.min.x -= View::far_left_inset_margin(ui); - r.max.x += View::far_right_inset_margin(ui); - r - }; - if Content::is_dual_panel_mode(ui.ctx()) { - View::line(ui, LinePosition::BOTTOM, &r, Colors::stroke()); - } }); } diff --git a/src/gui/views/views.rs b/src/gui/views/views.rs index acba1f75..5412c148 100644 --- a/src/gui/views/views.rs +++ b/src/gui/views/views.rs @@ -16,11 +16,12 @@ use lazy_static::lazy_static; use std::sync::atomic::{AtomicI32, Ordering}; use egui::epaint::text::TextWrapping; -use egui::epaint::{Color32, FontId, PathShape, PathStroke, RectShape, Rounding, Stroke}; +use egui::epaint::{Color32, FontId, PathShape, PathStroke, RectShape, Stroke}; use egui::load::SizedTexture; use egui::os::OperatingSystem; use egui::text::{LayoutJob, TextFormat}; -use egui::{lerp, Button, CursorIcon, PointerState, Rect, Response, Rgba, RichText, Sense, SizeHint, Spinner, TextureHandle, TextureOptions, UiBuilder, Widget}; +use egui::{lerp, Button, CornerRadius, CursorIcon, PointerState, Rect, Response, Rgba, RichText, Sense, SizeHint, Spinner, StrokeKind, TextureHandle, TextureOptions, UiBuilder, Widget}; +use egui::emath::GuiRounding; use egui_extras::image::load_svg_bytes_with_size; use crate::gui::icons::{CHECK_SQUARE, SQUARE}; @@ -187,7 +188,7 @@ impl View { ui.style_mut().visuals.widgets.inactive.bg_stroke = Stroke::NONE; ui.style_mut().visuals.widgets.hovered.bg_stroke = Stroke::NONE; ui.style_mut().visuals.widgets.active.bg_stroke = Stroke::NONE; - ui.style_mut().visuals.widgets.active.rounding = Rounding::default(); + ui.style_mut().visuals.widgets.active.corner_radius = CornerRadius::default(); ui.style_mut().visuals.widgets.active.expansion = 0.0; // Setup text. @@ -310,7 +311,7 @@ impl View { /// Draw list item [`Button`] with provided rounding. pub fn item_button(ui: &mut egui::Ui, - rounding: Rounding, + rounding: CornerRadius, text: &'static str, color: Option, action: impl FnOnce()) { @@ -339,7 +340,7 @@ impl View { // Show button. let br = Button::new(RichText::new(text).size(20.0).color(text_color)) - .rounding(rounding) + .corner_radius(rounding) .min_size(button_size) .ui(ui) .on_hover_cursor(CursorIcon::PointingHand); @@ -360,7 +361,7 @@ impl View { } /// Calculate item background/button rounding based on item index. - pub fn item_rounding(index: usize, len: usize, is_button: bool) -> Rounding { + pub fn item_rounding(index: usize, len: usize, is_button: bool) -> CornerRadius { let corners = if is_button { if len == 1 { [false, true, true, false] @@ -382,11 +383,11 @@ impl View { [false, false, false, false] } }; - Rounding { - nw: if corners[0] { 8.0 } else { 0.0 }, - ne: if corners[1] { 8.0 } else { 0.0 }, - sw: if corners[3] { 8.0 } else { 0.0 }, - se: if corners[2] { 8.0 } else { 0.0 }, + CornerRadius { + nw: if corners[0] { 8.0 as u8 } else { 0.0 as u8 }, + ne: if corners[1] { 8.0 as u8 } else { 0.0 as u8 }, + sw: if corners[3] { 8.0 as u8 } else { 0.0 as u8 }, + se: if corners[2] { 8.0 as u8 } else { 0.0 as u8 }, } } @@ -398,16 +399,16 @@ impl View { let rect = ui.available_rect_before_wrap(); // Create background shape. - let mut bg_shape = RectShape::new(rect, Rounding { - nw: if r[0] { 8.0 } else { 0.0 }, - ne: if r[1] { 8.0 } else { 0.0 }, - sw: if r[2] { 8.0 } else { 0.0 }, - se: if r[3] { 8.0 } else { 0.0 }, - }, Colors::fill_lite(), Self::item_stroke()); - let bg_idx = ui.painter().add(bg_shape); + let mut bg_shape = RectShape::new(rect, CornerRadius { + nw: if r[0] { 8.0 as u8 } else { 0.0 as u8 }, + ne: if r[1] { 8.0 as u8 } else { 0.0 as u8 }, + sw: if r[2] { 8.0 as u8 } else { 0.0 as u8 }, + se: if r[3] { 8.0 as u8 } else { 0.0 as u8 }, + }, Colors::fill_lite(), Self::item_stroke(), StrokeKind::Middle); + let bg_idx = ui.painter().add(bg_shape.clone()); // Draw box content. - let content_resp = ui.allocate_new_ui(UiBuilder::new().max_rect(rect), |ui| { + let content_resp = ui.scope_builder(UiBuilder::new().max_rect(rect), |ui| { ui.vertical_centered_justified(|ui| { ui.add_space(4.0); ui.scope(|ui| { @@ -447,7 +448,7 @@ impl View { let side_margin = 28.0; rect.min += egui::emath::vec2(side_margin, ui.available_height() / 2.0 - height / 2.0); rect.max -= egui::emath::vec2(side_margin, 0.0); - ui.allocate_new_ui(UiBuilder::new().max_rect(rect), |ui| { + ui.scope_builder(UiBuilder::new().max_rect(rect), |ui| { (content)(ui); }); }); @@ -506,7 +507,7 @@ impl View { let (line_rect, _) = ui.allocate_exact_size(line_size, Sense::hover()); let painter = ui.painter(); painter.hline(line_rect.x_range(), - painter.round_to_pixel(line_rect.center().y), + line_rect.center().y.round_to_pixels(painter.pixels_per_point()), Stroke { width: 1.0, color }); } @@ -556,7 +557,7 @@ impl View { name: &str, svg: &[u8], size: Option) -> TextureHandle { - let color_img = load_svg_bytes_with_size(svg, size).unwrap(); + let color_img = load_svg_bytes_with_size(svg, size, &usvg::Options::default()).unwrap(); // Create image texture. let texture_handle = ui.ctx().load_texture(name, color_img.clone(), @@ -605,7 +606,7 @@ impl View { if resp.clicked() || resp.dragged() { on_click(); } - let shape = RectShape::filled(resp.rect, Rounding::ZERO, Colors::semi_transparent()); + let shape = RectShape::filled(resp.rect, CornerRadius::ZERO, Colors::semi_transparent()); ui.painter().add(shape); } diff --git a/src/gui/views/wallets/content.rs b/src/gui/views/wallets/content.rs index e9514200..d8fc0985 100644 --- a/src/gui/views/wallets/content.rs +++ b/src/gui/views/wallets/content.rs @@ -13,7 +13,7 @@ // limitations under the License. use std::time::Duration; -use egui::{Align, Id, Layout, Margin, RichText, Rounding, ScrollArea}; +use egui::{Align, CornerRadius, Id, Layout, Margin, RichText, ScrollArea, StrokeKind}; use egui::scroll_area::ScrollBarVisibility; use crate::AppConfig; @@ -182,10 +182,10 @@ impl WalletsContent { egui::TopBottomPanel::bottom("wallets_bottom_panel") .frame(egui::Frame { inner_margin: Margin { - left: View::far_left_inset_margin(ui) + View::TAB_ITEMS_PADDING, - right: View::far_right_inset_margin(ui) + View::TAB_ITEMS_PADDING, - top: View::TAB_ITEMS_PADDING, - bottom: View::get_bottom_inset() + View::TAB_ITEMS_PADDING, + left: (View::far_left_inset_margin(ui) + View::TAB_ITEMS_PADDING) as i8, + right: (View::far_right_inset_margin(ui) + View::TAB_ITEMS_PADDING) as i8, + top: View::TAB_ITEMS_PADDING as i8, + bottom: (View::get_bottom_inset() + View::TAB_ITEMS_PADDING) as i8, }, fill: Colors::fill(), ..Default::default() @@ -226,10 +226,10 @@ impl WalletsContent { .resizable(false) .frame(egui::Frame { inner_margin: Margin { - left: View::far_left_inset_margin(ui) + 4.0, - right: View::far_right_inset_margin(ui) + 4.0, - top: 3.0, - bottom: 4.0, + left: (View::far_left_inset_margin(ui) + 4.0) as i8, + right: (View::far_right_inset_margin(ui) + 4.0) as i8, + top: 3.0 as i8, + bottom: 4.0 as i8, }, fill: Colors::fill_deep(), ..Default::default() @@ -536,12 +536,12 @@ impl WalletsContent { let mut rect = ui.available_rect_before_wrap(); rect.set_height(78.0); let rounding = View::item_rounding(0, 1, false); - let (bg, stroke) = if current { - (Colors::fill_deep(), View::item_stroke()) + let bg = if current { + Colors::fill_deep() } else { - (Colors::fill(), View::hover_stroke()) + Colors::fill() }; - ui.painter().rect(rect, rounding, bg, stroke); + ui.painter().rect(rect, rounding, bg, View::item_stroke(), StrokeKind::Middle); ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { if !wallet.is_open() { @@ -551,7 +551,7 @@ impl WalletsContent { }); if !wallet.syncing() { let mut show_selection = false; - View::item_button(ui, Rounding::default(), GLOBE, None, || { + View::item_button(ui, CornerRadius::default(), GLOBE, None, || { self.wallet_content = Some(WalletContent::new(wallet.clone(), None)); self.conn_selection_content = Some( WalletConnectionModal::new(wallet.get_current_connection()) @@ -577,7 +577,7 @@ impl WalletsContent { // Show button to close opened wallet. if !wallet.is_closing() { View::item_button(ui, if !current { - Rounding::default() + CornerRadius::default() } else { View::item_rounding(0, 1, true) }, LOCK_KEY, None, || { diff --git a/src/gui/views/wallets/creation/creation.rs b/src/gui/views/wallets/creation/creation.rs index af90b0c9..ff55b2a5 100644 --- a/src/gui/views/wallets/creation/creation.rs +++ b/src/gui/views/wallets/creation/creation.rs @@ -115,10 +115,10 @@ impl WalletCreation { egui::TopBottomPanel::bottom("wallet_creation_step_panel") .frame(egui::Frame { inner_margin: Margin { - left: View::far_left_inset_margin(ui) + View::TAB_ITEMS_PADDING, - right: View::get_right_inset() + View::TAB_ITEMS_PADDING, - top: View::TAB_ITEMS_PADDING, - bottom: View::get_bottom_inset() + View::TAB_ITEMS_PADDING, + left: (View::far_left_inset_margin(ui) + View::TAB_ITEMS_PADDING) as i8, + right: (View::get_right_inset() + View::TAB_ITEMS_PADDING) as i8, + top: View::TAB_ITEMS_PADDING as i8, + bottom: (View::get_bottom_inset() + View::TAB_ITEMS_PADDING) as i8, }, fill: Colors::fill_deep(), ..Default::default() @@ -143,10 +143,10 @@ impl WalletCreation { egui::CentralPanel::default() .frame(egui::Frame { inner_margin: Margin { - left: View::far_left_inset_margin(ui) + 4.0, - right: View::get_right_inset() + 4.0, - top: 3.0, - bottom: 4.0, + left: (View::far_left_inset_margin(ui) + 4.0) as i8, + right: (View::get_right_inset() + 4.0) as i8, + top: 3.0 as i8, + bottom: 4.0 as i8, }, ..Default::default() }) diff --git a/src/gui/views/wallets/modals/wallets.rs b/src/gui/views/wallets/modals/wallets.rs index bb1002c4..a72fbad4 100644 --- a/src/gui/views/wallets/modals/wallets.rs +++ b/src/gui/views/wallets/modals/wallets.rs @@ -13,7 +13,7 @@ // limitations under the License. use egui::scroll_area::ScrollBarVisibility; -use egui::{Align, Layout, RichText, ScrollArea}; +use egui::{Align, Layout, RichText, ScrollArea, StrokeKind}; use crate::gui::Colors; use crate::gui::icons::{CHECK, CHECK_FAT, COMPUTER_TOWER, FOLDER_OPEN, GLOBE_SIMPLE, PLUGS_CONNECTED}; @@ -108,7 +108,11 @@ impl WalletsModal { let mut rect = ui.available_rect_before_wrap(); rect.set_height(78.0); let rounding = View::item_rounding(0, 1, false); - ui.painter().rect(rect, rounding, Colors::fill(), View::hover_stroke()); + ui.painter().rect(rect, + rounding, + Colors::fill(), + View::hover_stroke(), + StrokeKind::Middle); ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { if self.can_open { diff --git a/src/gui/views/wallets/wallet/content.rs b/src/gui/views/wallets/wallet/content.rs index 15c952e3..83244d22 100644 --- a/src/gui/views/wallets/wallet/content.rs +++ b/src/gui/views/wallets/wallet/content.rs @@ -13,7 +13,7 @@ // limitations under the License. use std::time::Duration; -use egui::{Align, Id, Layout, Margin, RichText, ScrollArea}; +use egui::{Align, Id, Layout, Margin, RichText, ScrollArea, StrokeKind}; use egui::scroll_area::ScrollBarVisibility; use grin_chain::SyncStatus; use grin_core::core::amount_to_hr_string; @@ -123,10 +123,10 @@ impl WalletContent { egui::TopBottomPanel::top(Id::from("wallet_account").with(wallet.identifier())) .frame(egui::Frame { inner_margin: Margin { - left: View::far_left_inset_margin(ui) + 4.0, - right: View::get_right_inset() + 4.0, - top: 4.0, - bottom: 0.0, + left: (View::far_left_inset_margin(ui) + 4.0) as i8, + right: (View::get_right_inset() + 4.0) as i8, + top: 4.0 as i8, + bottom: 0.0 as i8, }, fill: Colors::fill(), ..Default::default() @@ -185,10 +185,10 @@ impl WalletContent { egui::TopBottomPanel::bottom("wallet_tabs") .frame(egui::Frame { inner_margin: Margin { - left: View::far_left_inset_margin(ui) + View::TAB_ITEMS_PADDING, - right: View::get_right_inset() + View::TAB_ITEMS_PADDING, - top: View::TAB_ITEMS_PADDING, - bottom: View::get_bottom_inset() + View::TAB_ITEMS_PADDING, + left: (View::far_left_inset_margin(ui) + View::TAB_ITEMS_PADDING) as i8, + right: (View::get_right_inset() + View::TAB_ITEMS_PADDING) as i8, + top: View::TAB_ITEMS_PADDING as i8, + bottom: (View::get_bottom_inset() + View::TAB_ITEMS_PADDING) as i8, }, fill: Colors::fill(), ..Default::default() @@ -214,10 +214,10 @@ impl WalletContent { egui::CentralPanel::default() .frame(egui::Frame { inner_margin: Margin { - left: View::far_left_inset_margin(ui) + 4.0, - right: View::get_right_inset() + 4.0, - top: 0.0, - bottom: 4.0, + left: (View::far_left_inset_margin(ui) + 4.0) as i8, + right: (View::get_right_inset() + 4.0) as i8, + top: 0.0 as i8, + bottom: 4.0 as i8, }, ..Default::default() }) @@ -287,7 +287,11 @@ impl WalletContent { rect.set_height(75.0); // Draw round background. let rounding = View::item_rounding(0, 2, false); - ui.painter().rect(rect, rounding, Colors::fill_lite(), View::item_stroke()); + ui.painter().rect(rect, + rounding, + Colors::fill_lite(), + View::item_stroke(), + StrokeKind::Middle); ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { // Draw button to show QR code scanner. diff --git a/src/gui/views/wallets/wallet/modals/accounts.rs b/src/gui/views/wallets/wallet/modals/accounts.rs index 58ccb7a6..c3122f94 100644 --- a/src/gui/views/wallets/wallet/modals/accounts.rs +++ b/src/gui/views/wallets/wallet/modals/accounts.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use egui::{Align, Id, Layout, RichText, ScrollArea}; +use egui::{Align, Id, Layout, RichText, ScrollArea, StrokeKind}; use egui::scroll_area::ScrollBarVisibility; use grin_core::core::amount_to_hr_string; @@ -187,7 +187,11 @@ fn account_item_ui(ui: &mut egui::Ui, // Draw round background. let bg_rect = rect.clone(); let item_rounding = View::item_rounding(index, size, false); - ui.painter().rect(bg_rect, item_rounding, Colors::fill(), View::item_stroke()); + ui.painter().rect(bg_rect, + item_rounding, + Colors::fill(), + View::item_stroke(), + StrokeKind::Middle); ui.vertical(|ui| { ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { diff --git a/src/gui/views/wallets/wallet/settings/connection.rs b/src/gui/views/wallets/wallet/settings/connection.rs index b0a290f6..3d53644d 100644 --- a/src/gui/views/wallets/wallet/settings/connection.rs +++ b/src/gui/views/wallets/wallet/settings/connection.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use egui::{Align, Layout, RichText}; +use egui::{Align, Layout, RichText, StrokeKind}; use crate::gui::Colors; use crate::gui::icons::{CHECK, CHECK_CIRCLE, CHECK_FAT, DOTS_THREE_CIRCLE, GLOBE, GLOBE_SIMPLE, PLUS_CIRCLE, X_CIRCLE}; @@ -190,7 +190,11 @@ impl ConnectionSettings { // Draw round background. let bg_rect = rect.clone(); let item_rounding = View::item_rounding(index, len, false); - ui.painter().rect(bg_rect, item_rounding, Colors::fill(), View::item_stroke()); + ui.painter().rect(bg_rect, + item_rounding, + Colors::fill(), + View::item_stroke(), + StrokeKind::Middle); ui.vertical(|ui| { ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { diff --git a/src/gui/views/wallets/wallet/transport/content.rs b/src/gui/views/wallets/wallet/transport/content.rs index dfebb81c..67b35e5f 100644 --- a/src/gui/views/wallets/wallet/transport/content.rs +++ b/src/gui/views/wallets/wallet/transport/content.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use egui::{Align, Layout, RichText, Rounding}; +use egui::{Align, CornerRadius, Layout, RichText, StrokeKind}; use crate::gui::Colors; use crate::gui::icons::{CHECK_CIRCLE, COPY, DOTS_THREE_CIRCLE, EXPORT, GEAR_SIX, GLOBE_SIMPLE, POWER, QR_CODE, SHIELD_CHECKERED, SHIELD_SLASH, WARNING_CIRCLE, X_CIRCLE}; @@ -148,7 +148,11 @@ impl WalletTransport { // Draw round background. let bg_rect = rect.clone(); let item_rounding = View::item_rounding(0, 2, false); - ui.painter().rect(bg_rect, item_rounding, Colors::fill_lite(), View::item_stroke()); + ui.painter().rect(bg_rect, + item_rounding, + Colors::fill_lite(), + View::item_stroke(), + StrokeKind::Middle); ui.vertical(|ui| { ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { @@ -168,14 +172,14 @@ impl WalletTransport { let service_id = &wallet.identifier(); if !Tor::is_service_starting(service_id) && wallet.foreign_api_port().is_some() { if !Tor::is_service_running(service_id) { - View::item_button(ui, Rounding::default(), POWER, Some(Colors::green()), || { + View::item_button(ui, CornerRadius::default(), POWER, Some(Colors::green()), || { if let Ok(key) = wallet.secret_key() { let api_port = wallet.foreign_api_port().unwrap(); Tor::start_service(api_port, key, service_id); } }); } else { - View::item_button(ui, Rounding::default(), POWER, Some(Colors::red()), || { + View::item_button(ui, CornerRadius::default(), POWER, Some(Colors::red()), || { Tor::stop_service(service_id); }); } @@ -254,7 +258,11 @@ impl WalletTransport { } else { View::item_rounding(1, 2, false) }; - ui.painter().rect(bg_rect, item_rounding, Colors::fill_lite(), View::item_stroke()); + ui.painter().rect(bg_rect, + item_rounding, + Colors::fill_lite(), + View::item_stroke(), + StrokeKind::Middle); ui.vertical(|ui| { ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { @@ -274,7 +282,7 @@ impl WalletTransport { }); // Show button to enable/disable Tor listener for current wallet. - View::item_button(ui, Rounding::default(), COPY, None, || { + View::item_button(ui, CornerRadius::default(), COPY, None, || { cb.copy_string_to_buffer(addr.clone()); }); @@ -338,7 +346,11 @@ impl WalletTransport { // Draw round background. let bg_rect = rect.clone(); let item_rounding = View::item_rounding(1, 2, false); - ui.painter().rect(bg_rect, item_rounding, Colors::fill(), View::item_stroke()); + ui.painter().rect(bg_rect, + item_rounding, + Colors::fill(), + View::item_stroke(), + StrokeKind::Middle); ui.vertical(|ui| { ui.allocate_ui_with_layout(rect.size(), Layout::top_down(Align::Center), |ui| { diff --git a/src/gui/views/wallets/wallet/txs/content.rs b/src/gui/views/wallets/wallet/txs/content.rs index 5f404587..40b566be 100644 --- a/src/gui/views/wallets/wallet/txs/content.rs +++ b/src/gui/views/wallets/wallet/txs/content.rs @@ -14,7 +14,7 @@ use std::ops::Range; use std::time::{SystemTime, UNIX_EPOCH}; -use egui::{Align, Id, Layout, Rect, RichText, Rounding, ScrollArea}; +use egui::{Align, Id, Layout, Rect, RichText, CornerRadius, ScrollArea, StrokeKind}; use egui::epaint::RectShape; use egui::scroll_area::ScrollBarVisibility; use grin_core::consensus::COINBASE_MATURITY; @@ -155,15 +155,15 @@ impl WalletTransactions { // Draw tx item background. let mut r = View::item_rounding(index, txs.len(), false); let p = ui.painter(); - p.rect(rect, r, Colors::fill_lite(), View::item_stroke()); + p.rect(rect, r, Colors::fill_lite(), View::item_stroke(), StrokeKind::Middle); let tx = txs.get(index).unwrap(); let data = wallet.get_data().unwrap(); Self::tx_item_ui(ui, tx, rect, &data, |ui| { // Draw button to show transaction info. if tx.data.tx_slate_id.is_some() { - r.nw = 0.0; - r.sw = 0.0; + r.nw = 0.0 as u8; + r.sw = 0.0 as u8; View::item_button(ui, r, FILE_TEXT, None, || { self.show_tx_info_modal(wallet, tx, false); }); @@ -174,7 +174,7 @@ impl WalletTransactions { // Draw button to show transaction finalization. if wallet_loaded && tx.can_finalize { let (icon, color) = (CHECK, Some(Colors::green())); - View::item_button(ui, Rounding::default(), icon, color, || { + View::item_button(ui, CornerRadius::default(), icon, color, || { self.show_tx_info_modal(wallet, tx, true); }); } @@ -182,7 +182,7 @@ impl WalletTransactions { // Draw button to cancel transaction. if wallet_loaded && tx.can_cancel() { let (icon, color) = (PROHIBIT, Some(Colors::red())); - View::item_button(ui, Rounding::default(), icon, color, || { + View::item_button(ui, CornerRadius::default(), icon, color, || { self.confirm_cancel_tx_id = Some(tx.data.id); // Show transaction cancellation confirmation modal. Modal::new(CANCEL_TX_CONFIRMATION_MODAL) @@ -205,13 +205,13 @@ impl WalletTransactions { } let rect = ui.available_rect_before_wrap(); // Draw background. - let mut bg = RectShape::new(rect, Rounding { - nw: 0.0, - ne: 0.0, - sw: 8.0, - se: 8.0, - }, Colors::TRANSPARENT, View::item_stroke()); - let bg_idx = ui.painter().add(bg); + let mut bg = RectShape::new(rect, CornerRadius { + nw: 0.0 as u8, + ne: 0.0 as u8, + sw: 8.0 as u8, + se: 8.0 as u8, + }, Colors::TRANSPARENT, View::item_stroke(), StrokeKind::Middle); + let bg_idx = ui.painter().add(bg.clone()); let resp = ui.allocate_ui(rect.size(), |ui| { ui.vertical_centered_justified(|ui| { // Correct vertical spacing between items. diff --git a/src/gui/views/wallets/wallet/txs/tx.rs b/src/gui/views/wallets/wallet/txs/tx.rs index e06c0b28..4424c509 100644 --- a/src/gui/views/wallets/wallet/txs/tx.rs +++ b/src/gui/views/wallets/wallet/txs/tx.rs @@ -16,7 +16,7 @@ use std::thread; use std::sync::Arc; use parking_lot::RwLock; use egui::scroll_area::ScrollBarVisibility; -use egui::{Align, Id, Layout, RichText, Rounding, ScrollArea}; +use egui::{Align, Id, Layout, RichText, CornerRadius, ScrollArea, StrokeKind}; use grin_util::ToHex; use grin_core::core::amount_to_hr_string; use grin_wallet_libwallet::{Error, Slate, SlateState, TxLogEntryType}; @@ -230,7 +230,7 @@ impl WalletTransactionModal { // Draw tx item background. let p = ui.painter(); let r = View::item_rounding(0, 2, false); - p.rect(rect, r, Colors::TRANSPARENT, View::item_stroke()); + p.rect(rect, r, Colors::TRANSPARENT, View::item_stroke(), StrokeKind::Middle); // Show transaction amount status and time. let data = wallet.get_data().unwrap(); @@ -274,7 +274,7 @@ impl WalletTransactionModal { // Draw button to cancel transaction. if wallet_loaded && tx.can_cancel() { let r = if tx.can_finalize { - Rounding::default() + CornerRadius::default() } else { View::item_rounding(0, 2, true) }; @@ -555,13 +555,13 @@ fn info_item_ui(ui: &mut egui::Ui, let bg_rect = rect.clone(); let mut rounding = View::item_rounding(1, 3, false); - ui.painter().rect(bg_rect, rounding, Colors::fill(), View::item_stroke()); + ui.painter().rect(bg_rect, rounding, Colors::fill(), View::item_stroke(), StrokeKind::Middle); ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| { // Draw button to copy transaction info value. if copy { - rounding.nw = 0.0; - rounding.sw = 0.0; + rounding.nw = 0.0 as u8; + rounding.sw = 0.0 as u8; View::item_button(ui, rounding, COPY, None, || { cb.copy_string_to_buffer(value.clone()); }); diff --git a/src/lib.rs b/src/lib.rs index dec0f638..d1f7fb21 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -185,7 +185,7 @@ pub fn setup_fonts(ctx: &Context) { fonts.font_data.insert( "phosphor".to_owned(), - egui::FontData::from_static(include_bytes!( + Arc::new(egui::FontData::from_static(include_bytes!( "../fonts/phosphor.ttf" )).tweak(egui::FontTweak { scale: 1.0, @@ -193,7 +193,7 @@ pub fn setup_fonts(ctx: &Context) { y_offset: 0.0, baseline_offset_factor: 0.16, }), - ); + )); fonts .families .entry(Proportional) @@ -202,7 +202,7 @@ pub fn setup_fonts(ctx: &Context) { fonts.font_data.insert( "noto".to_owned(), - egui::FontData::from_static(include_bytes!( + Arc::new(egui::FontData::from_static(include_bytes!( "../fonts/noto_sc_reg.otf" )).tweak(egui::FontTweak { scale: 1.0, @@ -210,7 +210,7 @@ pub fn setup_fonts(ctx: &Context) { y_offset: 0.0, baseline_offset_factor: 0.17, }), - ); + )); fonts .families .entry(Proportional)