Update to refactor branch of cosmic-text
This commit is contained in:
parent
586dd8fc44
commit
93449fdff0
4 changed files with 104 additions and 145 deletions
134
Cargo.lock
generated
134
Cargo.lock
generated
|
|
@ -421,7 +421,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -456,7 +456,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -676,7 +676,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -992,7 +992,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-config"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"atomicwrites",
|
||||
"cosmic-config-derive",
|
||||
|
|
@ -1006,7 +1006,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-config-derive"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
|
|
@ -1016,7 +1016,7 @@ dependencies = [
|
|||
name = "cosmic-edit"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cosmic-text 0.10.0 (git+https://github.com/pop-os/cosmic-text)",
|
||||
"cosmic-text 0.10.0 (git+https://github.com/pop-os/cosmic-text?branch=refactor)",
|
||||
"env_logger",
|
||||
"fork",
|
||||
"grep",
|
||||
|
|
@ -1061,7 +1061,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-text"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/pop-os/cosmic-text#94e6cdefda1bd4481b63602645b3aee451f2ae2f"
|
||||
source = "git+https://github.com/pop-os/cosmic-text?branch=refactor#51ae8aa7aaf9d498092a7dbb6c69060b4c6c21fd"
|
||||
dependencies = [
|
||||
"cosmic_undo_2",
|
||||
"fontdb 0.16.0",
|
||||
|
|
@ -1084,7 +1084,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-theme"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"almost",
|
||||
"cosmic-config",
|
||||
|
|
@ -1140,9 +1140,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.5.8"
|
||||
version = "0.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200"
|
||||
checksum = "14c3242926edf34aec4ac3a77108ad4854bffaa2e4ddc1824124ce59231302d5"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-utils",
|
||||
|
|
@ -1150,9 +1150,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.8.3"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
|
||||
checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-epoch",
|
||||
|
|
@ -1161,22 +1161,21 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.9.15"
|
||||
version = "0.9.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
|
||||
checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-utils",
|
||||
"memoffset 0.9.0",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-queue"
|
||||
version = "0.3.8"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add"
|
||||
checksum = "b9bcf5bdbfdd6030fb4a1c497b5d5fc5921aa2f60d359a17e249c0e6df3de153"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-utils",
|
||||
|
|
@ -1184,9 +1183,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.16"
|
||||
version = "0.8.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
|
||||
checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
]
|
||||
|
|
@ -1230,7 +1229,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1295,7 +1294,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim 0.10.0",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1317,7 +1316,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5"
|
|||
dependencies = [
|
||||
"darling_core 0.20.3",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1378,7 +1377,7 @@ dependencies = [
|
|||
"darling 0.20.3",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1467,7 +1466,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1577,7 +1576,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1904,7 +1903,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2054,7 +2053,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2581,7 +2580,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim 0.10.0",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
|
|
@ -2595,7 +2594,7 @@ dependencies = [
|
|||
"i18n-config",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2624,7 +2623,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"iced_accessibility",
|
||||
"iced_core",
|
||||
|
|
@ -2639,7 +2638,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_accessibility"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"accesskit_winit",
|
||||
|
|
@ -2648,7 +2647,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_core"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"instant",
|
||||
|
|
@ -2664,7 +2663,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_futures"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"iced_core",
|
||||
|
|
@ -2677,7 +2676,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_graphics"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"bytemuck",
|
||||
|
|
@ -2700,7 +2699,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_renderer"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"iced_graphics",
|
||||
"iced_tiny_skia",
|
||||
|
|
@ -2713,7 +2712,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_runtime"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"iced_core",
|
||||
"iced_futures",
|
||||
|
|
@ -2723,7 +2722,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_style"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"iced_core",
|
||||
"once_cell",
|
||||
|
|
@ -2733,7 +2732,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_tiny_skia"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"cosmic-text 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -2751,7 +2750,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_wgpu"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"bytemuck",
|
||||
|
|
@ -2771,7 +2770,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_widget"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"iced_renderer",
|
||||
"iced_runtime",
|
||||
|
|
@ -2785,7 +2784,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_winit"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"iced_graphics",
|
||||
"iced_runtime",
|
||||
|
|
@ -3095,7 +3094,7 @@ checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4"
|
|||
[[package]]
|
||||
name = "libcosmic"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#56965ac2e5841252fca4e628b3dc0db52094faa2"
|
||||
source = "git+https://github.com/pop-os/libcosmic#d53f693a3715fdd79481d75652cbf74286f4f387"
|
||||
dependencies = [
|
||||
"apply",
|
||||
"ashpd",
|
||||
|
|
@ -3881,7 +3880,7 @@ dependencies = [
|
|||
"proc-macro-crate 1.3.1",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4042,7 +4041,7 @@ dependencies = [
|
|||
"proc-macro-error",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4084,7 +4083,7 @@ checksum = "b7db010ec5ff3d4385e4f133916faacd9dad0f6a09394c92d825b3aed310fa0a"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4206,7 +4205,7 @@ dependencies = [
|
|||
"phf_shared",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4241,7 +4240,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4716,7 +4715,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"rust-embed-utils",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
|
|
@ -4929,7 +4928,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4951,7 +4950,7 @@ checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5227,9 +5226,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.40"
|
||||
version = "2.0.41"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13fa70a4ee923979ffb522cacce59d34421ebdea5625e1073c4326ef9d2dd42e"
|
||||
checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -5350,7 +5349,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5582,7 +5581,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5640,28 +5639,29 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
|||
|
||||
[[package]]
|
||||
name = "uds_windows"
|
||||
version = "1.0.2"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d"
|
||||
checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
|
||||
dependencies = [
|
||||
"memoffset 0.9.0",
|
||||
"tempfile",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid"
|
||||
version = "0.9.3"
|
||||
version = "0.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "887622f8e7b723780c5e64b04dcc0c9b8f426ada7cca6790cd3ea3bf0f08037a"
|
||||
checksum = "238722e6d794ed130f91f4ea33e01fcff4f188d92337a21297892521c72df516"
|
||||
dependencies = [
|
||||
"unic-langid-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-impl"
|
||||
version = "0.9.3"
|
||||
version = "0.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5adeb847e35eed4efbffd9fb2e4d078b91ece56e4d6a3c0d2df55b3a1dac07d5"
|
||||
checksum = "4bd55a2063fdea4ef1f8633243a7b0524cbeef1905ae04c31a1c9b9775c55bc6"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"tinystr",
|
||||
|
|
@ -5885,7 +5885,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
|
|
@ -5919,7 +5919,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
|
@ -6841,22 +6841,22 @@ checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697"
|
|||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.7.30"
|
||||
version = "0.7.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7"
|
||||
checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.7.30"
|
||||
version = "0.7.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba"
|
||||
checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.40",
|
||||
"syn 2.0.41",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ rust-embed = "6.3.0"
|
|||
|
||||
[dependencies.cosmic-text]
|
||||
git = "https://github.com/pop-os/cosmic-text"
|
||||
branch = "refactor"
|
||||
features = ["syntect", "vi"]
|
||||
#path = "../cosmic-text"
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ impl LineNumberCache {
|
|||
let attrs = Attrs::new().family(Family::Monospace);
|
||||
let text = format!("{:width$}", key.number, width = key.width);
|
||||
let mut buffer_line = BufferLine::new(text, AttrsList::new(attrs), Shaping::Advanced);
|
||||
buffer_line.set_wrap(Wrap::None);
|
||||
buffer_line.set_align(Some(Align::Left));
|
||||
buffer_line
|
||||
.layout_in_buffer(
|
||||
|
|
|
|||
113
src/text_box.rs
113
src/text_box.rs
|
|
@ -15,9 +15,8 @@ use cosmic::{
|
|||
widget::{self, tree, Widget},
|
||||
Shell,
|
||||
},
|
||||
theme::Theme,
|
||||
};
|
||||
use cosmic_text::{Action, Edit, Metrics, ViEditor};
|
||||
use cosmic_text::{Action, Edit, Metrics, Motion, Scroll, ViEditor};
|
||||
use std::{
|
||||
cell::Cell,
|
||||
cmp,
|
||||
|
|
@ -27,38 +26,6 @@ use std::{
|
|||
|
||||
use crate::{line_number::LineNumberKey, FONT_SYSTEM, LINE_NUMBER_CACHE, SWASH_CACHE};
|
||||
|
||||
pub struct Appearance {
|
||||
pub text_color: Color,
|
||||
}
|
||||
|
||||
impl Appearance {
|
||||
pub fn dark() -> Self {
|
||||
Self {
|
||||
text_color: Color::from_rgb8(0xFF, 0xFF, 0xFF),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn light() -> Self {
|
||||
Self {
|
||||
text_color: Color::from_rgb8(0x00, 0x00, 0x00),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait StyleSheet {
|
||||
fn appearance(&self) -> Appearance;
|
||||
}
|
||||
|
||||
impl StyleSheet for Theme {
|
||||
fn appearance(&self) -> Appearance {
|
||||
if self.theme_type.is_dark() {
|
||||
Appearance::dark()
|
||||
} else {
|
||||
Appearance::light()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TextBox<'a, Message> {
|
||||
editor: &'a Mutex<ViEditor<'static>>,
|
||||
metrics: Metrics,
|
||||
|
|
@ -209,7 +176,6 @@ impl<'a, 'editor, Message, Renderer> Widget<Message, Renderer> for TextBox<'a, M
|
|||
where
|
||||
Message: Clone,
|
||||
Renderer: renderer::Renderer + image::Renderer<Handle = image::Handle>,
|
||||
Renderer::Theme: StyleSheet,
|
||||
{
|
||||
fn tag(&self) -> tree::Tag {
|
||||
tree::Tag::of::<State>()
|
||||
|
|
@ -239,7 +205,7 @@ where
|
|||
//TODO: set size?
|
||||
editor
|
||||
.borrow_with(&mut FONT_SYSTEM.lock().unwrap())
|
||||
.shape_as_needed();
|
||||
.shape_as_needed(true);
|
||||
|
||||
let mut layout_lines = 0;
|
||||
for line in editor.buffer().lines.iter() {
|
||||
|
|
@ -292,7 +258,7 @@ where
|
|||
&self,
|
||||
tree: &widget::Tree,
|
||||
renderer: &mut Renderer,
|
||||
theme: &Renderer::Theme,
|
||||
_theme: &Renderer::Theme,
|
||||
style: &renderer::Style,
|
||||
layout: Layout<'_>,
|
||||
_cursor_position: mouse::Cursor,
|
||||
|
|
@ -302,15 +268,6 @@ where
|
|||
|
||||
let state = tree.state.downcast_ref::<State>();
|
||||
|
||||
let appearance = theme.appearance();
|
||||
|
||||
let text_color = cosmic_text::Color::rgba(
|
||||
cmp::max(0, cmp::min(255, (appearance.text_color.r * 255.0) as i32)) as u8,
|
||||
cmp::max(0, cmp::min(255, (appearance.text_color.g * 255.0) as i32)) as u8,
|
||||
cmp::max(0, cmp::min(255, (appearance.text_color.b * 255.0) as i32)) as u8,
|
||||
cmp::max(0, cmp::min(255, (appearance.text_color.a * 255.0) as i32)) as u8,
|
||||
);
|
||||
|
||||
let mut editor = self.editor.lock().unwrap();
|
||||
|
||||
let view_w = cmp::min(viewport.width as i32, layout.bounds().width as i32)
|
||||
|
|
@ -389,7 +346,7 @@ where
|
|||
);
|
||||
|
||||
// Shape and layout as needed
|
||||
editor.shape_as_needed(&mut font_system);
|
||||
editor.shape_as_needed(&mut font_system, true);
|
||||
|
||||
let mut handle_opt = state.handle_opt.lock().unwrap();
|
||||
if editor.buffer().redraw() || handle_opt.is_none() {
|
||||
|
|
@ -495,23 +452,18 @@ where
|
|||
}
|
||||
|
||||
// Draw editor
|
||||
editor.draw(
|
||||
&mut font_system,
|
||||
&mut swash_cache,
|
||||
text_color,
|
||||
|x, y, w, h, color| {
|
||||
draw_rect(
|
||||
buffer,
|
||||
image_w,
|
||||
image_h,
|
||||
editor_offset_x + x,
|
||||
y,
|
||||
w as i32,
|
||||
h as i32,
|
||||
color,
|
||||
);
|
||||
},
|
||||
);
|
||||
editor.draw(&mut font_system, &mut swash_cache, |x, y, w, h, color| {
|
||||
draw_rect(
|
||||
buffer,
|
||||
image_w,
|
||||
image_h,
|
||||
editor_offset_x + x,
|
||||
y,
|
||||
w as i32,
|
||||
h as i32,
|
||||
color,
|
||||
);
|
||||
});
|
||||
|
||||
// Calculate scrollbar
|
||||
{
|
||||
|
|
@ -618,35 +570,35 @@ where
|
|||
modifiers,
|
||||
}) => match key_code {
|
||||
KeyCode::Left => {
|
||||
editor.action(Action::Left);
|
||||
editor.action(Action::Motion(Motion::Left));
|
||||
status = Status::Captured;
|
||||
}
|
||||
KeyCode::Right => {
|
||||
editor.action(Action::Right);
|
||||
editor.action(Action::Motion(Motion::Right));
|
||||
status = Status::Captured;
|
||||
}
|
||||
KeyCode::Up => {
|
||||
editor.action(Action::Up);
|
||||
editor.action(Action::Motion(Motion::Up));
|
||||
status = Status::Captured;
|
||||
}
|
||||
KeyCode::Down => {
|
||||
editor.action(Action::Down);
|
||||
editor.action(Action::Motion(Motion::Down));
|
||||
status = Status::Captured;
|
||||
}
|
||||
KeyCode::Home => {
|
||||
editor.action(Action::Home);
|
||||
editor.action(Action::Motion(Motion::Home));
|
||||
status = Status::Captured;
|
||||
}
|
||||
KeyCode::End => {
|
||||
editor.action(Action::End);
|
||||
editor.action(Action::Motion(Motion::End));
|
||||
status = Status::Captured;
|
||||
}
|
||||
KeyCode::PageUp => {
|
||||
editor.action(Action::PageUp);
|
||||
editor.action(Action::Motion(Motion::PageUp));
|
||||
status = Status::Captured;
|
||||
}
|
||||
KeyCode::PageDown => {
|
||||
editor.action(Action::PageDown);
|
||||
editor.action(Action::Motion(Motion::PageDown));
|
||||
status = Status::Captured;
|
||||
}
|
||||
KeyCode::Escape => {
|
||||
|
|
@ -735,9 +687,12 @@ where
|
|||
&& x_logical < (scrollbar_rect.x + scrollbar_rect.width)
|
||||
{
|
||||
let mut buffer = editor.buffer_mut();
|
||||
let scroll_offset =
|
||||
let scroll_line =
|
||||
((y / buffer.size().1) * buffer.lines.len() as f32) as i32;
|
||||
buffer.set_scroll(scroll_offset);
|
||||
buffer.set_scroll(Scroll::new(
|
||||
scroll_line.try_into().unwrap_or_default(),
|
||||
0,
|
||||
));
|
||||
state.dragging = Some(Dragging::Scrollbar {
|
||||
start_y: y,
|
||||
start_scroll: editor.buffer().scroll(),
|
||||
|
|
@ -785,7 +740,12 @@ where
|
|||
let scroll_offset = (((y - start_y) / buffer.size().1)
|
||||
* buffer.lines.len() as f32)
|
||||
as i32;
|
||||
buffer.set_scroll(start_scroll + scroll_offset);
|
||||
buffer.set_scroll(Scroll::new(
|
||||
(start_scroll.line as i32 + scroll_offset)
|
||||
.try_into()
|
||||
.unwrap_or_default(),
|
||||
0,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -842,7 +802,6 @@ impl<'a, 'editor, Message, Renderer> From<TextBox<'a, Message>> for Element<'a,
|
|||
where
|
||||
Message: Clone + 'a,
|
||||
Renderer: renderer::Renderer + image::Renderer<Handle = image::Handle>,
|
||||
Renderer::Theme: StyleSheet,
|
||||
{
|
||||
fn from(text_box: TextBox<'a, Message>) -> Self {
|
||||
Self::new(text_box)
|
||||
|
|
@ -857,7 +816,7 @@ enum ClickKind {
|
|||
|
||||
enum Dragging {
|
||||
Buffer,
|
||||
Scrollbar { start_y: f32, start_scroll: i32 },
|
||||
Scrollbar { start_y: f32, start_scroll: Scroll },
|
||||
}
|
||||
|
||||
pub struct State {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue