From 3cf1d708a81732c17fb3a8c431ad026ca39540a5 Mon Sep 17 00:00:00 2001 From: futile Date: Sun, 28 Jun 2026 17:30:43 +0100 Subject: [PATCH] update egui & co, and rip out catppuccin_egui (garbage) --- Cargo.lock | 375 ++++++++++++++++++++++++++++++++------------ Cargo.toml | 7 +- src/gui/app.rs | 49 +++--- src/gui/debug.rs | 2 +- src/gui/run.rs | 9 +- src/gui/settings.rs | 25 ++- src/gui/tools.rs | 8 +- 7 files changed, 318 insertions(+), 157 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 32f49d0..b00308e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,21 +3,14 @@ version = 4 [[package]] -name = "ab_glyph" -version = "0.2.32" +name = "accesskit" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +checksum = "d3b7f7f85a7e5f68090000ed7622545829afd484d210358702ae4cb97dd0c320" dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", + "uuid", ] -[[package]] -name = "ab_glyph_rasterizer" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" - [[package]] name = "adler2" version = "2.0.1" @@ -138,6 +131,15 @@ dependencies = [ "objc2 0.5.2", ] +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.4", +] + [[package]] name = "bumpalo" version = "3.20.3" @@ -215,15 +217,6 @@ dependencies = [ "wayland-client", ] -[[package]] -name = "catppuccin-egui" -version = "5.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119005543bcd5cc74f76323d40801bb29baf1b062e84f86eb42fb0b2a3fe61e9" -dependencies = [ - "egui", -] - [[package]] name = "cc" version = "1.2.65" @@ -266,6 +259,15 @@ dependencies = [ "error-code", ] +[[package]] +name = "color" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ec7c5eb7a16992b1904d76c517d170ab353b0e0b3d5a0c81a8a0cd1037893cf" +dependencies = [ + "bytemuck", +] + [[package]] name = "combine" version = "4.6.7" @@ -433,9 +435,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ecolor" -version = "0.32.3" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bdf37f8d5bd9aa7f753573fdda9cf7343afa73dd28d7bfe9593bd9798fc07e" +checksum = "6758be723a3f298bbfda4db75748bc2ba0abafe096b6383c7c32da264764fbc3" dependencies = [ "bytemuck", "emath", @@ -443,9 +445,9 @@ dependencies = [ [[package]] name = "eframe" -version = "0.32.3" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d1c15e7bd136b309bd3487e6ffe5f668b354cd9768636a836dd738ac90eb0b" +checksum = "8dc8234e2f681b2afd2b2e8c332fa614de2fddbdcb28d0acf5c420449682ea90" dependencies = [ "ahash", "bytemuck", @@ -459,9 +461,9 @@ dependencies = [ "image", "js-sys", "log", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", + "objc2 0.6.4", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", "profiling", @@ -471,21 +473,22 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "web-time", - "winapi", - "windows-sys 0.59.0", + "windows-sys 0.61.2", "winit", ] [[package]] name = "egui" -version = "0.32.3" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5d0306cd61ca75e29682926d71f2390160247f135965242e904a636f51c0dc" +checksum = "2796c98d50b79631281d516343a6f6e93c0666462ca36e2c93b39f25d7793325" dependencies = [ + "accesskit", "ahash", "bitflags 2.13.0", "emath", "epaint", + "itertools", "log", "nohash-hasher", "profiling", @@ -495,15 +498,17 @@ dependencies = [ [[package]] name = "egui-winit" -version = "0.32.3" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95d0a91f9cb0dc2e732d49c2d521ac8948e1f0b758f306fb7b14d6f5db3927f" +checksum = "9ea6bf3608db949588b95b8b341ee358d0c3f95cf4dc3f53d8d76717edee87db" dependencies = [ - "ahash", "arboard", "bytemuck", "egui", "log", + "objc2 0.6.4", + "objc2-foundation 0.3.2", + "objc2-ui-kit 0.3.2", "profiling", "raw-window-handle", "smithay-clipboard", @@ -514,14 +519,15 @@ dependencies = [ [[package]] name = "egui_extras" -version = "0.32.3" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dddbceddf39805fc6c62b1f7f9c05e23590b40844dc9ed89c6dc6dbc886e3e3b" +checksum = "e2bd33be7338367bf21f54d62e069d58a5fb3ae033fa8bc6df7a77b9ef4cf957" dependencies = [ "ahash", "egui", "enum-map", "image", + "itertools", "log", "profiling", "resvg", @@ -529,26 +535,29 @@ dependencies = [ [[package]] name = "egui_glow" -version = "0.32.3" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7037813341727937f9e22f78d912f3e29bc3c46e2f40a9e82bb51cbf5e4cfb" +checksum = "52274b9bfb8d8e252cd0f00c9f6214f360d75a0962baa77a2d62ddb002fe99d4" dependencies = [ - "ahash", "bytemuck", "egui", "glow", "log", "memoffset", "profiling", - "wasm-bindgen", - "web-sys", ] [[package]] -name = "emath" -version = "0.32.3" +name = "either" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd7bc25f769a3c198fe1cf183124bf4de3bd62ef7b4f1eaf6b08711a3af8db" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" + +[[package]] +name = "emath" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd4ec073c9898516584d8c6cfdcee95b530b3d941cd5031ef4050aa36812308b" dependencies = [ "bytemuck", ] @@ -589,27 +598,34 @@ dependencies = [ [[package]] name = "epaint" -version = "0.32.3" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63adcea970b7a13094fe97a36ab9307c35a750f9e24bf00bb7ef3de573e0fddb" +checksum = "4e60a8888b51da911df23918fd7301359b1d43a406a0ff3b8863af093dd7fc6c" dependencies = [ - "ab_glyph", "ahash", "bytemuck", "ecolor", "emath", "epaint_default_fonts", + "font-types", + "harfrust", "log", "nohash-hasher", "parking_lot", "profiling", + "self_cell", + "skrifa", + "smallvec", + "unicode-general-category", + "unicode-segmentation", + "vello_cpu", ] [[package]] name = "epaint_default_fonts" -version = "0.32.3" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1537accc50c9cab5a272c39300bdd0dd5dca210f6e5e8d70be048df9596e7ca2" +checksum = "13ee4e1f553a3584c301f3a56ff1a775f1384781396cea301c8d952e9b93f560" [[package]] name = "equivalent" @@ -657,6 +673,12 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "fearless_simd" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" + [[package]] name = "find-msvc-tools" version = "0.1.9" @@ -679,6 +701,21 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "font-types" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7" +dependencies = [ + "bytemuck", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -773,10 +810,26 @@ dependencies = [ ] [[package]] -name = "glow" -version = "0.16.0" +name = "glifo" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" +checksum = "d99fc21d493812643aae86d53b7bbd02f376434a90317e8a790bc209fdd6605e" +dependencies = [ + "bytemuck", + "foldhash", + "hashbrown", + "log", + "peniko", + "skrifa", + "smallvec", + "vello_common", +] + +[[package]] +name = "glow" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5" dependencies = [ "js-sys", "slotmap", @@ -842,7 +895,6 @@ name = "gta-tools" version = "0.11.0" dependencies = [ "anyhow", - "catppuccin-egui", "eframe", "egui_extras", "humantime", @@ -858,6 +910,15 @@ dependencies = [ "winreg 0.56.0", ] +[[package]] +name = "guillotiere" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b17e70c989c36bad147b27a58d148c0741c51448aa5653436547323e524d0ab" +dependencies = [ + "euclid", +] + [[package]] name = "half" version = "2.7.1" @@ -869,11 +930,26 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "harfrust" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0431e8e389aa0f1e72bb9d1c2db8957a1a7a3580e8ed97db819c14837aac9b3e" +dependencies = [ + "bitflags 2.13.0", + "bytemuck", + "read-fonts", + "smallvec", +] + [[package]] name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash", +] [[package]] name = "heck" @@ -1045,6 +1121,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -1147,6 +1232,18 @@ dependencies = [ "smallvec", ] +[[package]] +name = "kurbo" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2" +dependencies = [ + "arrayvec", + "euclid", + "polycool", + "smallvec", +] + [[package]] name = "libc" version = "0.2.186" @@ -1175,6 +1272,12 @@ dependencies = [ "redox_syscall 0.8.1", ] +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -1357,7 +1460,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ "bitflags 2.13.0", - "block2", + "block2 0.5.1", "libc", "objc2 0.5.2", "objc2-core-data", @@ -1386,7 +1489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ "bitflags 2.13.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", "objc2-foundation 0.2.2", @@ -1398,7 +1501,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -1410,7 +1513,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.13.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -1445,7 +1548,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", "objc2-metal", @@ -1457,7 +1560,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-contacts", "objc2-foundation 0.2.2", @@ -1476,7 +1579,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.13.0", - "block2", + "block2 0.5.1", "dispatch", "libc", "objc2 0.5.2", @@ -1489,6 +1592,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ "bitflags 2.13.0", + "block2 0.6.2", "objc2 0.6.4", "objc2-core-foundation", ] @@ -1510,7 +1614,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-app-kit 0.2.2", "objc2-foundation 0.2.2", @@ -1523,7 +1627,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.13.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -1535,7 +1639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.13.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", "objc2-metal", @@ -1558,7 +1662,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ "bitflags 2.13.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-cloud-kit", "objc2-core-data", @@ -1572,13 +1676,25 @@ dependencies = [ "objc2-user-notifications", ] +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.0", + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-uniform-type-identifiers" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -1590,7 +1706,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ "bitflags 2.13.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", "objc2-foundation 0.2.2", @@ -1623,15 +1739,6 @@ dependencies = [ "libredox", ] -[[package]] -name = "owned_ttf_parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" -dependencies = [ - "ttf-parser", -] - [[package]] name = "parking_lot" version = "0.12.5" @@ -1661,6 +1768,19 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" +[[package]] +name = "peniko" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "839c8299360d2e998bdb106dc0a6cd71dcc5f4df51df1b620361bf50e283cca6" +dependencies = [ + "bytemuck", + "color", + "kurbo 0.13.1", + "linebender_resource_handle", + "smallvec", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -1751,6 +1871,15 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "polycool" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6" +dependencies = [ + "arrayvec", +] + [[package]] name = "potential_utf" version = "0.1.5" @@ -1826,6 +1955,16 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" +[[package]] +name = "read-fonts" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4ed38b89c2c77ff968c524145ad65fb010f38af5c7a224b53b81d47ac2daa81" +dependencies = [ + "bytemuck", + "font-types", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -1944,6 +2083,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "self_cell" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" + [[package]] name = "semver" version = "1.0.28" @@ -2045,6 +2190,16 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" +[[package]] +name = "skrifa" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c34617370ae968efb7161bb2beb517d9084659aae19e24b89e3db25b46e4564" +dependencies = [ + "bytemuck", + "read-fonts", +] + [[package]] name = "slab" version = "0.4.12" @@ -2167,7 +2322,7 @@ version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc" dependencies = [ - "kurbo", + "kurbo 0.11.3", "siphasher", ] @@ -2363,10 +2518,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" [[package]] -name = "ttf-parser" -version = "0.25.1" +name = "unicode-general-category" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" [[package]] name = "unicode-ident" @@ -2402,7 +2557,7 @@ dependencies = [ "data-url", "flate2", "imagesize", - "kurbo", + "kurbo 0.11.3", "log", "pico-args", "roxmltree", @@ -2420,6 +2575,40 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "uuid" +version = "1.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53" + +[[package]] +name = "vello_common" +version = "0.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d672facaa2d697285a786cd9d44d614cd2ce54cdc022504bf339f8fff3b750" +dependencies = [ + "bytemuck", + "fearless_simd", + "guillotiere", + "hashbrown", + "log", + "peniko", + "smallvec", + "thiserror 2.0.18", +] + +[[package]] +name = "vello_cpu" +version = "0.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "588691169aed86b5c8fb487266afee01323234e6fd0a3f2aaec0eaa8e4007f23" +dependencies = [ + "bytemuck", + "glifo", + "hashbrown", + "vello_common", +] + [[package]] name = "version_check" version = "0.9.5" @@ -2684,22 +2873,6 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.11" @@ -2709,12 +2882,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows" version = "0.62.2" @@ -2999,7 +3166,7 @@ dependencies = [ "android-activity", "atomic-waker", "bitflags 2.13.0", - "block2", + "block2 0.5.1", "calloop 0.13.0", "cfg_aliases", "concurrent-queue", @@ -3013,7 +3180,7 @@ dependencies = [ "objc2 0.5.2", "objc2-app-kit 0.2.2", "objc2-foundation 0.2.2", - "objc2-ui-kit", + "objc2-ui-kit 0.2.2", "orbclient", "pin-project", "raw-window-handle", diff --git a/Cargo.toml b/Cargo.toml index f6906fd..3d9e2ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,14 +8,11 @@ description = "A toolset of convenient things for GTA V Online." [dependencies] anyhow = "1.0" -catppuccin-egui = { version = "5.6.0", default-features = false, features = [ - "egui32", -] } -eframe = { version = "0.32.2", default-features = false, features = [ +eframe = { version = "0.35", default-features = false, features = [ "glow", "default_fonts", ] } -egui_extras = { version = "0.32.2", default-features = false, features = [ +egui_extras = { version = "0.35", default-features = false, features = [ "image", "svg", ] } diff --git a/src/gui/app.rs b/src/gui/app.rs index f787a3e..b722c10 100644 --- a/src/gui/app.rs +++ b/src/gui/app.rs @@ -57,39 +57,39 @@ pub struct App { } impl eframe::App for App { - fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { - ctx.request_repaint_after(Duration::from_millis(100)); + fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) { + ui.request_repaint_after(Duration::from_millis(100)); self.empty_session.run_timers(&self.firewall).unwrap(); - egui::TopBottomPanel::bottom("bottom_panel") - .exact_height(25.0) - .show(ctx, |ui| { + egui::Panel::bottom("bottom_panel") + .exact_size(25.0) + .show(ui, |ui| { ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| { ui.build_menu(&mut self.stage); }); }); - egui::CentralPanel::default().show(ctx, |ui| { + egui::CentralPanel::default().show(ui, |ui| { egui::ScrollArea::vertical() .auto_shrink([false, true]) .show(ui, |ui| match self.stage { - Stage::Main => self.show_main_stage(ctx, ui), - Stage::Settings => self.show_settings_stage(ctx, ui), - Stage::About => self.show_about_stage(ctx, ui), + Stage::Main => self.show_main_stage(ui), + Stage::Settings => self.show_settings_stage(ui), + Stage::About => self.show_about_stage(ui), }); }); - if tools::debug_keycombo_pressed(ctx) || tools::debug_viewport_close_pressed(ctx) { + if tools::debug_keycombo_pressed(ui) || tools::debug_viewport_close_pressed(ui) { self.flags.debug = !self.flags.debug; } if self.flags.debug { - self.show_debug_viewport(ctx); + self.show_debug_viewport(ui); } if self.flags.closing { - ctx.send_viewport_cmd(egui::ViewportCommand::Close); + ui.send_viewport_cmd(egui::ViewportCommand::Close); } } } impl App { - fn show_game_section(&mut self, _ctx: &egui::Context, ui: &mut egui::Ui) { + fn show_game_section(&mut self, ui: &mut egui::Ui) { ui.header("Game"); ui.horizontal(|ui| { if ui.button("Launch").clicked() { @@ -107,7 +107,7 @@ impl App { .prompt(force_close_button.clicked(), &mut self.system_info); } - fn show_session_section(&mut self, _ctx: &egui::Context, ui: &mut egui::Ui) { + fn show_session_section(&mut self, ui: &mut egui::Ui) { ui.header("Session"); ui.add_enabled_ui(!self.empty_session.disabled, |ui| { ui.horizontal(|ui| { @@ -140,7 +140,7 @@ impl App { } } - fn show_network_section(&mut self, _ctx: &egui::Context, ui: &mut egui::Ui) { + fn show_network_section(&mut self, ui: &mut egui::Ui) { ui.header("Network"); egui::Frame::new() .outer_margin(egui::vec2(0.0, -2.0)) @@ -212,13 +212,13 @@ impl App { }); } - fn show_main_stage(&mut self, ctx: &egui::Context, ui: &mut egui::Ui) { - self.show_game_section(ctx, ui); - self.show_session_section(ctx, ui); - self.show_network_section(ctx, ui); + fn show_main_stage(&mut self, ui: &mut egui::Ui) { + self.show_game_section(ui); + self.show_session_section(ui); + self.show_network_section(ui); } - fn show_settings_stage(&mut self, ctx: &egui::Context, ui: &mut egui::Ui) { + fn show_settings_stage(&mut self, ui: &mut egui::Ui) { ui.collapsing("General", |ui| { ui.horizontal(|ui| { let selection = self.settings.theme; @@ -228,7 +228,7 @@ impl App { ui.build_menu(&mut self.settings.theme); }); if selection != self.settings.theme { - catppuccin_egui::set_theme(ctx, self.settings.theme.into()); + ui.set_theme(egui::Theme::from(self.settings.theme)); } ui.label("Theme"); }); @@ -281,7 +281,7 @@ impl App { }); } - fn show_about_stage(&self, _ctx: &egui::Context, ui: &mut egui::Ui) { + fn show_about_stage(&self, ui: &mut egui::Ui) { ui.with_layout(egui::Layout::bottom_up(egui::Align::Center), |ui| { ui.horizontal(|ui| { ui.horizontal(|ui| { @@ -294,7 +294,10 @@ impl App { ui.label(" from "); ui.scope(|ui| { ui.style_mut().visuals.hyperlink_color = - catppuccin_egui::Theme::from(self.settings.theme).text; + egui::Theme::from(self.settings.theme) + .default_style() + .visuals + .text_color(); ui.hyperlink_to("futile", "https://futile.eu"); }); }); diff --git a/src/gui/debug.rs b/src/gui/debug.rs index 3519401..5c2b263 100644 --- a/src/gui/debug.rs +++ b/src/gui/debug.rs @@ -30,7 +30,7 @@ impl App { .show_ui(ui, |ui| ui.build_menu(&mut self.game_networking.blocked)); }); if ui.add(egui::Button::new("force refresh theme")).clicked() { - catppuccin_egui::set_theme(ui.ctx(), self.settings.theme.into()); + ui.set_theme(egui::Theme::from(self.settings.theme)); } if ui.button("panic button").clicked() { panic!("this is the panic button"); diff --git a/src/gui/run.rs b/src/gui/run.rs index 317dacb..921eb0f 100644 --- a/src/gui/run.rs +++ b/src/gui/run.rs @@ -25,15 +25,14 @@ fn app_creator( app.system_info.refresh(); // enable image loading support in egui egui_extras::install_image_loaders(&cc.egui_ctx); - // set our initial theme, from earlier loaded settings. we set the egui theme - // to dark here to work around system theme based switching of the egui style - cc.egui_ctx.set_theme(egui::Theme::Dark); - catppuccin_egui::set_theme(&cc.egui_ctx, app.settings.theme.into()); + // set our initial theme, from earlier loaded settings. we set the egui theme here to work + // around system theme based switching of the egui style + cc.egui_ctx.set_theme(egui::Theme::from(app.settings.theme)); // apply some global styling that we like cc.egui_ctx.all_styles_mut(|style| { style.spacing.item_spacing = egui::vec2(4.0, 4.0); style.interaction.selectable_labels = false; - style.visuals.hyperlink_color = catppuccin_egui::Theme::from(app.settings.theme).text; + // style.visuals.hyperlink_color = catppuccin_egui::Theme::from(app.settings.theme).text; }); // load any extra fonts that we need let mut fonts = egui::FontDefinitions::default(); diff --git a/src/gui/settings.rs b/src/gui/settings.rs index dd3db4a..40c5094 100644 --- a/src/gui/settings.rs +++ b/src/gui/settings.rs @@ -1,4 +1,5 @@ use crate::util::win; +use eframe::egui; use serde::{Deserialize, Serialize}; use strum::{Display, EnumIter}; @@ -9,30 +10,24 @@ pub enum Theme { #[default] #[strum(to_string = "Auto")] Auto, - #[strum(to_string = "Latte")] - Latte, - #[strum(to_string = "Frappe")] - Frappe, - #[strum(to_string = "Macchiato")] - Macchiato, - #[strum(to_string = "Mocha")] - Mocha, + #[strum(to_string = "Light")] + Light, + #[strum(to_string = "Dark")] + Dark, } -impl From for catppuccin_egui::Theme { +impl From for egui::Theme { fn from(val: Theme) -> Self { match val { Theme::Auto => { if win::is_system_theme_light() { - catppuccin_egui::LATTE + egui::Theme::Light } else { - catppuccin_egui::MOCHA + egui::Theme::Dark } } - Theme::Latte => catppuccin_egui::LATTE, - Theme::Frappe => catppuccin_egui::FRAPPE, - Theme::Macchiato => catppuccin_egui::MACCHIATO, - Theme::Mocha => catppuccin_egui::MOCHA, + Theme::Light => egui::Theme::Light, + Theme::Dark => egui::Theme::Dark, } } } diff --git a/src/gui/tools.rs b/src/gui/tools.rs index b84adea..25c1e04 100644 --- a/src/gui/tools.rs +++ b/src/gui/tools.rs @@ -11,12 +11,12 @@ pub fn load_icon() -> egui::IconData { } } -pub fn debug_keycombo_pressed(ctx: &egui::Context) -> bool { - ctx.input(|i| i.modifiers.all() && i.key_pressed(egui::Key::D)) +pub fn debug_keycombo_pressed(ui: &egui::Ui) -> bool { + ui.input(|i| i.modifiers.all() && i.key_pressed(egui::Key::D)) } -pub fn debug_viewport_close_pressed(ctx: &egui::Context) -> bool { - ctx.input(|i| { +pub fn debug_viewport_close_pressed(ui: &egui::Ui) -> bool { + ui.input(|i| { i.raw .viewports .get(&egui::ViewportId::from_hash_of("debug_viewport"))