Compare commits

..

23 commits

Author SHA1 Message Date
403d81e282 chore: refresh lockfile after libcosmic theme-v2 rebase
Leyoda 2026 – GPLv3
2026-07-03 14:05:58 +02:00
e8a0a536f1 fix: adapt to cosmic-theme background(transparent) accessor
Leyoda 2026 – GPLv3
2026-07-03 13:10:15 +02:00
8e84caeefa chore: align about license metadata 2026-05-29 07:41:58 +02:00
86feecfcae chore: use local cosmic-text checkout 2026-05-29 07:41:58 +02:00
6d61148ad8 yoda: refresh local dbus binding lock 2026-05-29 07:41:39 +02:00
49d0bcd449 chore: align editor with local files stack 2026-05-29 07:41:18 +02:00
92248d6a31 yoda: relocate local fork paths from ~/Devels to ~/Projets/COSMIC
Mise à jour des path= absolus (window_clipboard, dnd, mime, cosmic-text)
après consolidation des forks cosmic-* sous ~/Projets/COSMIC/.

Leyoda 2026 – GPLv3
2026-05-29 07:40:58 +02:00
7eb103473c yoda wayland-v5: redirect window_clipboard + cosmic-text to local forks
Propagates the [patch] blocks added in cosmic-yoterm v5 to keep the
whole yoda app family on a single Wayland-only stack. Without these,
iced_winit fails to select a window_clipboard version because our
fork exposes a `wayland` feature that upstream doesn't.

- window_clipboard → /home/lionel/Devels/window_clipboard (x11 gated
  behind opt-in feature)
- cosmic-text → /home/lionel/Devels/cosmic-text (EAW terminal_cells +
  upstream PR#503 applied)
2026-05-29 07:40:10 +02:00
628faaf61d yoda: rewire onto libcosmic-yoda + leyoda/cosmic-files paths
- libcosmic git dep replaced by libcosmic-yoda = { path = ../libcosmic }
- cosmic-files git dep replaced by path = ../cosmic-files (leyoda fork)
- winit feature dropped from libcosmic-yoda deps, wayland added
- feature refs libcosmic/* -> libcosmic-yoda/*
- [patch] block for pop-os/libcosmic removed

Installed at /usr/bin/cosmic-edit. Pre-yoda binary kept as
/usr/bin/cosmic-edit.pre-yoda-fork.
2026-05-29 07:39:34 +02:00
Votre Nom
7537f7f437 Cargo.toml: patch libcosmic via local path for dev builds
Activates the [patch.'https://github.com/pop-os/libcosmic'] override
pointing at ../libcosmic, enabling local development against a
patched libcosmic checkout (e.g. to pick up
WindowControlsPosition / macOS-style window controls).

This branch is intentionally dev-local: do NOT merge upstream.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-29 07:34:48 +02:00
Hojjat Abdollahi
a56297f855
fix(libcosmic): fix item highlight in wayland context menu 2026-05-28 23:11:52 +02:00
Ashley Wulber
2db1c80078 fix: update cosmic-files 2026-05-26 13:48:13 -06:00
Jeremy Soller
4edfc6aa8e
Merge pull request #573 from pop-os/epoch-update
Epoch 1.0.14 version update
2026-05-26 13:07:40 -06:00
Ashley Wulber
12cee06253 fix: libcosmic updates 2026-05-26 14:15:00 -04:00
Jeremy Soller
4b231042e7
Merge pull request #572 from weblate/weblate-pop-os-cosmic-edit
i18n: translation update from Hosted Weblate
2026-05-26 09:12:36 -06:00
Jeremy Soller
aadff7540e Epoch 1.0.14 version update
Generated by cosmic-epoch scripts/version-update.sh
2026-05-26 08:30:47 -06:00
Hosted Weblate
2efddc1833
i18n: translation updates from weblate
Co-authored-by: therealmate <hellogaming91@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/hu/
Translation: Pop OS/COSMIC Edit
2026-05-26 01:11:34 +02:00
Jeremy Soller
7bbe82ec3f Epoch 1.0.13 version update
Generated by cosmic-epoch scripts/version-update.sh
2026-05-12 12:09:43 -06:00
Jeremy Soller
448da77cd5
Merge pull request #565 from weblate/weblate-pop-os-cosmic-edit
i18n: translation update from Hosted Weblate
2026-05-12 09:41:41 -06:00
Levi Portenier
d123bc0a51
Merge pull request #566 from pop-os/epoch-update
Epoch 1.0.12 version update
2026-05-05 14:57:43 -06:00
Jeremy Soller
2a60283f14 Epoch 1.0.12 version update
Generated by cosmic-epoch scripts/version-update.sh
2026-05-05 13:21:26 -06:00
Hosted Weblate
7de9ba756c
i18n: translation updates from weblate
Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Co-authored-by: BoneNI <bounkirdni@gmail.com>
Co-authored-by: Feike Donia <feikedonia@proton.me>
Co-authored-by: Filippos Papadopoulos <filippospap.developer@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jim Spentzos <jimspentzos2000@gmail.com>
Co-authored-by: Konstantinos <kostas.lampropoulos94@gmail.com>
Co-authored-by: Nara Díaz Viñolas <nara.diaz.vinolas@gmail.com>
Co-authored-by: Tadas Misiūnas <tadujo@gmail.com>
Co-authored-by: Vilius Paliokas <viliuspaliokas@gmail.com>
Co-authored-by: Марко М. Костић <marko.m.kostic@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/ca/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/el/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/lt/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-edit/sr/
Translation: Pop OS/COSMIC Edit
2026-05-03 01:52:13 +02:00
KENZ
4c53d607f7
feat(ime): minimal IME support for the text_box widget (#539)
* Support CJK input method

* Fix the input method window occasionally jumps around

Use the previous caret(text cursor) position to place the input method
window when the position is not available

* refactor: Omit calling request_input_method() if doesn't focus

- iced UserInterface.update() starts with InputMethod::Disabled state,
  and merges any input_method_request() which is InputMethod::Enabled in
  widgets tree traversal.
- We don't enable the input method feature if the widget doesn't have
  focus, we can safely omit request_input_method() call itself.
2026-04-27 16:05:22 -06:00
12 changed files with 458 additions and 220 deletions

316
Cargo.lock generated
View file

@ -109,9 +109,9 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
name = "aes"
version = "0.9.0"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66bd29a732b644c0431c6140f370d097879203d79b80c94a6747ba0872adaef8"
checksum = "f1fc76eaeac4c9164506c466d4ffdd8ec9d0c5bf57ee97177c4d8eceb3a0e138"
dependencies = [
"cipher",
"cpubits",
@ -179,6 +179,12 @@ dependencies = [
"alloc-no-stdlib",
]
[[package]]
name = "allocator-api2"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
[[package]]
name = "almost"
version = "0.2.0"
@ -772,9 +778,9 @@ dependencies = [
[[package]]
name = "brotli-decompressor"
version = "5.0.0"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
checksum = "5962523e1b92ce1b5e793d9169b9943eece10d39f62550bc04bb605d75b94924"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@ -1003,9 +1009,9 @@ dependencies = [
[[package]]
name = "cmov"
version = "0.5.3"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746"
checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a"
[[package]]
name = "cocoa"
@ -1345,7 +1351,7 @@ dependencies = [
[[package]]
name = "cosmic-edit"
version = "1.0.11"
version = "1.0.14"
dependencies = [
"cosmic-files",
"cosmic-syntax-theme",
@ -1376,7 +1382,7 @@ dependencies = [
[[package]]
name = "cosmic-files"
version = "1.0.13"
version = "1.0.14"
dependencies = [
"anyhow",
"atomic_float",
@ -1512,6 +1518,7 @@ dependencies = [
"cosmic-config",
"csscolorparser",
"dirs 6.0.0",
"hex_color",
"palette",
"ron",
"serde",
@ -1856,9 +1863,9 @@ dependencies = [
[[package]]
name = "displaydoc"
version = "0.2.5"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f"
dependencies = [
"proc-macro2",
"quote",
@ -2682,35 +2689,18 @@ dependencies = [
"system-deps",
]
[[package]]
name = "gpu-alloc"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171"
dependencies = [
"bitflags 2.11.1",
"gpu-alloc-types",
]
[[package]]
name = "gpu-alloc-types"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4"
dependencies = [
"bitflags 2.11.1",
]
[[package]]
name = "gpu-allocator"
version = "0.27.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd"
checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795"
dependencies = [
"ash",
"hashbrown 0.16.1",
"log",
"presser",
"thiserror 1.0.69",
"windows 0.58.0",
"thiserror 2.0.18",
"windows 0.61.3",
]
[[package]]
@ -2882,6 +2872,8 @@ version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
dependencies = [
"allocator-api2",
"equivalent",
"foldhash 0.2.0",
]
@ -2915,6 +2907,17 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "hex_color"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d37f101bf4c633f7ca2e4b5e136050314503dd198e78e325ea602c327c484ef0"
dependencies = [
"arrayvec",
"rand 0.8.6",
"serde",
]
[[package]]
name = "hexf-parse"
version = "0.2.1"
@ -3077,6 +3080,7 @@ dependencies = [
"serde",
"smol_str",
"thiserror 2.0.18",
"unicode-segmentation",
"web-time",
"window_clipboard",
]
@ -3869,9 +3873,9 @@ checksum = "2ceaf4c6c48465bead8cb6a0b7c4ee0c86ecbb31239032b9c66ab9a08d2f3ee1"
[[package]]
name = "jiff"
version = "0.2.25"
version = "0.2.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6835eea34fb6321b9b3aa7b685c2b433948c09447e389dc017fdf687d5d11e65"
checksum = "4603d3033e49e2b0e31229fcab20a5d40089c607d975cd9c80551dc69eed9102"
dependencies = [
"jiff-static",
"jiff-tzdb-platform",
@ -3879,7 +3883,7 @@ dependencies = [
"portable-atomic",
"portable-atomic-util",
"serde_core",
"windows-sys 0.61.2",
"windows-link 0.2.1",
]
[[package]]
@ -3895,9 +3899,9 @@ dependencies = [
[[package]]
name = "jiff-static"
version = "0.2.25"
version = "0.2.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c22e04db9c58f5136eb1757f3d5c49a7b187f49e52185228cbd2f5acdfcc08c"
checksum = "782d32378dddf207193ac91cefb848ad41abb58195c95168e1291227a0832b47"
dependencies = [
"proc-macro2",
"quote",
@ -4309,6 +4313,7 @@ dependencies = [
"cosmic-theme",
"css-color",
"derive_setters",
"enumflags2",
"float-cmp 0.10.0",
"futures",
"i18n-embed",
@ -4368,14 +4373,14 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
[[package]]
name = "libredox"
version = "0.1.16"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c"
checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3"
dependencies = [
"bitflags 2.11.1",
"libc",
"plain",
"redox_syscall 0.7.5",
"redox_syscall 0.8.0",
]
[[package]]
@ -4568,9 +4573,9 @@ dependencies = [
[[package]]
name = "memchr"
version = "2.8.0"
version = "2.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8"
[[package]]
name = "memmap2"
@ -4601,9 +4606,9 @@ dependencies = [
[[package]]
name = "metal"
version = "0.32.0"
version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605"
checksum = "c7047791b5bc903b8cd963014b355f71dc9864a9a0b727057676c1dcae5cbc15"
dependencies = [
"bitflags 2.11.1",
"block",
@ -4655,9 +4660,9 @@ dependencies = [
[[package]]
name = "mio"
version = "1.2.0"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda"
dependencies = [
"libc",
"log",
@ -4692,9 +4697,9 @@ checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af"
[[package]]
name = "naga"
version = "27.0.3"
version = "28.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8"
checksum = "618f667225063219ddfc61251087db8a9aec3c3f0950c916b614e403486f1135"
dependencies = [
"arrayvec",
"bit-set",
@ -5694,7 +5699,7 @@ version = "3.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f"
dependencies = [
"toml_edit 0.25.11+spec-1.1.0",
"toml_edit 0.25.12+spec-1.1.0",
]
[[package]]
@ -5852,6 +5857,8 @@ version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a"
dependencies = [
"libc",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
]
@ -5861,10 +5868,20 @@ version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea"
dependencies = [
"rand_chacha",
"rand_chacha 0.9.0",
"rand_core 0.9.5",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core 0.6.4",
]
[[package]]
name = "rand_chacha"
version = "0.9.0"
@ -5880,6 +5897,9 @@ name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom 0.2.17",
]
[[package]]
name = "rand_core"
@ -5930,7 +5950,7 @@ dependencies = [
"paste",
"profiling",
"rand 0.9.4",
"rand_chacha",
"rand_chacha 0.9.0",
"simd_helpers",
"thiserror 2.0.18",
"v_frame",
@ -6005,6 +6025,16 @@ dependencies = [
"url",
]
[[package]]
name = "redox_event"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c07d0d6d291e3a951bd847b1cd4af32fc6243d64116cf7702838c02797688b7"
dependencies = [
"bitflags 2.11.1",
"libredox",
]
[[package]]
name = "redox_syscall"
version = "0.5.18"
@ -6016,9 +6046,9 @@ dependencies = [
[[package]]
name = "redox_syscall"
version = "0.7.5"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4666a1a60d8412eab19d94f6d13dcc9cea0a5ef4fdf6a5db306537413c661b1b"
checksum = "7c7591fa2c6b601dfcfe5f043f65a1c39fcdf50efefcd7f1572e538c1f4b398d"
dependencies = [
"bitflags 2.11.1",
]
@ -6585,9 +6615,9 @@ dependencies = [
[[package]]
name = "socket2"
version = "0.6.3"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51"
dependencies = [
"libc",
"windows-sys 0.61.2",
@ -7089,9 +7119,9 @@ dependencies = [
[[package]]
name = "toml_edit"
version = "0.25.11+spec-1.1.0"
version = "0.25.12+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b"
checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7"
dependencies = [
"indexmap",
"toml_datetime 1.1.1+spec-1.1.0",
@ -7792,12 +7822,13 @@ checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88"
[[package]]
name = "wgpu"
version = "27.0.1"
version = "28.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77"
checksum = "f9cb534d5ffd109c7d1135f34cdae29e60eab94855a625dcfe1705f8bc7ad79f"
dependencies = [
"arrayvec",
"bitflags 2.11.1",
"bytemuck",
"cfg-if",
"cfg_aliases",
"document-features",
@ -7821,9 +7852,9 @@ dependencies = [
[[package]]
name = "wgpu-core"
version = "27.0.3"
version = "28.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7"
checksum = "d23f4642f53f666adcfd2d3218ab174d1e6681101aef18696b90cbe64d1c10f9"
dependencies = [
"arrayvec",
"bit-set",
@ -7853,36 +7884,36 @@ dependencies = [
[[package]]
name = "wgpu-core-deps-apple"
version = "27.0.0"
version = "28.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233"
checksum = "87b7b696b918f337c486bf93142454080a32a37832ba8a31e4f48221890047da"
dependencies = [
"wgpu-hal",
]
[[package]]
name = "wgpu-core-deps-emscripten"
version = "27.0.0"
version = "28.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5"
checksum = "34b251c331f84feac147de3c4aa3aa45112622a95dd7ee1b74384fa0458dbd79"
dependencies = [
"wgpu-hal",
]
[[package]]
name = "wgpu-core-deps-windows-linux-android"
version = "27.0.0"
version = "28.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3"
checksum = "68ca976e72b2c9964eb243e281f6ce7f14a514e409920920dcda12ae40febaae"
dependencies = [
"wgpu-hal",
]
[[package]]
name = "wgpu-hal"
version = "27.0.4"
version = "28.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce"
checksum = "44d6cb474beb218824dcc9e1ce679d973f719262789bfb27407da560cac20eeb"
dependencies = [
"android_system_properties",
"arrayvec",
@ -7896,7 +7927,6 @@ dependencies = [
"core-graphics-types 0.2.0",
"glow",
"glutin_wgl_sys",
"gpu-alloc",
"gpu-allocator",
"gpu-descriptor",
"hashbrown 0.16.1",
@ -7923,21 +7953,20 @@ dependencies = [
"wasm-bindgen",
"web-sys",
"wgpu-types",
"windows 0.58.0",
"windows-core 0.58.0",
"windows 0.62.2",
"windows-core 0.62.2",
]
[[package]]
name = "wgpu-types"
version = "27.0.1"
version = "28.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb"
checksum = "e18308757e594ed2cd27dddbb16a139c42a683819d32a2e0b1b0167552f5840c"
dependencies = [
"bitflags 2.11.1",
"bytemuck",
"js-sys",
"log",
"thiserror 2.0.18",
"web-sys",
]
@ -8001,27 +8030,29 @@ dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows"
version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
dependencies = [
"windows-core 0.58.0",
"windows-targets 0.52.6",
]
[[package]]
name = "windows"
version = "0.61.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
dependencies = [
"windows-collections",
"windows-collections 0.2.0",
"windows-core 0.61.2",
"windows-future",
"windows-future 0.2.1",
"windows-link 0.1.3",
"windows-numerics",
"windows-numerics 0.2.0",
]
[[package]]
name = "windows"
version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
dependencies = [
"windows-collections 0.3.2",
"windows-core 0.62.2",
"windows-future 0.3.2",
"windows-numerics 0.3.1",
]
[[package]]
@ -8033,6 +8064,15 @@ dependencies = [
"windows-core 0.61.2",
]
[[package]]
name = "windows-collections"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
dependencies = [
"windows-core 0.62.2",
]
[[package]]
name = "windows-core"
version = "0.56.0"
@ -8045,19 +8085,6 @@ dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
dependencies = [
"windows-implement 0.58.0",
"windows-interface 0.58.0",
"windows-result 0.2.0",
"windows-strings 0.1.0",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.61.2"
@ -8092,7 +8119,18 @@ checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
dependencies = [
"windows-core 0.61.2",
"windows-link 0.1.3",
"windows-threading",
"windows-threading 0.1.0",
]
[[package]]
name = "windows-future"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
dependencies = [
"windows-core 0.62.2",
"windows-link 0.2.1",
"windows-threading 0.2.1",
]
[[package]]
@ -8106,17 +8144,6 @@ dependencies = [
"syn 2.0.117",
]
[[package]]
name = "windows-implement"
version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.117",
]
[[package]]
name = "windows-implement"
version = "0.60.2"
@ -8139,17 +8166,6 @@ dependencies = [
"syn 2.0.117",
]
[[package]]
name = "windows-interface"
version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.117",
]
[[package]]
name = "windows-interface"
version = "0.59.3"
@ -8184,19 +8200,20 @@ dependencies = [
]
[[package]]
name = "windows-result"
version = "0.1.2"
name = "windows-numerics"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
dependencies = [
"windows-targets 0.52.6",
"windows-core 0.62.2",
"windows-link 0.2.1",
]
[[package]]
name = "windows-result"
version = "0.2.0"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
dependencies = [
"windows-targets 0.52.6",
]
@ -8219,16 +8236,6 @@ dependencies = [
"windows-link 0.2.1",
]
[[package]]
name = "windows-strings"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
dependencies = [
"windows-result 0.2.0",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-strings"
version = "0.4.2"
@ -8349,6 +8356,15 @@ dependencies = [
"windows-link 0.1.3",
]
[[package]]
name = "windows-threading"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
dependencies = [
"windows-link 0.2.1",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
@ -8581,7 +8597,7 @@ dependencies = [
"libredox",
"orbclient",
"raw-window-handle",
"redox_syscall 0.7.5",
"redox_event",
"smol_str",
"tracing",
"winit-core",
@ -9067,18 +9083,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524"
[[package]]
name = "zerocopy"
version = "0.8.48"
version = "0.8.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
checksum = "bce33a6288fa3f072a8c2c7d0f2fdbb90e28298f0135c1f99b96c3db2efcc60b"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.48"
version = "0.8.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
checksum = "8fd425244944f4ab65ccff928e7323354c5a018c75838362fdce749dfad2ee1e"
dependencies = [
"proc-macro2",
"quote",
@ -9306,11 +9322,11 @@ dependencies = [
"winnow 1.0.3",
]
[[patch.unused]]
name = "winit-x11"
version = "0.31.0-beta.2"
[[patch.unused]]
name = "onig"
version = "7.0.0"
source = "git+https://github.com/rust-onig/rust-onig.git?branch=main#73e63eb3eea6d93d24a4aadf7fea580287750c7d"
[[patch.unused]]
name = "winit-x11"
version = "0.31.0-beta.2"

View file

@ -1,10 +1,10 @@
[package]
name = "cosmic-edit"
version = "1.0.11"
version = "1.0.14"
authors = ["Jeremy Soller <jeremy@system76.com>"]
edition = "2024"
license = "GPL-3.0-only"
rust-version = "1.90"
rust-version = "1.93"
[dependencies]
dirs = "6"

18
debian/changelog vendored
View file

@ -1,3 +1,21 @@
cosmic-edit (1.0.14) noble; urgency=medium
* Epoch 1.0.14 version update
-- Jeremy Soller <jeremy@system76.com> Tue, 26 May 2026 08:30:39 -0600
cosmic-edit (1.0.13) noble; urgency=medium
* Epoch 1.0.13 version update
-- Jeremy Soller <jeremy@system76.com> Tue, 12 May 2026 09:37:51 -0600
cosmic-edit (1.0.12) noble; urgency=medium
* Epoch 1.0.12 version update
-- Jeremy Soller <jeremy@system76.com> Tue, 05 May 2026 10:23:41 -0600
cosmic-edit (1.0.11) noble; urgency=medium
* Epoch 1.0.11 version update

View file

@ -0,0 +1,3 @@
cancel = Cancel·lar
quit = Surt
settings = Configuració

View file

@ -7,7 +7,7 @@ open-project = Άνοιγμα έργου
## Document statistics
document-statistics = Στατιστικά εγγράφου
word-count = Λέξεις
word-count = Πλήθος λέξεων
character-count = Χαρακτήρες
character-count-no-spaces = Χαρακτήρες (χωρίς κενά)
line-count = Γραμμές
@ -20,13 +20,13 @@ settings = Ρυθμίσεις
appearance = Εμφάνιση
theme = Θέμα
default-font = Γραμματοσειρά
default-font-size = Μέγεθος γραμματοσειράς
default-font = Προεπιλεγμένη γραμματοσειρά
default-font-size = Προεπιλεγμένο μέγεθος γραμματοσειράς
### Keyboard shortcuts
keyboard-shortcuts = Συντομεύσεις πλήκτρων
enable-vim-bindings = Ενεργοποίηση πλήκτρων vim
keyboard-shortcuts = Συντομεύσεις πληκτρολογίου
enable-vim-bindings = Ενεργοποίηση συντομεύσεων Vim
# Menu
@ -37,7 +37,7 @@ file = Αρχείο
new-file = Νέο αρχείο
new-window = Νέο παράθυρο
open-file = Άνοιγμα αρχείου...
todo = TODO
todo = Λίστα εργασιών
save = Αποθήκευση
save-as = Αποθήκευση ως...
revert-all-changes = Αναίρεση όλων των αλλαγών
@ -62,23 +62,60 @@ spell-check = Έλεγχος ορθογραφίας...
## View
view = Προβολή
indentation = Εσοχές
indentation = Εσοχές κειμένου
### Indentation
automatic-indentation = Αυτόματη εισαγωγή εσοχών
tab-width = Πλάτος Tabs: { $tab_width }
convert-indentation-to-spaces = Μετατροπή εσοχών σε spaces
convert-indentation-to-tabs = Μετατροπή εσοχών σε tabs
word-wrap = Περιτύλιξη λέξεων
tab-width = Πλάτος στηλοθέτη: { $tab_width }
convert-indentation-to-spaces = Μετατροπή εσοχών σε κενά
convert-indentation-to-tabs = Μετατροπή εσοχών σε στηλοθέτες
word-wrap = Αναδίπλωση λέξεων
show-line-numbers = Εμφάνιση αριθμού γραμμών
highlight-current-line = Υπογράμμιση τρέχουσας γραμμής
syntax-highlighting = Υπογράμμιση συντακτικού...
highlight-current-line = Επισήμανση τρέχουσας γραμμής
syntax-highlighting = Επισήμανση συντακτικού...
menu-settings = Ρυθμίσεις...
menu-keyboard-shortcuts = Συντομεύσεις πλήκτρων...
menu-about = Σχετικά με τον επεξεργαστή κειμένου COSMIC...
menu-keyboard-shortcuts = Συντομεύσεις πληκτρολογίου...
menu-about = Σχετικά με την Επεξεργασία κειμένου COSMIC...
cancel = Ακύρωση
repository = Αποθετήριο
support = Υποστήριξη
dark = Σκοτεινό
light = Φωτεινό
dark = Σκουρόχρωμο
light = Ανοιχτόχρωμο
close-file = Κλείσιμο αρχείου
cosmic-text-editor = Επεξεργασία κειμένου COSMIC
find-placeholder = Εύρεση...
replace-placeholder = Αντικατάσταση...
match-desktop = Συμφωνία με την επιφάνεια εργασίας
discard = Απόρριψη αλλαγών
select-all = Επιλογή όλων
comment = Πρόγραμμα επεξεργασίας κειμένου για το περιβάλλον επιφάνειας εργασίας COSMIC
git-management = Διαχείριση Git
save-all = Αποθήκευση όλων
find-previous = Εύρεση προηγούμενου
find-next = Εύρεση επόμενου
replace-all = Αντικατάσταση όλων
close-project = Κλείσιμο έργου
menu-git-management = Διαχείριση Git...
find-in-project = Εύρεση στο έργο...
default-size = Προεπιλεγμένο μέγεθος
zoom-out = Σμίκρυνση
zoom-in = Μεγέθυνση
project-search = Αναζήτηση έργων
prompt-save-changes-title = Αποθήκευση των αλλαγών πριν από το κλείσιμο;
open-recent-file = Άνοιγμα πρόσφατου αρχείου
menu-open-project = Άνοιγμα έργου...
open-recent-project = Άνοιγμα πρόσφατου έργου
git-management-loading = Φόρτωση διαχείρισης Git...
prompt-unsaved-changes = Υπάρχουν μη αποθηκευμένες αλλαγές. Εάν συνεχίσετε χωρίς να κάνετε αποθήκευση, αυτές οι αλλαγές θα χαθούν.
case-sensitive = Διάκριση πεζών-κεφαλαίων
stage = Προετοιμασία
staged-changes = Προετοιμασμένες αλλαγές
unstage = Ακύρωση προετοιμασίας
unstaged-changes = Απροετοίμαστες αλλαγές
syntax-dark = Σκουρόχρωμο συντακτικό
syntax-light = Ανοιχτόχρωμο συντακτικό
default-zoom-step = Βήματα ζουμ
git-management-description = Η διαχείριση Git είναι ένα εργαλείο για προγραμματιστές που χρησιμοποιείται για λειτουργίες ελέγχου εκδόσεων.
use-regex = Χρήση κανονικών εκφράσεων
wrap-around = Αναδίπλωση

View file

@ -25,8 +25,8 @@ git-management-description = A Git-kezelő egy verziókezeléssel kapcsolatos fe
git-management-loading = Git-kezelő betöltése…
stage = Előkészítés
staged-changes = Előkészített változtatások
unstage = Változtatások visszavonása előkészítésből
unstaged-changes = Előkészítésből visszavont változtatások
unstage = Előkészítés visszavonása
unstaged-changes = Nem előkészített változtatások
## Project search
@ -35,7 +35,7 @@ project-search = Projektkereső
## Prompt save changes
prompt-save-changes-title = Mented a változtatásokat bezárás előtt?
prompt-unsaved-changes = Vannak nem mentett változtatások. Ha nem mentesz, ezek el fognak veszni!
prompt-unsaved-changes = Vannak nem mentett változtatások. Ha nem mentesz, ezek el fognak veszni.
cancel = Mégse
discard = Változtatások elvetése
save-all = Összes mentése
@ -68,7 +68,7 @@ find-next = Következő találat
replace-placeholder = Csere…
replace = Csere
replace-all = Összes lecserélése
case-sensitive = Kis- és nagybetű érzékenység
case-sensitive = Kis- és nagybetű-érzékenység
use-regex = Regex használata
wrap-around = Körbefutás
@ -100,7 +100,7 @@ quit = Kilépés
edit = Szerkesztés
undo = Visszavonás
redo = Visszaállítás
redo = Újra
cut = Kivágás
copy = Másolás
paste = Beillesztés

0
i18n/lo/cosmic_edit.ftl Normal file
View file

View file

@ -14,7 +14,7 @@ line-count = Eilučių skaičius
## Settings
settings = Nustatymai
settings = Nuostatos
## Appearance
@ -25,7 +25,7 @@ default-font-size = Numatytas šrifto dydis
### Keyboard shortcuts
keyboard-shortcuts = Klaviatūros greitieji klavišai
keyboard-shortcuts = Spartieji klavišai
enable-vim-bindings = Naudoti Vim sąsajas
# Menu
@ -36,14 +36,14 @@ enable-vim-bindings = Naudoti Vim sąsajas
file = Failas
new-file = Naujas failas
new-window = Naujas langas
open-file = Atidaryti failą...
open-file = Atverti failą...
todo = TODO
save = Išsaugoti
save-as = Išsaugoti kaip...
revert-all-changes = Atstatyti visus pakeitimus
revert-all-changes = Atšaukti visus keitimus
menu-document-statistics = Apie dokumentą...
document-type = Dokumento tipas...
encoding = Kodavimas...
encoding = Koduotė...
print = Spausdinti
quit = Išeiti
@ -51,13 +51,13 @@ quit = Išeiti
edit = Redaguoti
undo = Anuliuoti
redo = Atkurti
redo = Grąžinti
cut = Iškirpti
copy = Kopijuoti
paste = Įklijuoti
find = Surasti
replace = Pakeisti
spell-check = Rašybos tikrinimas...
paste = Įti
find = Rasti
replace = Keisti
spell-check = Tikrinti rašybą...
## View
@ -70,50 +70,51 @@ automatic-indentation = Automatinė įtrauka
tab-width = Tabuliavimo žingsnio plotis: { $tab_width }
convert-indentation-to-spaces = Pakeisti įtrauką tarpais
convert-indentation-to-tabs = Pakeisti įtrauką tabuliavimo žingsniu
word-wrap = Žodžių perkėlimas
word-wrap = Žodžių kėlimas
show-line-numbers = Rodyti eilučių numerius
highlight-current-line = Paryškinti dabartinę eilutę
syntax-highlighting = Sintaksės tikrinimas...
menu-settings = Nustatymai...
menu-keyboard-shortcuts = Klaviatūros greitieji klavišai...
menu-about = Apie COSMIC Text Editor...
menu-settings = Nuostatos...
menu-keyboard-shortcuts = Spartieji klavišai...
menu-about = Apie COSMIC Rašyklę...
cancel = Atšaukti
repository = Saugykla
support = Palaikymas
cosmic-text-editor = COSMIC Text Editor
cosmic-text-editor = COSMIC Rašyklė
git-management = Git valdymas
git-management-description = Git valdymas - kūrėjų įrankis, naudojamas versijų kontrolės sistemos operacijoms įvykdyti.
git-management-loading = Kraunamas Git valdymas...
save-all = Išsaugoti viską
syntax-dark = Tamsi sintaksė
default-zoom-step = Priartinimo žingsniai
open-recent-file = Atidaryti pastararąjį failą
default-zoom-step = Artinimo žingsniai
open-recent-file = Atverti pastarąjį failą
close-file = Uždaryti failą
menu-open-project = Atidaryti projektą...
open-recent-project = Atidaryti pastarąjį projektą
close-project = Uždaryti projektą
select-all = Pažymėti viską
select-all = Žymėti viską
find-in-project = Ieškoti projekte...
zoom-in = Priartinti
zoom-in = Artinti
default-size = Numatytas dydis
zoom-out = Nutolinti
zoom-out = Tolinti
menu-git-management = Git valdymas...
staged-changes = Patvirtinti pokyčiai
unstaged-changes = Nepatvirtinti pokyčiai
staged-changes = Patvirtinti keitimai
unstaged-changes = Nepatvirtinti keitimai
prompt-save-changes-title = Išsaugoti pakeitimus prieš uždarant?
prompt-unsaved-changes = Yra neišsaugotų pakeitimų. Jeigu tęsite neišsaugojus, jūsų pakeitimai bus prarasti.
discard = Pašalinti pakeitimus
prompt-unsaved-changes = Yra neišsaugotų keitimų. Jei tęsite neišsaugoję, šie keitimai dings.
discard = Pašalinti keitimus
match-desktop = Pagal darbalaukio temą
find-placeholder = Surasti...
find-previous = Atgalinis ieškojimas
find-next = Ieškoti sekančio
replace-placeholder = Pakeisti...
find-placeholder = Rasti...
find-previous = Ieškoti ankstesnio
find-next = Ieškoti tolesnio
replace-placeholder = Keisti...
replace-all = Pakeisti visus
case-sensitive = Skirti raidžių dydžius
use-regex = Naudoti regex
wrap-around = Kelti į sekančią eilutę
wrap-around = Laikinai skaidyti eilutes
stage = Patvirtinti pakeitimai
project-search = Paieška projekte
dark = Tamsus
light = Šviesus
comment = COSMIC desktop teksto redaktorius
comment = COSMIC aplinkos rašyklė
unstage = Atšaukti patvirtinimą

View file

@ -0,0 +1,91 @@
quit = Изађи
cancel = Откажи
settings = Подешавања
appearance = Изглед
dark = Тамна
light = Светла
replace = Замени
save = Сачувај
undo = Опозови
repository = Ризница
support = Подршка
theme = Тема
match-desktop = Прати радну површину
file = Датотека
new-window = Нови прозор
edit = Уреди
cut = Исеци
copy = Умножи
paste = Залепи
select-all = Означи све
zoom-in = Увећајте приказ
default-size = Подразумевана величина
zoom-out = Умањите приказ
view = Преглед
menu-settings = Подешавања...
cosmic-text-editor = Космик уређивач текста
comment = Уређивач текста за Космик радну површину
new-document = Нови документ
open-project = Отвори пројекат
todo = УРАДИТИ
document-statistics = Статистика документа
word-count = Број речи
character-count = Знакови
character-count-no-spaces = Знакови (без размака)
line-count = Редови
git-management = Управљање Гитом
git-management-description = Управљање Гитом је алат за програмере који се користи за радње управљања издањима.
git-management-loading = Учитавање управљања Гитом...
stage = Припреми
staged-changes = Припремљене измене
unstage = Поништи припрему
unstaged-changes = Неприпремљене измене
project-search = Претрага пројекта
prompt-save-changes-title = Сачувај измене пре затварања?
prompt-unsaved-changes = Имате несачуване измене. Ако наставите без сачувања, ове измене ће бити изгубљене.
discard = Одбаци измене
save-all = Сачувај све
syntax-dark = Тамна синтакса
syntax-light = Светла синтакса
default-font = Подразумевани фонт
default-font-size = Подразумевана величина фонта
default-zoom-step = Кораци увећања
keyboard-shortcuts = Пречице тастатуре
enable-vim-bindings = Омогући Вим везивања
find-placeholder = Пронађи...
find-previous = Нађи претходно
find-next = Нађи следеће
replace-placeholder = Замени…
replace-all = Замени све
case-sensitive = Разликује величину слова
use-regex = Употреби регуларни израз
wrap-around = Преламај около
new-file = Нова датотека
open-file = Отвори датотеку...
open-recent-file = Отвори недавну датотеку
close-file = Затвори датотеку
menu-open-project = Отвори пројекат...
open-recent-project = Отвори недавни пројекат
close-project = Затвори пројекат
save-as = Сачувај као...
revert-all-changes = Врати све измене
menu-document-statistics = Статистика документа...
document-type = Врста документа...
encoding = Кодирање...
menu-git-management = Управљање Гитом...
print = Штампај
redo = Понови
find = Пронађи
find-in-project = Пронађи у пројекту...
spell-check = Провера правописа...
indentation = Увлачење
automatic-indentation = Самостално увлачење
tab-width = Ширина табулатора: { $tab_width }
convert-indentation-to-spaces = Претворите увлачење у размаке
convert-indentation-to-tabs = Претворите увлачење у табулаторе
word-wrap = Прелом речи
show-line-numbers = Приказује бројеве редова
highlight-current-line = Истиче текући ред
syntax-highlighting = Истицање синтаксе...
menu-keyboard-shortcuts = Пречице на тастатури...
menu-about = О Космик уређивачу текста...

View file

@ -366,7 +366,7 @@ pub enum Message {
GitProjectStatus(Vec<(String, PathBuf, Vec<GitStatus>)>),
GitStage(PathBuf, PathBuf),
GitUnstage(PathBuf, PathBuf),
Key(Modifiers, keyboard::Key),
Key(Modifiers, keyboard::key::Physical, keyboard::Key),
LaunchUrl(String),
Modifiers(Modifiers),
NewFile,
@ -2125,9 +2125,9 @@ impl Application for App {
|x| x,
);
}
Message::Key(modifiers, key) => {
Message::Key(modifiers, physical, key) => {
for (key_bind, action) in self.key_binds.iter() {
if key_bind.matches(modifiers, &key, None) {
if key_bind.matches(modifiers, &key, Some(&physical)) {
return self.update(action.message(None));
}
}
@ -2780,7 +2780,7 @@ impl Application for App {
// If that was the last tab, exit the application
if self.tab_model.iter().next().is_none() {
return self.update(Message::QuitForce)
return self.update(Message::QuitForce);
}
// Close PromptSaveClose dialog if open for this entity
@ -3308,12 +3308,15 @@ impl Application for App {
let mut subscriptions = vec![
event::listen_with(|event, status, window_id| match event {
event::Event::Keyboard(keyboard::Event::KeyPressed { modifiers, key, .. }) => {
match status {
event::Status::Ignored => Some(Message::Key(modifiers, key)),
event::Status::Captured => None,
}
}
event::Event::Keyboard(keyboard::Event::KeyPressed {
modifiers,
physical_key,
key,
..
}) => match status {
event::Status::Ignored => Some(Message::Key(modifiers, physical_key, key)),
event::Status::Captured => None,
},
event::Event::Keyboard(keyboard::Event::ModifiersChanged(modifiers)) => {
Some(Message::Modifiers(modifiers))
}

View file

@ -121,10 +121,11 @@ pub fn context_menu<'a>(
entity: segmented_button::Entity,
) -> Element<'a, Message> {
fn key_style(theme: &cosmic::Theme) -> TextStyle {
let mut color = theme.cosmic().background.component.on;
let mut color = theme.cosmic().background(false).component.on;
color.alpha *= 0.75;
TextStyle {
color: Some(color.into()),
..Default::default()
}
}
@ -159,7 +160,7 @@ pub fn context_menu<'a>(
//TODO: move style to libcosmic
.style(|theme| {
let cosmic = theme.cosmic();
let component = &cosmic.background.component;
let component = &cosmic.background(false).component;
widget::container::Style {
icon_color: Some(component.on.into()),
text_color: Some(component.on.into()),

View file

@ -7,6 +7,7 @@ use cosmic::{
Border, Radians, Shell, Transformation,
clipboard::Clipboard,
image,
input_method::{Event as InputMethodEvent, InputMethod, Preedit, Purpose},
keyboard::{Key, key::Named},
layout::{self, Layout},
renderer::{self, Quad, Renderer as _},
@ -16,6 +17,7 @@ use cosmic::{
operation::{self, Operation},
tree,
},
window::Event as WindowEvent,
},
iced::{
Color, Element, Length, Padding, Point, Rectangle, Size, Vector,
@ -127,6 +129,35 @@ where
self.on_focus = Some(on_focus);
self
}
fn input_method<'b>(
&self,
state: &'b State,
scale_factor: f32,
layout: Layout<'_>,
) -> InputMethod<&'b str> {
if !state.is_focused {
return InputMethod::Disabled;
};
let editor_pos = layout.position() + [self.padding.left, self.padding.top].into();
let (caret_x, caret_y) = state.caret_position;
InputMethod::Enabled {
cursor: Rectangle::new(
Point::new(
editor_pos.x
+ (caret_x as f32 + state.editor_offset_x.get() as f32) / scale_factor,
editor_pos.y + (caret_y as f32) / scale_factor,
),
Size::new(
1.0,
(self.metrics.scale(scale_factor).line_height) / scale_factor,
),
),
purpose: Purpose::Normal,
preedit: state.preedit.as_ref().map(Preedit::as_ref),
}
}
}
pub fn text_box<'a, Message>(
@ -794,7 +825,7 @@ where
let scrollbar_color = if pressed {
// pressed_state_color, 0.5
cosmic_theme
.background
.background(false)
.component
.pressed
.without_alpha()
@ -803,7 +834,7 @@ where
} else if hover {
// hover_state_color, 0.2
cosmic_theme
.background
.background(false)
.component
.hover
.without_alpha()
@ -890,7 +921,7 @@ where
let scrollbar_color = if pressed {
// pressed_state_color, 0.5
cosmic_theme
.background
.background(false)
.component
.pressed
.without_alpha()
@ -899,7 +930,7 @@ where
} else if hover {
// hover_state_color, 0.2
cosmic_theme
.background
.background(false)
.component
.hover
.without_alpha()
@ -1101,6 +1132,33 @@ where
}
state.modifiers = *modifiers;
}
Event::InputMethod(event) => match event {
InputMethodEvent::Opened | InputMethodEvent::Closed => {
let metrics = self.metrics.scale(scale_factor);
state.preedit = matches!(event, InputMethodEvent::Opened).then(|| {
let mut preedit = Preedit::new();
preedit.text_size = Some(metrics.font_size.into());
preedit
});
}
InputMethodEvent::Preedit(content, selection) => {
if state.is_focused {
state.preedit = Some(Preedit {
content: content.to_owned(),
selection: selection.clone(),
text_size: Some(self.metrics.font_size.into()),
});
}
}
InputMethodEvent::Commit(text) => {
if state.is_focused {
editor.start_change();
editor.insert_string(&text, None);
editor.finish_change();
shell.capture_event();
}
}
},
Event::Mouse(MouseEvent::ButtonPressed(button)) => {
if let Some(p) = cursor_position.position_in(layout.bounds()) {
state.is_focused = true;
@ -1336,6 +1394,12 @@ where
shell.capture_event();
}
}
Event::Window(WindowEvent::RedrawRequested(_now)) => {
if state.is_focused {
state.caret_position = editor.cursor_position().unwrap_or(state.caret_position);
shell.request_input_method(&self.input_method(state, scale_factor, layout));
}
}
_ => (),
}
@ -1385,6 +1449,8 @@ pub struct State {
scrollbar_h_rect: Cell<Option<Rectangle<f32>>>,
handle_opt: Mutex<Option<image::Handle>>,
shift_anchor: Mutex<Option<Cursor>>,
caret_position: (i32, i32),
preedit: Option<Preedit>,
}
impl State {
@ -1402,6 +1468,8 @@ impl State {
scrollbar_h_rect: Cell::new(None),
handle_opt: Mutex::new(None),
shift_anchor: Mutex::new(None),
caret_position: (0, 0),
preedit: None,
}
}
}