From c393cca602a4d8dfbb388782ce99cd00a9f1bd86 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 11 Oct 2023 19:32:04 -0600 Subject: [PATCH] Fixes for resizing --- Cargo.lock | 1038 +++++++++++++++-------------------------------- Cargo.toml | 4 +- src/main.rs | 6 +- src/text_box.rs | 6 +- 4 files changed, 348 insertions(+), 706 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ffbd7d2..0a52e15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,17 +15,6 @@ dependencies = [ "accesskit", ] -[[package]] -name = "accesskit_macos" -version = "0.7.0" -source = "git+https://github.com/wash2/accesskit.git?tag=v0.11.0#2dee3df0a525d727df9f54ae71cfe8b47d7c2751" -dependencies = [ - "accesskit", - "accesskit_consumer", - "objc2", - "once_cell", -] - [[package]] name = "accesskit_unix" version = "0.4.0" @@ -41,31 +30,6 @@ dependencies = [ "zbus", ] -[[package]] -name = "accesskit_windows" -version = "0.14.0" -source = "git+https://github.com/wash2/accesskit.git?tag=v0.11.0#2dee3df0a525d727df9f54ae71cfe8b47d7c2751" -dependencies = [ - "accesskit", - "accesskit_consumer", - "arrayvec 0.7.4", - "once_cell", - "paste", - "windows 0.44.0", -] - -[[package]] -name = "accesskit_winit" -version = "0.13.0" -source = "git+https://github.com/wash2/accesskit.git?tag=v0.11.0#2dee3df0a525d727df9f54ae71cfe8b47d7c2751" -dependencies = [ - "accesskit", - "accesskit_macos", - "accesskit_unix", - "accesskit_windows", - "winit", -] - [[package]] name = "addr2line" version = "0.21.0" @@ -160,12 +124,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -181,6 +139,26 @@ dependencies = [ "libloading 0.7.4", ] +[[package]] +name = "ashpd" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7370b58af1d7e96df3ca0f454b57e69acf9aa42ed2d7337bd206923bae0d5754" +dependencies = [ + "enumflags2", + "futures-channel", + "futures-util", + "once_cell", + "rand", + "serde", + "serde_repr", + "url", + "wayland-backend 0.1.2", + "wayland-client 0.30.2", + "wayland-protocols 0.30.1", + "zbus", +] + [[package]] name = "async-broadcast" version = "0.5.1" @@ -241,7 +219,7 @@ dependencies = [ "futures-lite", "log", "parking", - "polling", + "polling 2.8.0", "rustix 0.37.24", "slab", "socket2", @@ -474,25 +452,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-sys" -version = "0.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" -dependencies = [ - "objc-sys", -] - -[[package]] -name = "block2" -version = "0.2.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" -dependencies = [ - "block-sys", - "objc2-encode", -] - [[package]] name = "blocking" version = "1.4.1" @@ -553,16 +512,28 @@ dependencies = [ [[package]] name = "calloop" -version = "0.10.6" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" +checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "log", - "nix 0.25.1", - "slotmap", + "polling 3.2.0", + "rustix 0.38.18", + "slab", "thiserror", - "vec_map", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop", + "rustix 0.38.18", + "wayland-backend 0.3.2", + "wayland-client 0.31.1", ] [[package]] @@ -596,56 +567,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" -[[package]] -name = "clipboard-win" -version = "4.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" -dependencies = [ - "error-code", - "str-buf", - "winapi", -] - -[[package]] -name = "clipboard_macos" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145a7f9e9b89453bc0a5e32d166456405d389cea5b578f57f1274b1397588a95" -dependencies = [ - "objc", - "objc-foundation", - "objc_id", -] - -[[package]] -name = "clipboard_wayland" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f6364a9f7a66f2ac1a1a098aa1c7f6b686f2496c6ac5e5c0d773445df912747" -dependencies = [ - "smithay-clipboard", -] - -[[package]] -name = "clipboard_x11" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "983a7010836ecd04dde2c6d27a0cb56ec5d21572177e782bdcb24a600124e921" -dependencies = [ - "thiserror", - "x11rb 0.9.0", -] - -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - [[package]] name = "cocoa" version = "0.24.1" @@ -657,7 +578,7 @@ dependencies = [ "cocoa-foundation", "core-foundation", "core-graphics", - "foreign-types 0.3.2", + "foreign-types", "libc", "objc", ] @@ -732,7 +653,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types", "libc", ] @@ -747,22 +668,10 @@ dependencies = [ "libc", ] -[[package]] -name = "core-text" -version = "19.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" -dependencies = [ - "core-foundation", - "core-graphics", - "foreign-types 0.3.2", - "libc", -] - [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -776,7 +685,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "quote", "syn 1.0.109", @@ -839,7 +748,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "almost", "cosmic-config", @@ -911,29 +820,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossfont" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" -dependencies = [ - "cocoa", - "core-foundation", - "core-foundation-sys", - "core-graphics", - "core-text", - "dwrote", - "foreign-types 0.5.0", - "freetype-rs", - "libc", - "log", - "objc", - "once_cell", - "pkg-config", - "servo-fontconfig", - "winapi", -] - [[package]] name = "crunchy" version = "0.2.2" @@ -967,10 +853,10 @@ dependencies = [ ] [[package]] -name = "cty" -version = "0.2.2" +name = "cursor-icon" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" +checksum = "740bb192a8e2d1350119916954f4409ee7f62f149b536911eeb78ba5a20526bf" [[package]] name = "d3d12" @@ -983,38 +869,14 @@ dependencies = [ "winapi", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1031,24 +893,13 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core 0.20.3", + "darling_core", "quote", "syn 2.0.38", ] @@ -1082,7 +933,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e8ef033054e131169b8f0f9a7af8f5533a9436fadf3c500ed547f730f07090d" dependencies = [ - "darling 0.20.3", + "darling", "proc-macro2", "quote", "syn 2.0.38", @@ -1166,26 +1017,23 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" -[[package]] -name = "dwrote" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" -dependencies = [ - "lazy_static", - "libc", - "serde", - "serde_derive", - "winapi", - "wio", -] - [[package]] name = "either" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +[[package]] +name = "enum-repr" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad30c9c0fa1aaf1ae5010dab11f1117b15d35faf62cda4bbbc53b9987950f18" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "enumflags2" version = "0.7.8" @@ -1236,16 +1084,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "error-code" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" -dependencies = [ - "libc", - "str-buf", -] - [[package]] name = "etagere" version = "0.2.8" @@ -1282,16 +1120,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "expat-sys" -version = "2.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" -dependencies = [ - "cmake", - "pkg-config", -] - [[package]] name = "exr" version = "1.6.4" @@ -1365,6 +1193,9 @@ name = "float-cmp" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] [[package]] name = "float_next_after" @@ -1434,28 +1265,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1", -] - -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared 0.3.1", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", + "foreign-types-shared", ] [[package]] @@ -1464,12 +1274,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - [[package]] name = "form_urlencoded" version = "1.2.0" @@ -1502,28 +1306,6 @@ dependencies = [ "xdg", ] -[[package]] -name = "freetype-rs" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" -dependencies = [ - "bitflags 1.3.2", - "freetype-sys", - "libc", -] - -[[package]] -name = "freetype-sys" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" -dependencies = [ - "cmake", - "libc", - "pkg-config", -] - [[package]] name = "fsevent-sys" version = "4.1.0" @@ -1953,14 +1735,14 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "iced_accessibility", "iced_core", "iced_futures", "iced_renderer", + "iced_sctk", "iced_widget", - "iced_winit", "image", "thiserror", ] @@ -1968,21 +1750,23 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "accesskit", - "accesskit_winit", + "accesskit_unix", ] [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "bitflags 1.3.2", + "iced_accessibility", "instant", "log", "palette", + "smithay-client-toolkit 0.17.0", "thiserror", "twox-hash", ] @@ -1990,7 +1774,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "futures", "iced_core", @@ -2002,7 +1786,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2013,37 +1797,63 @@ dependencies = [ "kamadak-exif", "log", "lyon_path", - "raw-window-handle 0.5.2", + "raw-window-handle", "thiserror", ] [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "iced_graphics", "iced_tiny_skia", "iced_wgpu", "log", - "raw-window-handle 0.5.2", + "raw-window-handle", "thiserror", ] [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ + "iced_accessibility", "iced_core", "iced_futures", + "smithay-client-toolkit 0.17.0", "thiserror", ] +[[package]] +name = "iced_sctk" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" +dependencies = [ + "enum-repr", + "float-cmp", + "futures", + "iced_futures", + "iced_graphics", + "iced_runtime", + "iced_style", + "itertools", + "lazy_static", + "raw-window-handle", + "smithay-client-toolkit 0.17.0", + "smithay-clipboard", + "thiserror", + "tracing", + "wayland-backend 0.3.2", + "wayland-protocols 0.31.0", + "xkeysym", +] + [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "iced_core", "once_cell", @@ -2053,25 +1863,25 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "bytemuck", "cosmic-text 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "iced_graphics", "kurbo", "log", - "raw-window-handle 0.5.2", + "raw-window-handle", "resvg", "rustc-hash", "softbuffer", - "tiny-skia 0.10.0", + "tiny-skia", "twox-hash", ] [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2083,7 +1893,7 @@ dependencies = [ "log", "lyon", "once_cell", - "raw-window-handle 0.5.2", + "raw-window-handle", "resvg", "rustc-hash", "twox-hash", @@ -2093,34 +1903,18 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "iced_renderer", "iced_runtime", "iced_style", "num-traits", "ouroboros", + "smithay-client-toolkit 0.17.0", "thiserror", "unicode-segmentation", ] -[[package]] -name = "iced_winit" -version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" -dependencies = [ - "iced_graphics", - "iced_runtime", - "iced_style", - "log", - "raw-window-handle 0.5.2", - "thiserror", - "web-sys", - "winapi", - "window_clipboard", - "winit", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -2209,9 +2003,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] @@ -2225,18 +2016,21 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - [[package]] name = "jpeg-decoder" version = "0.3.0" @@ -2301,7 +2095,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", ] [[package]] @@ -2325,9 +2119,10 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a" dependencies = [ "apply", + "ashpd", "cosmic-config", "cosmic-theme", "css-color", @@ -2339,13 +2134,14 @@ dependencies = [ "iced_futures", "iced_renderer", "iced_runtime", + "iced_sctk", "iced_style", "iced_tiny_skia", "iced_widget", - "iced_winit", "lazy_static", "palette", "slotmap", + "smithay-client-toolkit 0.17.0", "taffy", "thiserror", "tracing", @@ -2457,7 +2253,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74df1ff0a0147282eb10699537a03baa7d31972b58984a1d44ce0624043fe8ad" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "euclid", "num-traits", ] @@ -2516,6 +2312,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -2552,7 +2357,7 @@ dependencies = [ "bitflags 1.3.2", "block", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types", "log", "objc", ] @@ -2620,77 +2425,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "ndk" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" -dependencies = [ - "bitflags 1.3.2", - "jni-sys", - "ndk-sys", - "num_enum", - "raw-window-handle 0.5.2", - "thiserror", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-glue" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" -dependencies = [ - "libc", - "log", - "ndk", - "ndk-context", - "ndk-macro", - "ndk-sys", - "once_cell", - "parking_lot 0.12.1", -] - -[[package]] -name = "ndk-macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" -dependencies = [ - "darling 0.13.4", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ndk-sys" -version = "0.4.1+23.1.7779620" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "nix" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if", - "libc", - "memoffset 0.6.5", -] - [[package]] name = "nix" version = "0.24.3" @@ -2845,27 +2579,6 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "objc" version = "0.2.7" @@ -2887,32 +2600,6 @@ dependencies = [ "objc_id", ] -[[package]] -name = "objc-sys" -version = "0.2.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" - -[[package]] -name = "objc2" -version = "0.3.0-beta.3.patch-leaks.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" -dependencies = [ - "block2", - "objc-sys", - "objc2-encode", -] - -[[package]] -name = "objc2-encode" -version = "2.0.0-pre.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" -dependencies = [ - "objc-sys", -] - [[package]] name = "objc_exception" version = "0.1.2" @@ -3108,12 +2795,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - [[package]] name = "percent-encoding" version = "2.3.0" @@ -3260,6 +2941,20 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62a79e457c9898100b4298d57d69ec53d06f9a6ed352431ce5f377e082d2e846" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.18", + "tracing", + "windows-sys 0.48.0", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -3342,6 +3037,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.33" @@ -3393,15 +3097,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "977b1e897f9d764566891689e642653e5ed90c6895106acd005eb4c1d0203991" -[[package]] -name = "raw-window-handle" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" -dependencies = [ - "cty", -] - [[package]] name = "raw-window-handle" version = "0.5.2" @@ -3517,7 +3212,7 @@ dependencies = [ "png", "rgb", "svgtypes", - "tiny-skia 0.10.0", + "tiny-skia", "usvg", ] @@ -3538,7 +3233,7 @@ dependencies = [ "objc", "objc-foundation", "objc_id", - "raw-window-handle 0.5.2", + "raw-window-handle", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3680,15 +3375,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" -[[package]] -name = "safe_arch" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" -dependencies = [ - "bytemuck", -] - [[package]] name = "safemem" version = "0.3.3" @@ -3716,18 +3402,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sctk-adwaita" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" -dependencies = [ - "crossfont", - "log", - "smithay-client-toolkit", - "tiny-skia 0.7.0", -] - [[package]] name = "self_cell" version = "1.0.1" @@ -3785,27 +3459,6 @@ dependencies = [ "serde", ] -[[package]] -name = "servo-fontconfig" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" -dependencies = [ - "libc", - "servo-fontconfig-sys", -] - -[[package]] -name = "servo-fontconfig-sys" -version = "5.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" -dependencies = [ - "expat-sys", - "freetype-sys", - "pkg-config", -] - [[package]] name = "sha1" version = "0.10.6" @@ -3878,7 +3531,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" dependencies = [ "bitflags 1.3.2", - "calloop", "dlib", "lazy_static", "log", @@ -3886,8 +3538,35 @@ dependencies = [ "nix 0.24.3", "pkg-config", "wayland-client 0.29.5", - "wayland-cursor", - "wayland-protocols", + "wayland-cursor 0.29.5", + "wayland-protocols 0.29.5", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.17.0" +source = "git+https://github.com/smithay/client-toolkit?rev=dc8c4a0#dc8c4a035128208af65141fe12142a1dbc4a32bb" +dependencies = [ + "bitflags 2.4.0", + "bytemuck", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "dlib", + "log", + "memmap2 0.7.1", + "nix 0.26.4", + "pkg-config", + "thiserror", + "wayland-backend 0.3.2", + "wayland-client 0.31.1", + "wayland-csd-frame", + "wayland-cursor 0.31.0", + "wayland-protocols 0.31.0", + "wayland-protocols-wlr", + "wayland-scanner 0.31.0", + "xkbcommon", + "xkeysym", ] [[package]] @@ -3896,7 +3575,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" dependencies = [ - "smithay-client-toolkit", + "smithay-client-toolkit 0.16.1", "wayland-client 0.29.5", ] @@ -3920,21 +3599,21 @@ dependencies = [ "cocoa", "core-graphics", "fastrand 1.9.0", - "foreign-types 0.3.2", + "foreign-types", "log", "nix 0.26.4", "objc", - "raw-window-handle 0.5.2", + "raw-window-handle", "redox_syscall 0.3.5", "thiserror", "wasm-bindgen", - "wayland-backend", + "wayland-backend 0.1.2", "wayland-client 0.30.2", "wayland-sys 0.30.1", "web-sys", "windows-sys 0.42.0", "x11-dl", - "x11rb 0.11.1", + "x11rb", ] [[package]] @@ -3962,12 +3641,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "str-buf" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" - [[package]] name = "strict-num" version = "0.1.1" @@ -4079,7 +3752,7 @@ name = "taffy" version = "0.3.11" source = "git+https://github.com/DioxusLabs/taffy?rev=65bedf#65bedf128ec8cef40c1a21b6f141f2c771842cca" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "grid", "num-traits", "slotmap", @@ -4172,21 +3845,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-skia" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "bytemuck", - "cfg-if", - "png", - "safe_arch", - "tiny-skia-path 0.7.0", -] - [[package]] name = "tiny-skia" version = "0.10.0" @@ -4194,22 +3852,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7db11798945fa5c3e5490c794ccca7c6de86d3afdd54b4eb324109939c6f37bc" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec", "bytemuck", "cfg-if", "log", "png", - "tiny-skia-path 0.10.0", -] - -[[package]] -name = "tiny-skia-path" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" -dependencies = [ - "arrayref", - "bytemuck", + "tiny-skia-path", ] [[package]] @@ -4450,6 +4098,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -4510,15 +4159,9 @@ dependencies = [ "rctree", "strict-num", "svgtypes", - "tiny-skia-path 0.10.0", + "tiny-skia-path", ] -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version-compare" version = "0.1.1" @@ -4649,6 +4292,20 @@ dependencies = [ "wayland-sys 0.30.1", ] +[[package]] +name = "wayland-backend" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" +dependencies = [ + "cc", + "downcast-rs", + "nix 0.26.4", + "scoped-tls", + "smallvec", + "wayland-sys 0.31.1", +] + [[package]] name = "wayland-client" version = "0.29.5" @@ -4673,10 +4330,22 @@ checksum = "489c9654770f674fc7e266b3c579f4053d7551df0ceb392f153adb1f9ed06ac8" dependencies = [ "bitflags 1.3.2", "nix 0.26.4", - "wayland-backend", + "wayland-backend 0.1.2", "wayland-scanner 0.30.1", ] +[[package]] +name = "wayland-client" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" +dependencies = [ + "bitflags 2.4.0", + "nix 0.26.4", + "wayland-backend 0.3.2", + "wayland-scanner 0.31.0", +] + [[package]] name = "wayland-commons" version = "0.29.5" @@ -4689,6 +4358,17 @@ dependencies = [ "wayland-sys 0.29.5", ] +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.4.0", + "cursor-icon", + "wayland-backend 0.3.2", +] + [[package]] name = "wayland-cursor" version = "0.29.5" @@ -4700,6 +4380,17 @@ dependencies = [ "xcursor", ] +[[package]] +name = "wayland-cursor" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" +dependencies = [ + "nix 0.26.4", + "wayland-client 0.31.1", + "xcursor", +] + [[package]] name = "wayland-protocols" version = "0.29.5" @@ -4712,6 +4403,43 @@ dependencies = [ "wayland-scanner 0.29.5", ] +[[package]] +name = "wayland-protocols" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b28101e5ca94f70461a6c2d610f76d85ad223d042dd76585ab23d3422dd9b4d" +dependencies = [ + "bitflags 1.3.2", + "wayland-backend 0.1.2", + "wayland-client 0.30.2", + "wayland-scanner 0.30.1", +] + +[[package]] +name = "wayland-protocols" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" +dependencies = [ + "bitflags 2.4.0", + "wayland-backend 0.3.2", + "wayland-client 0.31.1", + "wayland-scanner 0.31.0", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +dependencies = [ + "bitflags 2.4.0", + "wayland-backend 0.3.2", + "wayland-client 0.31.1", + "wayland-protocols 0.31.0", + "wayland-scanner 0.31.0", +] + [[package]] name = "wayland-scanner" version = "0.29.5" @@ -4734,6 +4462,17 @@ dependencies = [ "quote", ] +[[package]] +name = "wayland-scanner" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" +dependencies = [ + "proc-macro2", + "quick-xml 0.30.0", + "quote", +] + [[package]] name = "wayland-sys" version = "0.29.5" @@ -4757,6 +4496,17 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "wayland-sys" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +dependencies = [ + "dlib", + "log", + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.64" @@ -4779,14 +4529,14 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "480c965c9306872eb6255fa55e4b4953be55a8b64d57e61d7ff840d3dcc051cd" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "cfg-if", "js-sys", "log", "naga", "parking_lot 0.12.1", "profiling", - "raw-window-handle 0.5.2", + "raw-window-handle", "smallvec", "static_assertions", "wasm-bindgen", @@ -4803,7 +4553,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "bit-vec", "bitflags 2.4.0", "codespan-reporting", @@ -4811,7 +4561,7 @@ dependencies = [ "naga", "parking_lot 0.12.1", "profiling", - "raw-window-handle 0.5.2", + "raw-window-handle", "rustc-hash", "smallvec", "thiserror", @@ -4827,14 +4577,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ecb3258078e936deee14fd4e0febe1cfe9bbb5ffef165cb60218d2ee5eb4448" dependencies = [ "android_system_properties", - "arrayvec 0.7.4", + "arrayvec", "ash", "bit-set", "bitflags 2.4.0", "block", "core-graphics-types", "d3d12", - "foreign-types 0.3.2", + "foreign-types", "glow", "gpu-alloc", "gpu-allocator", @@ -4851,7 +4601,7 @@ dependencies = [ "parking_lot 0.12.1", "profiling", "range-alloc", - "raw-window-handle 0.5.2", + "raw-window-handle", "renderdoc-sys", "rustc-hash", "smallvec", @@ -4919,20 +4669,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "window_clipboard" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63287c9c4396ccf5346d035a9b0fcaead9e18377637f5eaa78b7ac65c873ff7d" -dependencies = [ - "clipboard-win", - "clipboard_macos", - "clipboard_wayland", - "clipboard_x11", - "raw-window-handle 0.5.2", - "thiserror", -] - [[package]] name = "windows" version = "0.37.0" @@ -4952,46 +4688,9 @@ version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" dependencies = [ - "windows-implement", - "windows-interface", "windows-targets 0.42.2", ] -[[package]] -name = "windows-implement" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce87ca8e3417b02dc2a8a22769306658670ec92d78f1bd420d6310a67c245c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "windows-interface" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f69a591ecd4f810d29f17e902d40e349fb05b0b11fff63b08b826bfe39c7f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -5058,12 +4757,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.37.0" @@ -5082,12 +4775,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.37.0" @@ -5106,12 +4793,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.37.0" @@ -5130,12 +4811,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.37.0" @@ -5166,12 +4841,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.37.0" @@ -5190,38 +4859,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" -[[package]] -name = "winit" -version = "0.27.2" -source = "git+https://github.com/pop-os/winit.git?branch=iced#d35712bba65eb1dad8f6f546af49b96fdad9467e" -dependencies = [ - "bitflags 1.3.2", - "cocoa", - "core-foundation", - "core-graphics", - "dispatch", - "instant", - "libc", - "log", - "mio", - "ndk", - "ndk-glue", - "objc", - "once_cell", - "parking_lot 0.12.1", - "percent-encoding", - "raw-window-handle 0.4.3", - "raw-window-handle 0.5.2", - "sctk-adwaita", - "smithay-client-toolkit", - "wasm-bindgen", - "wayland-client 0.29.5", - "wayland-protocols", - "web-sys", - "windows-sys 0.36.1", - "x11-dl", -] - [[package]] name = "winnow" version = "0.5.16" @@ -5231,15 +4868,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "wio" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" -dependencies = [ - "winapi", -] - [[package]] name = "x11-dl" version = "2.21.0" @@ -5251,18 +4879,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x11rb" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e99be55648b3ae2a52342f9a870c0e138709a3493261ce9b469afe6e4df6d8a" -dependencies = [ - "gethostname", - "nix 0.22.3", - "winapi", - "winapi-wsapoll", -] - [[package]] name = "x11rb" version = "0.11.1" @@ -5313,6 +4929,25 @@ dependencies = [ "winapi", ] +[[package]] +name = "xkbcommon" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52db25b599e92bf6e3904134618728eeb7b49a5a4f38f107f92399bb9c496b88" +dependencies = [ + "libc", + "memmap2 0.7.1", +] + +[[package]] +name = "xkeysym" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" +dependencies = [ + "bytemuck", +] + [[package]] name = "xml-rs" version = "0.8.19" @@ -5438,6 +5073,7 @@ dependencies = [ "libc", "serde", "static_assertions", + "url", "zvariant_derive", ] diff --git a/Cargo.toml b/Cargo.toml index 2075c46..2cb4905 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,9 @@ features = ["syntect"] git = "https://github.com/pop-os/libcosmic" branch = "theme-dark-light-switching" default-features = false -features = ["winit"] +features = ["wayland"] +#TODO: winit does not support size limits, resizing +#features = ["winit"] #path = "../libcosmic" [dependencies.rfd] diff --git a/src/main.rs b/src/main.rs index bdb9451..ee72d42 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ use cosmic::{ executor, iced::{ widget::{column, row, text}, - Alignment, Length, + Alignment, Length, Limits, }, widget::{icon, segmented_button, view_switcher}, ApplicationExt, Element, @@ -36,8 +36,8 @@ static FONT_SIZES: &'static [Metrics] = &[ fn main() -> Result<(), Box> { env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init(); - let settings = Settings::default(); - //TODO: settings.window.min_size = Some((400, 100)); + let settings = Settings::default() + .size_limits(Limits::NONE.min_width(400.0).min_height(200.0)); let flags = (); cosmic::app::run::(settings, flags)?; diff --git a/src/text_box.rs b/src/text_box.rs index cd60726..4fa1fbb 100644 --- a/src/text_box.rs +++ b/src/text_box.rs @@ -177,7 +177,6 @@ where let height = layout_lines as f32 * editor.buffer().metrics().line_height; let size = Size::new(limits.max().width, height); - log::info!("size {:?}", size); layout::Node::new(limits.resolve(size)) } @@ -244,6 +243,11 @@ where let image_w = (view_w as f64 * scale_factor) as i32; let image_h = (view_h as f64 * scale_factor) as i32; + + if image_w <= 0 || image_h <= 0 { + // Zero sized image + return; + } let mut font_system = FONT_SYSTEM.lock().unwrap(); let mut editor = editor.borrow_with(&mut font_system);