Allow window resizing
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Isaac Mills 2024-04-29 23:40:53 -04:00
parent fc946144b0
commit 50c4690ab6
Signed by: fnmain
GPG key ID: B67D7410F33A0F61
3 changed files with 204 additions and 127 deletions

291
Cargo.lock generated
View file

@ -214,17 +214,16 @@ dependencies = [
[[package]]
name = "arboard"
version = "3.3.2"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2041f1943049c7978768d84e6d0fd95de98b76d6c4727b09e78ec253d29fa58"
checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89"
dependencies = [
"clipboard-win",
"log",
"objc",
"objc-foundation",
"objc_id",
"objc2 0.5.1",
"objc2-app-kit",
"objc2-foundation",
"parking_lot",
"thiserror",
"x11rb",
]
@ -273,7 +272,7 @@ checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928"
dependencies = [
"concurrent-queue",
"event-listener 5.3.0",
"event-listener-strategy 0.5.1",
"event-listener-strategy 0.5.2",
"futures-core",
"pin-project-lite",
]
@ -286,7 +285,7 @@ checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a"
dependencies = [
"async-task",
"concurrent-queue",
"fastrand 2.0.2",
"fastrand 2.1.0",
"futures-lite 2.3.0",
"slab",
]
@ -335,8 +334,8 @@ dependencies = [
"futures-io",
"futures-lite 2.3.0",
"parking",
"polling 3.6.0",
"rustix 0.38.32",
"polling 3.7.0",
"rustix 0.38.34",
"slab",
"tracing",
"windows-sys 0.52.0",
@ -381,15 +380,15 @@ dependencies = [
"cfg-if",
"event-listener 3.1.0",
"futures-lite 1.13.0",
"rustix 0.38.32",
"rustix 0.38.34",
"windows-sys 0.48.0",
]
[[package]]
name = "async-recursion"
version = "1.1.0"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5"
checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
@ -398,27 +397,27 @@ dependencies = [
[[package]]
name = "async-signal"
version = "0.2.5"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5"
checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda"
dependencies = [
"async-io 2.3.2",
"async-lock 2.8.0",
"async-lock 3.3.0",
"atomic-waker",
"cfg-if",
"futures-core",
"futures-io",
"rustix 0.38.32",
"rustix 0.38.34",
"signal-hook-registry",
"slab",
"windows-sys 0.48.0",
"windows-sys 0.52.0",
]
[[package]]
name = "async-task"
version = "4.7.0"
version = "4.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799"
checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
[[package]]
name = "async-trait"
@ -493,9 +492,9 @@ checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
[[package]]
name = "base64"
version = "0.21.7"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51"
[[package]]
name = "bit-set"
@ -578,19 +577,26 @@ dependencies = [
]
[[package]]
name = "blocking"
version = "1.5.1"
name = "block2"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118"
checksum = "43ff7d91d3c1d568065b06c899777d1e48dcf76103a672a0adbc238a7f247f1e"
dependencies = [
"objc2 0.5.1",
]
[[package]]
name = "blocking"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88"
dependencies = [
"async-channel",
"async-lock 3.3.0",
"async-task",
"fastrand 2.0.2",
"futures-io",
"futures-lite 2.3.0",
"piper",
"tracing",
]
[[package]]
@ -639,8 +645,8 @@ checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298"
dependencies = [
"bitflags 2.5.0",
"log",
"polling 3.6.0",
"rustix 0.38.32",
"polling 3.7.0",
"rustix 0.38.34",
"slab",
"thiserror",
]
@ -652,19 +658,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02"
dependencies = [
"calloop",
"rustix 0.38.32",
"rustix 0.38.34",
"wayland-backend",
"wayland-client",
]
[[package]]
name = "cc"
version = "1.0.94"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7"
checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b"
dependencies = [
"jobserver",
"libc",
"once_cell",
]
[[package]]
@ -789,9 +796,9 @@ dependencies = [
[[package]]
name = "concurrent-queue"
version = "2.4.0"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363"
checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
dependencies = [
"crossbeam-utils",
]
@ -1036,7 +1043,7 @@ dependencies = [
"parking_lot",
"percent-encoding",
"pollster",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"static_assertions",
"thiserror",
"wasm-bindgen",
@ -1100,7 +1107,7 @@ dependencies = [
"arboard",
"egui",
"log",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"smithay-clipboard",
"web-time",
"webbrowser",
@ -1379,9 +1386,9 @@ dependencies = [
[[package]]
name = "event-listener-strategy"
version = "0.5.1"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3"
checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1"
dependencies = [
"event-listener 5.3.0",
"pin-project-lite",
@ -1398,9 +1405,9 @@ dependencies = [
[[package]]
name = "fastrand"
version = "2.0.2"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984"
checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
[[package]]
name = "fdeflate"
@ -1413,9 +1420,9 @@ dependencies = [
[[package]]
name = "flate2"
version = "1.0.28"
version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae"
dependencies = [
"crc32fast",
"miniz_oxide",
@ -1423,9 +1430,9 @@ dependencies = [
[[package]]
name = "font-types"
version = "0.5.2"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd6784a76a9c2b136ea3b8462391e9328252e938eb706eb44d752723b4c3a533"
checksum = "bdf6aa1de86490d8e39e04589bd04eb5953cc2a5ef0c25e389e807f44fd24e41"
dependencies = [
"bytemuck",
]
@ -1522,7 +1529,7 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5"
dependencies = [
"fastrand 2.0.2",
"fastrand 2.1.0",
"futures-core",
"futures-io",
"parking",
@ -1697,9 +1704,9 @@ dependencies = [
[[package]]
name = "hashbrown"
version = "0.14.3"
version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
dependencies = [
"ahash",
"allocator-api2",
@ -1842,9 +1849,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
[[package]]
name = "jobserver"
version = "0.1.30"
version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "685a7d121ee3f65ae4fddd72b25a04bb36b6af81bc0828f7d5434c0fe60fa3a2"
checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e"
dependencies = [
"libc",
]
@ -1901,9 +1908,9 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
[[package]]
name = "libc"
version = "0.2.153"
version = "0.2.154"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346"
[[package]]
name = "libloading"
@ -1962,9 +1969,9 @@ checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5"
[[package]]
name = "lock_api"
version = "0.4.11"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
dependencies = [
"autocfg",
"scopeguard",
@ -2099,7 +2106,7 @@ dependencies = [
"log",
"ndk-sys",
"num_enum",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"thiserror",
]
@ -2183,17 +2190,6 @@ dependencies = [
"objc_exception",
]
[[package]]
name = "objc-foundation"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
dependencies = [
"block",
"objc",
"objc_id",
]
[[package]]
name = "objc-sys"
version = "0.2.0-beta.2"
@ -2227,6 +2223,39 @@ dependencies = [
"objc2-encode 3.0.0",
]
[[package]]
name = "objc2"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4b25e1034d0e636cd84707ccdaa9f81243d399196b8a773946dcffec0401659"
dependencies = [
"objc-sys 0.3.3",
"objc2-encode 4.0.1",
]
[[package]]
name = "objc2-app-kit"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb79768a710a9a1798848179edb186d1af7e8a8679f369e4b8d201dd2a034047"
dependencies = [
"block2 0.5.0",
"objc2 0.5.1",
"objc2-core-data",
"objc2-foundation",
]
[[package]]
name = "objc2-core-data"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e092bc42eaf30a08844e6a076938c60751225ec81431ab89f5d1ccd9f958d6c"
dependencies = [
"block2 0.5.0",
"objc2 0.5.1",
"objc2-foundation",
]
[[package]]
name = "objc2-encode"
version = "2.0.0-pre.2"
@ -2242,6 +2271,22 @@ version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666"
[[package]]
name = "objc2-encode"
version = "4.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88658da63e4cc2c8adb1262902cd6af51094df0488b760d6fd27194269c0950a"
[[package]]
name = "objc2-foundation"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfaefe14254871ea16c7d88968c0ff14ba554712a20d76421eec52f0a7fb8904"
dependencies = [
"block2 0.5.0",
"objc2 0.5.1",
]
[[package]]
name = "objc_exception"
version = "0.1.2"
@ -2251,15 +2296,6 @@ dependencies = [
"cc",
]
[[package]]
name = "objc_id"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
dependencies = [
"objc",
]
[[package]]
name = "once_cell"
version = "1.19.0"
@ -2302,9 +2338,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
[[package]]
name = "parking_lot"
version = "0.12.1"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb"
dependencies = [
"lock_api",
"parking_lot_core",
@ -2312,15 +2348,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
version = "0.9.9"
version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if",
"libc",
"redox_syscall 0.4.1",
"redox_syscall 0.5.1",
"smallvec",
"windows-targets 0.48.5",
"windows-targets 0.52.5",
]
[[package]]
@ -2354,7 +2390,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4"
dependencies = [
"atomic-waker",
"fastrand 2.0.2",
"fastrand 2.1.0",
"futures-io",
]
@ -2395,15 +2431,15 @@ dependencies = [
[[package]]
name = "polling"
version = "3.6.0"
version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6"
checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3"
dependencies = [
"cfg-if",
"concurrent-queue",
"hermit-abi",
"pin-project-lite",
"rustix 0.38.32",
"rustix 0.38.34",
"tracing",
"windows-sys 0.52.0",
]
@ -2556,15 +2592,15 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9"
[[package]]
name = "raw-window-handle"
version = "0.6.0"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544"
checksum = "8cc3bcbdb1ddfc11e700e62968e6b4cc9c75bb466464ad28fb61c5b2c964418b"
[[package]]
name = "read-fonts"
version = "0.19.0"
version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea75b5ec052843434d263ef7a4c31cf86db5908c729694afb1ad3c884252a1b6"
checksum = "af4749db2bd1c853db31a7ae5ee2fc6c30bbddce353ea8fedf673fed187c68c7"
dependencies = [
"bytemuck",
"font-types",
@ -2588,6 +2624,15 @@ dependencies = [
"bitflags 1.3.2",
]
[[package]]
name = "redox_syscall"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"
dependencies = [
"bitflags 2.5.0",
]
[[package]]
name = "regex"
version = "1.10.4"
@ -2666,9 +2711,9 @@ dependencies = [
[[package]]
name = "rustix"
version = "0.38.32"
version = "0.38.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89"
checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
dependencies = [
"bitflags 2.5.0",
"errno",
@ -2693,15 +2738,15 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
version = "1.4.1"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247"
checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54"
[[package]]
name = "rustls-webpki"
version = "0.102.2"
version = "0.102.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610"
checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf"
dependencies = [
"ring",
"rustls-pki-types",
@ -2754,18 +2799,18 @@ checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba"
[[package]]
name = "serde"
version = "1.0.198"
version = "1.0.199"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc"
checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.198"
version = "1.0.199"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9"
checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc"
dependencies = [
"proc-macro2",
"quote",
@ -2796,9 +2841,9 @@ dependencies = [
[[package]]
name = "signal-hook-registry"
version = "1.4.1"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
dependencies = [
"libc",
]
@ -2846,7 +2891,7 @@ dependencies = [
"libc",
"log",
"memmap2",
"rustix 0.38.32",
"rustix 0.38.34",
"thiserror",
"wayland-backend",
"wayland-client",
@ -2981,8 +3026,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
dependencies = [
"cfg-if",
"fastrand 2.0.2",
"rustix 0.38.32",
"fastrand 2.1.0",
"rustix 0.38.34",
"windows-sys 0.52.0",
]
@ -2997,18 +3042,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.58"
version = "1.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297"
checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.58"
version = "1.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66"
dependencies = [
"proc-macro2",
"quote",
@ -3189,9 +3234,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
[[package]]
name = "unicode-width"
version = "0.1.11"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6"
[[package]]
name = "unicode-xid"
@ -3207,9 +3252,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "ureq"
version = "2.9.6"
version = "2.9.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35"
checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd"
dependencies = [
"base64",
"flate2",
@ -3341,7 +3386,7 @@ checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40"
dependencies = [
"cc",
"downcast-rs",
"rustix 0.38.32",
"rustix 0.38.34",
"scoped-tls",
"smallvec",
"wayland-sys",
@ -3354,7 +3399,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f"
dependencies = [
"bitflags 2.5.0",
"rustix 0.38.32",
"rustix 0.38.34",
"wayland-backend",
"wayland-scanner",
]
@ -3376,7 +3421,7 @@ version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba"
dependencies = [
"rustix 0.38.32",
"rustix 0.38.34",
"wayland-client",
"xcursor",
]
@ -3502,7 +3547,7 @@ dependencies = [
"naga",
"parking_lot",
"profiling",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"smallvec",
"static_assertions",
"wasm-bindgen",
@ -3530,7 +3575,7 @@ dependencies = [
"once_cell",
"parking_lot",
"profiling",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"rustc-hash",
"smallvec",
"thiserror",
@ -3573,7 +3618,7 @@ dependencies = [
"parking_lot",
"profiling",
"range-alloc",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"renderdoc-sys",
"rustc-hash",
"smallvec",
@ -3619,11 +3664,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.6"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b"
dependencies = [
"winapi",
"windows-sys 0.52.0",
]
[[package]]
@ -3916,9 +3961,9 @@ dependencies = [
"once_cell",
"orbclient",
"percent-encoding",
"raw-window-handle 0.6.0",
"raw-window-handle 0.6.1",
"redox_syscall 0.3.5",
"rustix 0.38.32",
"rustix 0.38.34",
"smithay-client-toolkit",
"smol_str",
"unicode-segmentation",
@ -3967,7 +4012,7 @@ dependencies = [
"libc",
"libloading 0.8.3",
"once_cell",
"rustix 0.38.32",
"rustix 0.38.34",
"x11rb-protocol",
]

View file

@ -66,14 +66,26 @@ pub enum State {
Context(Option<Mat2>, &'static Cow<'static, [JotdownItem<'static>]>),
}
#[derive(Default)]
pub struct ContextWindow {
pub size: Vec2,
pub text: Vec<ResolvedItem<'static>>,
pub content: &'static Cow<'static, [JotdownItem<'static>]>,
#[cfg(target_arch = "wasm32")]
pub name: &'static str,
}
impl Default for ContextWindow {
fn default() -> Self {
Self {
size: Vec2::default(),
text: Vec::default(),
content: &Cow::Borrowed(&[]),
#[cfg(target_arch = "wasm32")]
name: "",
}
}
}
pub struct ContextIcon {
pub icon: ImageSource<'static>,
pub content: &'static Cow<'static, [JotdownItem<'static>]>,
@ -276,6 +288,7 @@ impl ContextWindow {
})
.collect();
self.size = size;
self.content = content;
#[cfg(target_arch = "wasm32")]
if let Some(name) = name {
@ -290,6 +303,20 @@ impl ContextWindow {
.unwrap();
}
}
pub fn resize(&mut self, max_width: f32, font_system: &mut FontSystem) {
self.set_content(
self.content,
#[cfg(target_arch = "wasm32")]
None,
#[cfg(target_arch = "wasm32")]
None,
font_system,
max_width,
#[cfg(target_arch = "wasm32")]
&mut Vec::new(),
)
}
}
fn make_buffers(
@ -345,6 +372,9 @@ impl Portfolio {
// Load previous app state (if any).
// Note that you must enable the `persistence` feature for this to work.
cc.egui_ctx
.add_image_loader(Arc::new(super::png::JxlLoader::default()));
#[cfg(target_arch = "wasm32")]
let states;
#[cfg(target_arch = "wasm32")]
@ -378,7 +408,7 @@ impl Portfolio {
.unwrap()
.history()
.unwrap()
.push_state(&wasm_bindgen::JsValue::from(0), "Home")
.replace_state(&wasm_bindgen::JsValue::from(0), "Home")
.unwrap();
}
@ -593,6 +623,7 @@ impl eframe::App for Portfolio {
self.update_state(ui);
self.custom.custom_painting(ui);
if ui.max_rect() != self.max_size {
self.max_size = ui.max_rect();
let scale = Vec2::from(self.custom.resolution.to_array())
/ ui.ctx().pixels_per_point()
/ Vec2::new(800.0, 800.0);
@ -601,8 +632,9 @@ impl eframe::App for Portfolio {
self.buffer_size = buffer_size;
self.name_buffers = name_buffers;
self.window
.resize(self.max_size.width(), self.font_system.lock().deref_mut());
}
self.max_size = ui.max_rect();
let time = ui.input(|i| i.time);
let mut scroll_area = egui::ScrollArea::vertical().show_viewport(ui, |ui, rect| {
let max_rect = ui.max_rect();

View file

@ -4,7 +4,7 @@
Because of tree-sitter's incremental-parsing and tree-querying capabilites, making language servers for languages with a supported grammar is relatively trivial.
- This is a snippet of [grezi](https://github.com/StratusFearMe21/grezi-next) source code, a plain-text based slideshow program that I made that uses exclusively tree-sitter for parsing, syntax highlighting, and running a language server that provides inline annotations.
- This is a snippet of [grezi](https://github.com/StratusFearMe21/grezi-next) source code. Grezi is a plain-text based slideshow program that I made that uses exclusively tree-sitter for parsing, syntax highlighting, and running a language server that provides inline annotations.
![A snippet of grezi source code](images/grezi.jpg#256x368)