chore: fix menu anchoring to trigger bounds
This commit is contained in:
Generated
+108
-127
@@ -125,9 +125,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "allocator-api2"
|
||||
version = "0.2.21"
|
||||
version = "0.2.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
||||
checksum = "57b212daf2e827b1ccdd778b7eb48ba433e58cb0e4f27b43cd6b7a608425a014"
|
||||
|
||||
[[package]]
|
||||
name = "alsa"
|
||||
@@ -553,7 +553,7 @@ checksum = "efbd3e1070bbdf4cd88a75264e18e8a26f7cb5c6949eadf0ceb85fb159cf08f8"
|
||||
[[package]]
|
||||
name = "bench_metrics"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"criterion",
|
||||
@@ -871,9 +871,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.11.3"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "02f0e023adb368345ce0ca6cdfc0f24a06554468d0e8503e14a0841de79bfa69"
|
||||
checksum = "95e45cf2980b2d467be49a9ed942c9179b701063a7ca3d037de7ee9bd67f8d66"
|
||||
dependencies = [
|
||||
"find-msvc-tools",
|
||||
"jobserver",
|
||||
@@ -993,18 +993,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.6.9"
|
||||
version = "4.6.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "844c5c0b65be192cb68d570cca1b21a6444431d24e39c084dc0336177015337c"
|
||||
checksum = "50066ca966813ca8957ee15361752f19424a8ff620dbe9c8993d9f99d99b04b3"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.6.7"
|
||||
version = "4.6.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
|
||||
checksum = "a0ed97c96ef4efb3cc84e09fa388df4463e7cc3224ec38d7b1d9e45749333590"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
@@ -1054,7 +1054,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collections"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"gpui_util",
|
||||
"indexmap",
|
||||
@@ -1208,8 +1208,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be17b688510d934ce13f48a2beba700e11583e281e0fda99c22bb256a14eda73"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"fontdb",
|
||||
"harfrust",
|
||||
"fontdb 0.23.0",
|
||||
"harfrust 0.5.2",
|
||||
"linebender_resource_handle",
|
||||
"log",
|
||||
"rangemap",
|
||||
@@ -1275,9 +1275,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.5.5"
|
||||
version = "1.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64"
|
||||
checksum = "fd9ae8fcb3ea71b0b26338b4ffb13006bb175de8fd07921089a906ce7e5e6945"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
@@ -1507,7 +1507,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "derive_refineable"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -1655,7 +1655,7 @@ dependencies = [
|
||||
"cc",
|
||||
"memchr",
|
||||
"rustc_version",
|
||||
"toml 1.2.2+spec-1.1.0",
|
||||
"toml 1.2.3+spec-1.1.0",
|
||||
"vswhom",
|
||||
"winreg",
|
||||
]
|
||||
@@ -1851,9 +1851,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "find-msvc-tools"
|
||||
version = "0.1.15"
|
||||
version = "0.1.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
|
||||
checksum = "3e44f110d1777dc6559a51e7d45083945ded4f1bf3305494350f693b6d20b9c8"
|
||||
|
||||
[[package]]
|
||||
name = "fixedbitset"
|
||||
@@ -1970,6 +1970,19 @@ dependencies = [
|
||||
"ttf-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fontdb"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2660c5e9157bf76d2db1294e4a9feba604ef610819a3b591088d0d8392a3290f"
|
||||
dependencies = [
|
||||
"fontconfig-parser",
|
||||
"log",
|
||||
"memmap2",
|
||||
"slotmap",
|
||||
"tinyvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "foreign-types"
|
||||
version = "0.5.0"
|
||||
@@ -3173,7 +3186,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui"
|
||||
version = "0.2.2"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"anyhow",
|
||||
@@ -3244,7 +3257,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_apple"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-task",
|
||||
@@ -3283,7 +3296,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_ios"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"block2 0.6.2",
|
||||
@@ -3304,7 +3317,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_linux"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"anyhow",
|
||||
@@ -3331,7 +3344,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_macos"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"accesskit_macos",
|
||||
@@ -3356,7 +3369,6 @@ dependencies = [
|
||||
"objc2-core-graphics",
|
||||
"objc2-core-video",
|
||||
"objc2-foundation 0.3.2",
|
||||
"objc2-quartz-core 0.3.2",
|
||||
"objc2-uniform-type-identifiers",
|
||||
"objc2-user-notifications",
|
||||
"parking_lot",
|
||||
@@ -3372,7 +3384,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_macros"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro2",
|
||||
@@ -3383,7 +3395,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_platform"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"console_error_panic_hook",
|
||||
@@ -3398,7 +3410,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_shared_string"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"schemars",
|
||||
"serde",
|
||||
@@ -3408,7 +3420,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_util"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"log",
|
||||
@@ -3418,7 +3430,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_web"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-channel",
|
||||
@@ -3447,7 +3459,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_wgpu"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytemuck",
|
||||
@@ -3473,7 +3485,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gpui_windows"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"accesskit_windows",
|
||||
@@ -3501,9 +3513,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
version = "0.4.20"
|
||||
version = "0.4.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118"
|
||||
checksum = "b634322c4924093fe6a6e05ecbe5717cd3c6014934455f4ae8e5cf14ba3264a8"
|
||||
dependencies = [
|
||||
"atomic-waker",
|
||||
"bytes",
|
||||
@@ -3543,6 +3555,18 @@ dependencies = [
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "harfrust"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"bytemuck",
|
||||
"read-fonts 0.41.0",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hash32"
|
||||
version = "0.3.1"
|
||||
@@ -3739,7 +3763,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "http_client"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -3757,7 +3781,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "http_client_tls"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rustls",
|
||||
@@ -4045,7 +4069,7 @@ dependencies = [
|
||||
"image-webp",
|
||||
"moxcms",
|
||||
"num-traits",
|
||||
"png 0.18.1",
|
||||
"png",
|
||||
"qoi",
|
||||
"ravif",
|
||||
"rayon",
|
||||
@@ -4066,9 +4090,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "imagesize"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09e54e57b4c48b40f7aec75635392b12b3421fa26fe8b4332e63138ed278459c"
|
||||
checksum = "65b27460c2c92b037f3f94c538ed9a3342f3fdf923606781629ccb35f82d042a"
|
||||
|
||||
[[package]]
|
||||
name = "imgref"
|
||||
@@ -4452,9 +4476,9 @@ checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
|
||||
|
||||
[[package]]
|
||||
name = "litrs"
|
||||
version = "1.0.1"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70"
|
||||
checksum = "02b614978e47ce529faee66579f2b2fe19c94aa96d910a6a9a8043b2b02d8175"
|
||||
|
||||
[[package]]
|
||||
name = "lmdb-master-sys"
|
||||
@@ -5172,6 +5196,7 @@ dependencies = [
|
||||
"objc2 0.6.5",
|
||||
"objc2-core-foundation",
|
||||
"objc2-foundation 0.3.2",
|
||||
"objc2-quartz-core 0.3.2",
|
||||
"objc2-uniform-type-identifiers",
|
||||
]
|
||||
|
||||
@@ -5809,19 +5834,6 @@ dependencies = [
|
||||
"plotters-backend",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "png"
|
||||
version = "0.17.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"crc32fast",
|
||||
"fdeflate",
|
||||
"flate2",
|
||||
"miniz_oxide 0.8.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "png"
|
||||
version = "0.18.1"
|
||||
@@ -5949,7 +5961,7 @@ version = "3.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f"
|
||||
dependencies = [
|
||||
"toml_edit 0.25.20+spec-1.1.0",
|
||||
"toml_edit 0.25.21+spec-1.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6249,9 +6261,9 @@ checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08"
|
||||
|
||||
[[package]]
|
||||
name = "rangemap"
|
||||
version = "1.8.0"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a611d15b50743feb4c76b7d03edcb0e64f399c26961e4efe6975bc398be6aa3d"
|
||||
checksum = "f2d43a8c8c74056248124068fde0df374d1ddf9039e747d190f01c36faeaab08"
|
||||
|
||||
[[package]]
|
||||
name = "rav1e"
|
||||
@@ -6405,7 +6417,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "refineable"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"derive_refineable",
|
||||
]
|
||||
@@ -6488,7 +6500,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "reqwest_client"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -6504,10 +6516,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "resvg"
|
||||
version = "0.46.0"
|
||||
version = "0.49.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b563218631706d614e23059436526d005b50ab5f2d506b55a17eb65c5eb83419"
|
||||
checksum = "1572844b6727a1bf842190e9947641a68ac44bed83f50afb4bd1407a2564bee8"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"gif",
|
||||
"image-webp",
|
||||
"log",
|
||||
@@ -6589,7 +6602,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "915e33dccbe7deb2b8a342dc4c517503fe85e0230ddbae40a4fb0220493dad9b"
|
||||
dependencies = [
|
||||
"globset",
|
||||
"sha2 0.11.1",
|
||||
"sha2 0.11.2",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
@@ -6737,24 +6750,6 @@ dependencies = [
|
||||
"wait-timeout",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustybuzz"
|
||||
version = "0.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"bytemuck",
|
||||
"core_maths",
|
||||
"log",
|
||||
"smallvec",
|
||||
"ttf-parser",
|
||||
"unicode-bidi-mirroring",
|
||||
"unicode-ccc",
|
||||
"unicode-properties",
|
||||
"unicode-script",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.23"
|
||||
@@ -6792,7 +6787,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "scheduler"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"async-task",
|
||||
"backtrace",
|
||||
@@ -6846,7 +6841,7 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"pbkdf2 0.13.0",
|
||||
"salsa20",
|
||||
"sha2 0.11.1",
|
||||
"sha2 0.11.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7069,9 +7064,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.11.1"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
|
||||
checksum = "5b0e5c7d67bc53f435386b2130fdc900488c5703770f6d8a4633060e34288a27"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures 0.3.1",
|
||||
@@ -7223,12 +7218,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "simd_helpers"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
|
||||
dependencies = [
|
||||
"quote",
|
||||
]
|
||||
checksum = "f48ea32978b7ad365bd1ecce83827746d5d50dc006a8c85112b7acc3c716e3e7"
|
||||
|
||||
[[package]]
|
||||
name = "simdutf8"
|
||||
@@ -7418,7 +7410,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
||||
[[package]]
|
||||
name = "sum_tree"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"heapless 0.9.4",
|
||||
"rayon",
|
||||
@@ -7682,24 +7674,24 @@ checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
|
||||
|
||||
[[package]]
|
||||
name = "tiny-skia"
|
||||
version = "0.11.4"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab"
|
||||
checksum = "47ffee5eaaf5527f630fb0e356b90ebdec84d5d18d937c5e440350f88c5a91ea"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"arrayvec",
|
||||
"bytemuck",
|
||||
"cfg-if",
|
||||
"log",
|
||||
"png 0.17.16",
|
||||
"png",
|
||||
"tiny-skia-path",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tiny-skia-path"
|
||||
version = "0.11.4"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93"
|
||||
checksum = "edca365c3faccca67d06593c5980fa6c57687de727a03131735bb85f01fdeeb9"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"bytemuck",
|
||||
@@ -7846,9 +7838,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "1.2.2+spec-1.1.0"
|
||||
version = "1.2.3+spec-1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5426cb1b964690d913f6c5c1a1ae0b42f428ec506bb4d452876d7a209c9bca3b"
|
||||
checksum = "26b1f26e9485c1fa43ee89fe76e9f3fb9e2e52bb227f8594b4d687496b83d073"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde_core",
|
||||
@@ -7893,9 +7885,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.25.20+spec-1.1.0"
|
||||
version = "0.25.21+spec-1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e76360e201d6dbd6583e17795ba71a88f47365a9139c8450a7979c32303b8e73"
|
||||
checksum = "88497dab46de5bf343ec66b05c251e48c6213f3e9170c70a70a823f7abe886a4"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"toml_datetime 1.1.3+spec-1.1.0",
|
||||
@@ -7905,9 +7897,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "toml_parser"
|
||||
version = "1.1.6+spec-1.1.0"
|
||||
version = "1.1.7+spec-1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6769c452d71ba30696c6b37770c439a9cc9110f47f7d5cdbeda79840ef5ea31"
|
||||
checksum = "0bb28d6e049a9766c3bd91a8326e6179f5b132dec87906bb97018ef7a2f3431a"
|
||||
dependencies = [
|
||||
"winnow 1.0.5",
|
||||
]
|
||||
@@ -8188,24 +8180,12 @@ version = "0.3.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bidi-mirroring"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bom"
|
||||
version = "2.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217"
|
||||
|
||||
[[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.27"
|
||||
@@ -8294,22 +8274,23 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "usvg"
|
||||
version = "0.46.0"
|
||||
version = "0.49.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e419dff010bb12512b0ae9e3d2f318dfbdf0167fde7eb05465134d4e8756076f"
|
||||
checksum = "d09b73ee83641d390ad7ffd9000f347b16eb128e437675b6ff277ea5c7fcf22c"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"base64 0.23.1",
|
||||
"data-url",
|
||||
"flate2",
|
||||
"fontdb",
|
||||
"fontdb 0.24.0",
|
||||
"harfrust 0.12.0",
|
||||
"imagesize",
|
||||
"kurbo",
|
||||
"log",
|
||||
"pico-args",
|
||||
"roxmltree 0.21.2",
|
||||
"rustybuzz",
|
||||
"simplecss",
|
||||
"siphasher",
|
||||
"skrifa 0.44.0",
|
||||
"strict-num",
|
||||
"svgtypes",
|
||||
"tiny-skia-path",
|
||||
@@ -9403,9 +9384,9 @@ checksum = "ac366ea532fa8ee6a992cec9dea525b1dc284e69702f36c2ab5fbebadc81ec86"
|
||||
|
||||
[[package]]
|
||||
name = "yeslogic-fontconfig-sys"
|
||||
version = "6.0.1"
|
||||
version = "6.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d8b8abf912b9a29ff112e1671c97c33636903d13a69712037190e6805af4f76"
|
||||
checksum = "b2232035104db97d8ded0e24a20d6ba61a0f904e5830d437f411d9a499336224"
|
||||
dependencies = [
|
||||
"dlib",
|
||||
"once_cell",
|
||||
@@ -9651,18 +9632,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524"
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.64"
|
||||
version = "0.8.66"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed43f3060383c64b000f3c630550aebdfa9d3b76d48de32390483dd2cc7e0865"
|
||||
checksum = "cba8a86aee14fc8cc6c208af60854b3d4ab7185a9a369a12c648faa2716ff42a"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.8.64"
|
||||
version = "0.8.66"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a5cbd820fe3e35fb38c83b6dc7e6b1618bc46e0cd10073ae94e8d52dc468d8b9"
|
||||
checksum = "f89bca3b96ceb3cfcb4572790402f977442270d252b9a8504ebc258760c55f94"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -9747,9 +9728,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zlib-rs"
|
||||
version = "0.6.8"
|
||||
version = "0.6.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
|
||||
checksum = "aa76918995d776d9dd34d371030be228d021137449771493d56e29f77e4148ac"
|
||||
|
||||
[[package]]
|
||||
name = "zmij"
|
||||
@@ -9773,7 +9754,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ztracing"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
dependencies = [
|
||||
"tracing",
|
||||
"ztracing_macro",
|
||||
@@ -9782,7 +9763,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ztracing_macro"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/zed-industries/zed#990491f0ea12ceab57a6174436795f5819ed2c67"
|
||||
source = "git+https://github.com/zed-industries/zed#11e4141daab052916566e2f617f128b15b5b7d1c"
|
||||
|
||||
[[package]]
|
||||
name = "zune-core"
|
||||
|
||||
@@ -61,8 +61,8 @@ impl AppRoot {
|
||||
let app = cx.weak_entity();
|
||||
let panels = cx.new(|cx| PanelStack::new("signed-panel", cx));
|
||||
let titlebar = cx.new(|cx| TitlebarView::new(app.clone(), window, cx));
|
||||
|
||||
let empty = cx.new(|_| PlaceholderView::new("Select a repository"));
|
||||
|
||||
panels.update(cx, |panels, cx| {
|
||||
panels.set_empty(empty, None, cx);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use gpui::{
|
||||
Context, IntoElement, ParentElement as _, Render, SharedString, Styled as _, Window, div,
|
||||
};
|
||||
use gpui::{Context, IntoElement, ParentElement as _, Render, SharedString, Styled as _, Window};
|
||||
use ui::empty_state::EmptyState;
|
||||
use ui::layout::v_flex;
|
||||
|
||||
/// A tab that stands in for a screen that is not ported yet.
|
||||
pub struct PlaceholderView {
|
||||
@@ -18,6 +17,10 @@ impl PlaceholderView {
|
||||
|
||||
impl Render for PlaceholderView {
|
||||
fn render(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement {
|
||||
div().size_full().child(EmptyState::new(self.title.clone()))
|
||||
v_flex()
|
||||
.size_full()
|
||||
.items_center()
|
||||
.justify_center()
|
||||
.child(EmptyState::new(self.title.clone()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ where
|
||||
L: Fn(EventId) -> Option<Event>,
|
||||
{
|
||||
let resolver = ThreadResolver::new(lookup);
|
||||
|
||||
let mut groups: HashMap<EventId, Vec<Event>> = HashMap::new();
|
||||
for event in events {
|
||||
if event.pubkey == me {
|
||||
@@ -46,6 +47,7 @@ where
|
||||
.map(|root| {
|
||||
let mut events = groups.remove(&root).unwrap_or_default();
|
||||
let mut own_events = own_groups.remove(&root).unwrap_or_default();
|
||||
|
||||
sort_newest_first(&mut events);
|
||||
sort_newest_first(&mut own_events);
|
||||
|
||||
|
||||
@@ -72,8 +72,8 @@ impl InboxItem {
|
||||
.then_with(|| b.id.to_hex().cmp(&a.id.to_hex()))
|
||||
});
|
||||
rest.truncate(limit.saturating_sub(events.len()));
|
||||
events.extend(rest);
|
||||
|
||||
events.extend(rest);
|
||||
events.sort_by_key(|event| event.created_at);
|
||||
events
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ impl InboxReadState {
|
||||
/// Marks all events from other authors within the window as read.
|
||||
pub fn mark_all_read(&mut self, all: &[Event], me: PublicKey, now: Timestamp) {
|
||||
let cutoff = now - MARK_ALL_WINDOW;
|
||||
|
||||
self.read_before = cutoff;
|
||||
self.read_ids = all
|
||||
.iter()
|
||||
|
||||
@@ -131,9 +131,11 @@ where
|
||||
/// Parses a four-value `e` tag carrying the given marker.
|
||||
fn e_tag_with_marker(&self, tag: &Tag, marker: &str) -> Option<EventId> {
|
||||
let slice = tag.as_slice();
|
||||
|
||||
if tag.kind() != "e" || slice.len() != 4 || slice[3] != marker {
|
||||
return None;
|
||||
}
|
||||
|
||||
tag.content()
|
||||
.and_then(|content| EventId::from_hex(content).ok())
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ impl<'a> PullRequest<'a> {
|
||||
let Some(tip) = pr.current_commit() else {
|
||||
return Vec::new();
|
||||
};
|
||||
|
||||
let Some(last) = patches
|
||||
.iter()
|
||||
.filter(|patch| Self::patch_produces_commit(patch, &tip))
|
||||
@@ -35,10 +36,12 @@ impl<'a> PullRequest<'a> {
|
||||
|
||||
let mut series = vec![last];
|
||||
let mut tail = last;
|
||||
|
||||
loop {
|
||||
let Some(prev_id) = tail.tags.event_ids().next() else {
|
||||
break;
|
||||
};
|
||||
|
||||
let Some(prev) = patches
|
||||
.iter()
|
||||
.find(|patch| patch.id == prev_id && !series.contains(patch))
|
||||
@@ -46,9 +49,11 @@ impl<'a> PullRequest<'a> {
|
||||
else {
|
||||
break;
|
||||
};
|
||||
|
||||
series.push(prev);
|
||||
tail = prev;
|
||||
}
|
||||
|
||||
series.reverse();
|
||||
series
|
||||
}
|
||||
@@ -58,9 +63,11 @@ impl<'a> PullRequest<'a> {
|
||||
let pr = self.0;
|
||||
let patches: Vec<&'a Event> = patches.into_iter().collect();
|
||||
let series = self.patches(patches.iter().copied());
|
||||
|
||||
if series.is_empty() {
|
||||
return pr.content.clone();
|
||||
}
|
||||
|
||||
series
|
||||
.iter()
|
||||
.map(|patch| patch.content.as_str())
|
||||
@@ -89,18 +96,22 @@ impl<'a> PullRequest<'a> {
|
||||
fn forward_series(root: &'a Event, patches: &[&'a Event]) -> Vec<&'a Event> {
|
||||
let mut series = vec![root];
|
||||
let mut tail = root;
|
||||
|
||||
loop {
|
||||
let next = patches
|
||||
.iter()
|
||||
.filter(|patch| !series.contains(patch))
|
||||
.filter(|patch| patch.tags.event_ids().any(|id| id == tail.id))
|
||||
.max_by_key(|patch| patch.created_at);
|
||||
|
||||
let Some(next) = next else {
|
||||
break;
|
||||
};
|
||||
|
||||
series.push(next);
|
||||
tail = next;
|
||||
}
|
||||
|
||||
series
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ impl Upstream {
|
||||
.ok()
|
||||
.filter(|coordinate| coordinate.kind == Kind::GitRepoAnnouncement)
|
||||
.map(RepoAddr::from);
|
||||
|
||||
Self {
|
||||
raw: raw.to_owned(),
|
||||
addr,
|
||||
|
||||
@@ -41,7 +41,7 @@ use crate::components::common::{
|
||||
};
|
||||
use crate::components::empty_state::EmptyState;
|
||||
use crate::components::input::{Input, InputState, InputStateEvent};
|
||||
use crate::components::menu::anchored_overlay;
|
||||
use crate::components::menu::{TriggerAnchor, TriggerBoundsCell, anchored_overlay};
|
||||
use crate::icons::{Icon, IconRole};
|
||||
use crate::theme::{ActiveTheme as _, COMBOBOX_MIN_WIDTH, COMBOBOX_WIDTH, POPUP_MAX_HEIGHT, Size};
|
||||
|
||||
@@ -588,7 +588,13 @@ where
|
||||
let id = self.id.clone();
|
||||
let open = self.highlight.is_some();
|
||||
let weak = cx.weak_entity();
|
||||
let wrapper_bounds: Rc<RefCell<Option<Bounds<Pixels>>>> = Rc::new(RefCell::new(None));
|
||||
|
||||
let wrapper_bounds: TriggerBoundsCell = window
|
||||
.use_keyed_state((id.clone(), "wrapper-bounds"), cx, |_, _| {
|
||||
Rc::new(RefCell::new(None)) as TriggerBoundsCell
|
||||
})
|
||||
.read(cx)
|
||||
.clone();
|
||||
|
||||
div()
|
||||
.id(id.clone())
|
||||
@@ -725,6 +731,9 @@ where
|
||||
|
||||
wrapper.child(anchored_overlay(
|
||||
None,
|
||||
wrapper_bounds
|
||||
.borrow()
|
||||
.map(|bounds| TriggerAnchor::below(window, bounds)),
|
||||
v_flex()
|
||||
.id((id.clone(), "panel"))
|
||||
.debug_selector({
|
||||
|
||||
@@ -27,8 +27,8 @@ use std::time::Duration;
|
||||
|
||||
use gpui::prelude::FluentBuilder;
|
||||
use gpui::{
|
||||
Animation, AnimationExt as _, AnyElement, App, Bounds, DefiniteLength, DispatchPhase, Div,
|
||||
ElementId, Entity, FocusHandle, Hsla, InteractiveElement as _, IntoElement, KeyBinding,
|
||||
Anchor, Animation, AnimationExt as _, AnyElement, App, Bounds, DefiniteLength, DispatchPhase,
|
||||
Div, ElementId, Entity, FocusHandle, Hsla, InteractiveElement as _, IntoElement, KeyBinding,
|
||||
ListAlignment, ListSizingBehavior, ListState, MouseButton, MouseDownEvent, ParentElement as _,
|
||||
Pixels, Point, RenderOnce, Role, SharedString, Stateful, StatefulInteractiveElement as _,
|
||||
StyleRefinement, Styled, Window, actions, anchored, canvas, deferred, div, ease_out_quint,
|
||||
@@ -368,6 +368,7 @@ impl MenuItem {
|
||||
.role(Role::MenuItem)
|
||||
.debug_selector(move || format!("{}-item-{index}", env.debug_prefix))
|
||||
.flex()
|
||||
.w_full()
|
||||
.items_center()
|
||||
.gap_2()
|
||||
.h_8()
|
||||
@@ -608,7 +609,13 @@ impl Styled for Menu {
|
||||
impl RenderOnce for Menu {
|
||||
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||
let (chrome, enter_duration) = MenuChrome::read(cx);
|
||||
let trigger_bounds: TriggerBoundsCell = Rc::new(RefCell::new(None));
|
||||
// Keyed so the panel can anchor to bounds captured by the last paint.
|
||||
let trigger_bounds: TriggerBoundsCell = window
|
||||
.use_keyed_state((self.id.clone(), "trigger-bounds"), cx, |_, _| {
|
||||
Rc::new(RefCell::new(None)) as TriggerBoundsCell
|
||||
})
|
||||
.read(cx)
|
||||
.clone();
|
||||
let on_change = self.on_change.clone();
|
||||
|
||||
let panel_focus = ElementId::from((self.id.clone(), "panel")).focus_handle(window, cx);
|
||||
@@ -706,6 +713,10 @@ impl MenuPanelSpec {
|
||||
return None;
|
||||
}
|
||||
|
||||
let target = self
|
||||
.trigger_bounds
|
||||
.borrow()
|
||||
.map(|bounds| TriggerAnchor::below(window, bounds));
|
||||
let state = MenuPanelState::new(id, window, cx);
|
||||
let panel = state.panel(
|
||||
window,
|
||||
@@ -729,7 +740,7 @@ impl MenuPanelSpec {
|
||||
},
|
||||
);
|
||||
|
||||
Some(anchored_overlay(self.position, panel, None))
|
||||
Some(anchored_overlay(self.position, target, panel, None))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1245,9 +1256,39 @@ pub(crate) fn trigger_toggle(
|
||||
.inset_0()
|
||||
}
|
||||
|
||||
/// Where an overlay hangs off its trigger.
|
||||
#[derive(Clone, Copy)]
|
||||
pub(crate) struct TriggerAnchor {
|
||||
target: Bounds<Pixels>,
|
||||
/// The panel's corner that meets the trigger.
|
||||
anchor: Anchor,
|
||||
/// The trigger's corner the panel hangs from.
|
||||
corner: Anchor,
|
||||
}
|
||||
|
||||
impl TriggerAnchor {
|
||||
/// Hangs the panel below the trigger, aligned to the trigger edge nearer the window's center.
|
||||
pub(crate) fn below(window: &Window, target: Bounds<Pixels>) -> Self {
|
||||
if target.center().x > window.viewport_size().width / 2.0 {
|
||||
Self {
|
||||
target,
|
||||
anchor: Anchor::TopRight,
|
||||
corner: Anchor::BottomRight,
|
||||
}
|
||||
} else {
|
||||
Self {
|
||||
target,
|
||||
anchor: Anchor::TopLeft,
|
||||
corner: Anchor::BottomLeft,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Deferred anchored overlay on OVERLAY_LAYER, optionally fading in.
|
||||
pub(crate) fn anchored_overlay<E: IntoElement>(
|
||||
position: Option<Point<Pixels>>,
|
||||
trigger: Option<TriggerAnchor>,
|
||||
panel: E,
|
||||
fade: Option<(&'static str, Duration)>,
|
||||
) -> AnyElement {
|
||||
@@ -1263,14 +1304,17 @@ pub(crate) fn anchored_overlay<E: IntoElement>(
|
||||
None => div().child(panel).into_any_element(),
|
||||
};
|
||||
|
||||
deferred(
|
||||
anchored()
|
||||
.when_some(position, |anchored, position| anchored.position(position))
|
||||
.offset(point(px(0.), px(4.)))
|
||||
.child(wrapper),
|
||||
)
|
||||
.with_priority(OVERLAY_LAYER)
|
||||
.into_any_element()
|
||||
let overlay = match (position, trigger) {
|
||||
(Some(position), _) => anchored().position(position),
|
||||
(None, Some(trigger)) => anchored()
|
||||
.anchor(trigger.anchor)
|
||||
.attach(trigger.target, trigger.corner),
|
||||
(None, None) => anchored(),
|
||||
};
|
||||
|
||||
deferred(overlay.offset(point(px(0.), px(4.))).child(wrapper))
|
||||
.with_priority(OVERLAY_LAYER)
|
||||
.into_any_element()
|
||||
}
|
||||
|
||||
/// Canvas that grabs focus when `should_grab` holds.
|
||||
|
||||
@@ -32,7 +32,8 @@ use gpui::{
|
||||
use crate::components::common::{ElementIdExt as _, StyledExt as _, v_flex};
|
||||
use crate::components::dialog::Dismiss;
|
||||
use crate::components::menu::{
|
||||
ChangeHandler, TriggerBoundsCell, anchored_overlay, focus_capture, trigger_toggle,
|
||||
ChangeHandler, TriggerAnchor, TriggerBoundsCell, anchored_overlay, focus_capture,
|
||||
trigger_toggle,
|
||||
};
|
||||
use crate::theme::{ActiveTheme as _, POPOVER_MIN_WIDTH};
|
||||
|
||||
@@ -135,7 +136,12 @@ impl RenderOnce for Popover {
|
||||
)
|
||||
};
|
||||
|
||||
let trigger_bounds: TriggerBoundsCell = Rc::new(RefCell::new(None));
|
||||
let trigger_bounds: TriggerBoundsCell = window
|
||||
.use_keyed_state((self.id.clone(), "trigger-bounds"), cx, |_, _| {
|
||||
Rc::new(RefCell::new(None)) as TriggerBoundsCell
|
||||
})
|
||||
.read(cx)
|
||||
.clone();
|
||||
|
||||
// Keyboard focus rides the panel across frames.
|
||||
let focus = self.id.focus_handle(window, cx);
|
||||
@@ -163,8 +169,13 @@ impl RenderOnce for Popover {
|
||||
let label = fallback_label.clone();
|
||||
let content = self.content.map(|content| content(window, cx));
|
||||
|
||||
let target = trigger_bounds
|
||||
.borrow()
|
||||
.map(|bounds| TriggerAnchor::below(window, bounds));
|
||||
|
||||
wrapper.child(anchored_overlay(
|
||||
None,
|
||||
target,
|
||||
v_flex()
|
||||
.id((self.id.clone(), "popover-panel"))
|
||||
.debug_selector(|| "popover-panel".to_string())
|
||||
@@ -180,6 +191,7 @@ impl RenderOnce for Popover {
|
||||
.on_mouse_down_out({
|
||||
let on_change = on_change.clone();
|
||||
let trigger_bounds = trigger_bounds.clone();
|
||||
|
||||
move |event, window, cx| {
|
||||
if trigger_bounds
|
||||
.borrow()
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
//! Signed's icon set: application-defined SVG glyphs.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::time::Duration;
|
||||
|
||||
use gpui::prelude::FluentBuilder as _;
|
||||
use gpui::{
|
||||
AbsoluteLength, App, AssetSource, Div, Hsla, IntoElement, ParentElement as _, Pixels, Rems,
|
||||
RenderOnce, Result, SharedString, Styled as _, TimedTransformation, Transformation, Window,
|
||||
div, rems, svg,
|
||||
AbsoluteLength, App, Div, Hsla, IntoElement, ParentElement as _, Pixels, Rems, RenderOnce,
|
||||
SharedString, Styled as _, TimedTransformation, Transformation, Window, div, rems, svg,
|
||||
};
|
||||
|
||||
const SMALL_ICON_SIZE: Rems = rems(0.875);
|
||||
@@ -16,6 +14,11 @@ const LARGE_ICON_SIZE: Rems = rems(1.25);
|
||||
/// The spin presents at most this rate, rotating a sprite needs no more frames.
|
||||
const SPIN_MAX_FPS: f32 = 60.0;
|
||||
|
||||
#[derive(rust_embed::RustEmbed)]
|
||||
#[folder = "src/icons/assets"]
|
||||
#[exclude = "*.DS_Store"]
|
||||
pub struct Assets;
|
||||
|
||||
/// The semantic glyphs UI components need.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum IconRole {
|
||||
@@ -313,25 +316,3 @@ impl RenderOnce for Icon {
|
||||
Self::render_svg_path(size, Some(color), transformation, rotation_period, path)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(rust_embed::RustEmbed)]
|
||||
#[folder = "src/icons/assets"]
|
||||
#[exclude = "*.DS_Store"]
|
||||
pub struct Assets;
|
||||
|
||||
impl AssetSource for Assets {
|
||||
fn load(&self, path: &str) -> Result<Option<Cow<'static, [u8]>>> {
|
||||
let name = match path.strip_prefix("icons/") {
|
||||
Some(name) => name,
|
||||
None => return Ok(None),
|
||||
};
|
||||
Ok(Assets::get(name).map(|file| file.data))
|
||||
}
|
||||
|
||||
fn list(&self, path: &str) -> gpui::Result<Vec<SharedString>> {
|
||||
Ok(Self::iter()
|
||||
.map(|file| SharedString::from(format!("icons/{file}")))
|
||||
.filter(|file| file.starts_with(path))
|
||||
.collect())
|
||||
}
|
||||
}
|
||||
|
||||
+17
-10
@@ -7,28 +7,32 @@ use ui::theme::{ActiveTheme as _, Theme};
|
||||
|
||||
actions!(signed, [Quit]);
|
||||
|
||||
/// Embeds app artwork and serves it plus the ui crate's icon set.
|
||||
#[derive(rust_embed::RustEmbed)]
|
||||
#[folder = "assets"]
|
||||
#[exclude = "*.DS_Store"]
|
||||
struct BackgroundAssets;
|
||||
|
||||
/// Serves app artwork plus the ui crate's icon set.
|
||||
struct AppAssets;
|
||||
|
||||
impl AssetSource for AppAssets {
|
||||
fn load(&self, path: &str) -> gpui::Result<Option<std::borrow::Cow<'static, [u8]>>> {
|
||||
if path.starts_with("backgrounds/") {
|
||||
return Ok(BackgroundAssets::get(path).map(|file| file.data));
|
||||
if let Some(name) = path.strip_prefix("icons/") {
|
||||
return Ok(ui::Assets::get(name).map(|file| file.data));
|
||||
}
|
||||
ui::Assets.load(path)
|
||||
Ok(Self::get(path).map(|file| file.data))
|
||||
}
|
||||
|
||||
fn list(&self, path: &str) -> gpui::Result<Vec<SharedString>> {
|
||||
let mut files: Vec<SharedString> = BackgroundAssets::iter()
|
||||
let mut files: Vec<SharedString> = ui::Assets::iter()
|
||||
.map(|name| SharedString::from(format!("icons/{name}")))
|
||||
.filter(|file| file.starts_with(path))
|
||||
.map(SharedString::from)
|
||||
.collect();
|
||||
files.extend(ui::Assets.list(path)?);
|
||||
|
||||
files.extend(
|
||||
Self::iter()
|
||||
.filter(|file| file.starts_with(path))
|
||||
.map(SharedString::from),
|
||||
);
|
||||
|
||||
Ok(files)
|
||||
}
|
||||
}
|
||||
@@ -48,7 +52,7 @@ fn main() {
|
||||
]);
|
||||
|
||||
cx.on_action(|_: &Quit, cx| cx.quit());
|
||||
cx.set_app_identity("info.reya.signed", "Signed");
|
||||
cx.set_app_identity("build.signed.signed", "Signed");
|
||||
|
||||
let store = cx.new(|_| SettingsStore::new(paths::settings_file()));
|
||||
SettingsStore::set_global(store.clone(), cx);
|
||||
@@ -100,6 +104,7 @@ fn main() {
|
||||
if let Err(error) = cx.open_window(options, |window, cx| {
|
||||
Theme::sync_from_window(window, cx);
|
||||
Theme::sync_window_rem_size(window, cx);
|
||||
|
||||
window
|
||||
.observe_window_appearance(|window, cx| {
|
||||
Theme::sync_from_window(window, cx);
|
||||
@@ -107,12 +112,14 @@ fn main() {
|
||||
cx.refresh_windows();
|
||||
})
|
||||
.detach();
|
||||
|
||||
signed_app::AppRoot::mount(window, cx)
|
||||
}) {
|
||||
tracing::error!("failed to open window: {error}");
|
||||
cx.quit();
|
||||
return;
|
||||
}
|
||||
|
||||
cx.activate(true);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user