From d5d0805f2f7b3f8448458915161ba3bb5be650f0 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Tue, 19 Sep 2023 16:54:50 +0200 Subject: [PATCH 1/6] refactor: libcosmic rebase with Application API --- Cargo.lock | 1126 ++++++++++-------- Cargo.toml | 9 +- app/src/app.rs | 501 +++----- app/src/main.rs | 17 +- app/src/pages/desktop/options.rs | 29 +- app/src/pages/desktop/panel/applets_inner.rs | 298 +++-- app/src/pages/desktop/panel/inner.rs | 42 +- app/src/pages/desktop/wallpaper/mod.rs | 7 +- app/src/pages/desktop/wallpaper/widgets.rs | 16 +- app/src/pages/input/keyboard/mod.rs | 39 +- app/src/pages/input/keyboard/shortcuts.rs | 9 +- app/src/pages/input/mouse.rs | 3 +- app/src/pages/input/touchpad.rs | 3 +- app/src/pages/sound.rs | 52 +- app/src/pages/system/about.rs | 2 +- app/src/theme.rs | 6 +- app/src/widget/mod.rs | 113 +- page/src/binder.rs | 5 + 18 files changed, 1080 insertions(+), 1197 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce96342d..7bd58526 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" - [[package]] name = "accesskit" version = "0.11.0" @@ -38,9 +32,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -75,9 +69,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "0f2135563fb5c609d2b2b87c1e8ce7bc41b0b45430fa9661f457981503dd5bf0" dependencies = [ "memchr", ] @@ -88,6 +82,18 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "almost" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aa2999eb46af81abb65c2d30d446778d7e613b60bbf4e174a027e80f90a3c14" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -99,9 +105,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "apply" @@ -151,6 +157,27 @@ 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", + "tokio", + "url", + "wayland-backend", + "wayland-client 0.30.2", + "wayland-protocols 0.30.1", + "zbus", +] + [[package]] name = "async-broadcast" version = "0.5.1" @@ -163,9 +190,9 @@ dependencies = [ [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -181,7 +208,7 @@ dependencies = [ "async-lock", "async-task", "concurrent-queue", - "fastrand", + "fastrand 1.9.0", "futures-lite", "slab", ] @@ -212,17 +239,17 @@ dependencies = [ "log", "parking", "polling", - "rustix", + "rustix 0.37.23", "slab", - "socket2", + "socket2 0.4.9", "waker-fn", ] [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener", ] @@ -240,20 +267,20 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix", + "rustix 0.37.23", "signal-hook", "windows-sys 0.48.0", ] [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -264,13 +291,13 @@ checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -285,7 +312,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1163d9d7c51de51a2b79d6df5e8888d11e9df17c752ce4a285fb6ca1580734e" dependencies = [ - "rustix", + "rustix 0.37.23", "tempfile", "windows-sys 0.48.0", ] @@ -325,30 +352,24 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide 0.6.2", + "miniz_oxide", "object", "rustc-demangle", ] [[package]] name = "base64" -version = "0.13.1" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bit-set" @@ -379,9 +400,12 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbe3c979c178231552ecba20214a8272df4e09f232a87aef4320cf06539aded" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +dependencies = [ + "serde", +] [[package]] name = "block" @@ -408,16 +432,16 @@ dependencies = [ "async-lock", "async-task", "atomic-waker", - "fastrand", + "fastrand 1.9.0", "futures-lite", "log", ] [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-unit" @@ -430,22 +454,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -456,9 +480,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "calloop" @@ -476,9 +500,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -721,7 +748,7 @@ dependencies = [ [[package]] name = "cosmic-bg-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-bg#4e1652f06bacc545eced24b11cb639ecead3b90c" +source = "git+https://github.com/pop-os/cosmic-bg#749f3ea139519fffaa2641f80b6fba1379b3ad63" dependencies = [ "colorgrad", "cosmic-config", @@ -735,7 +762,7 @@ dependencies = [ [[package]] name = "cosmic-comp-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-comp#1392fc7c953678a14825ba3d1e5619d38c1946c7" +source = "git+https://github.com/pop-os/cosmic-comp#5cebc7b97de4e8c0ed84ffb3b93837e95f8b4980" dependencies = [ "input", "serde", @@ -744,7 +771,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "atomicwrites", "calloop", @@ -759,7 +786,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "quote", "syn 1.0.109", @@ -768,7 +795,7 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#22571fe4d9496439f6940c4358751424552f84cd" +source = "git+https://github.com/pop-os/cosmic-panel#dbd419e7e7e85c7dc2f1caea90bf73e4b28c6c88" dependencies = [ "anyhow", "cosmic-config", @@ -829,7 +856,7 @@ dependencies = [ "futures-lite", "image", "rayon", - "smithay-client-toolkit 0.17.0", + "smithay-client-toolkit 0.17.0 (git+https://github.com/pop-os/client-toolkit?tag=themed-pointer)", "tokio", "tracing", "wayland-client 0.30.2", @@ -872,15 +899,16 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.8.0" -source = "git+https://github.com/hecrj/cosmic-text.git?rev=b85d6a4f2376f8a8a7dadc0f8bcb89d4db10a1c9#b85d6a4f2376f8a8a7dadc0f8bcb89d4db10a1c9" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0b68966c2543609f8d92f9d33ac3b719b2a67529b0c6c0b3e025637b477eef9" dependencies = [ + "aliasable", "fontdb", "libm", "log", - "ouroboros 0.15.6", "rangemap", - "rustybuzz", + "rustybuzz 0.8.0", "swash", "sys-locale", "unicode-bidi", @@ -892,12 +920,11 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ - "anyhow", + "almost", "cosmic-config", "csscolorparser", - "directories", "lazy_static", "palette", "ron", @@ -906,9 +933,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -1049,12 +1076,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core 0.20.1", - "darling_macro 0.20.1", + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] @@ -1073,16 +1100,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -1098,23 +1125,23 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core 0.20.1", + "darling_core 0.20.3", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] name = "dashmap" -version = "5.4.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.12.3", + "hashbrown 0.14.0", "lock_api", "once_cell", "parking_lot_core 0.9.8", @@ -1143,10 +1170,10 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e8ef033054e131169b8f0f9a7af8f5533a9436fadf3c500ed547f730f07090d" dependencies = [ - "darling 0.20.1", + "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -1159,15 +1186,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "directories" -version = "4.0.1" -source = "git+https://github.com/edfloreshz/directories-rs#6a6d83d853a35ee3273034215c4defaf61286fe5" -dependencies = [ - "anyhow", - "dirs-sys 0.3.7", -] - [[package]] name = "dirs" version = "3.0.2" @@ -1232,7 +1250,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -1272,9 +1290,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "enum-repr" @@ -1289,9 +1307,9 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", "serde", @@ -1299,13 +1317,13 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -1321,11 +1339,17 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -1354,9 +1378,9 @@ dependencies = [ [[package]] name = "etagere" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6301151a318f367f392c31395beb1cfba5ccd9abc44d1db0db3a4b27b9601c89" +checksum = "fcf22f748754352918e082e0039335ee92454a5d62bcaf69b5e8daf5907d9644" dependencies = [ "euclid", "svg_fmt", @@ -1397,7 +1421,7 @@ dependencies = [ "flume", "half", "lebe", - "miniz_oxide 0.7.1", + "miniz_oxide", "rayon-core", "smallvec", "zune-inflate", @@ -1428,6 +1452,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + [[package]] name = "fdeflate" version = "0.3.0" @@ -1439,13 +1469,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -1460,12 +1490,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -1542,24 +1572,25 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fontconfig-parser" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ab2e12762761366dcb876ab8b6e0cfa4797ddcd890575919f008b5ba655672a" +checksum = "674e258f4b5d2dcd63888c01c68413c51f565e8af99d2f7701c7b81d79ef41c4" dependencies = [ "roxmltree", ] [[package]] name = "fontdb" -version = "0.13.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237ff9f0813bbfc9de836016472e0c9ae7802f174a51594607e5f4ff334cb2f5" +checksum = "af8d8cbea8f21307d7e84bca254772981296f058a1d36b461bf4d83a7499fc9e" dependencies = [ "fontconfig-parser", "log", - "memmap2", + "memmap2 0.6.2", "slotmap", - "ttf-parser", + "tinyvec", + "ttf-parser 0.19.2", ] [[package]] @@ -1589,7 +1620,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -1735,7 +1766,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", @@ -1752,7 +1783,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -1863,9 +1894,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glam" @@ -1875,9 +1906,9 @@ checksum = "42218cb640844e3872cc3c153dc975229e080a6c4733b34709ef445610550226" [[package]] name = "glow" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "807edf58b70c0b5b2181dd39fe1839dbdb3ba02645630dc5f753e23da307f762" +checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" dependencies = [ "js-sys", "slotmap", @@ -1887,8 +1918,9 @@ dependencies = [ [[package]] name = "glyphon" -version = "0.2.0" -source = "git+https://github.com/hecrj/glyphon.git?rev=26f92369da3704988e3e27f0b35e705c6b2de203#26f92369da3704988e3e27f0b35e705c6b2de203" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e87caa7459145f5e5f167bf34db4532901404c679e62339fb712a0e3ccf722a" dependencies = [ "cosmic-text", "etagere", @@ -1979,11 +2011,12 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ "ahash 0.8.3", + "allocator-api2", ] [[package]] @@ -2002,19 +2035,16 @@ dependencies = [ ] [[package]] -name = "hermit-abi" -version = "0.2.6" +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -2028,15 +2058,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "home" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" -dependencies = [ - "windows-sys 0.48.0", -] - [[package]] name = "humantime" version = "2.1.0" @@ -2045,15 +2066,15 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "i18n-config" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b987084cadad6e2f2b1e6ea62c44123591a3c044793a1beabf71a8356ea768d5" +checksum = "0c9ce3c48cbc21fd5b22b9331f32b5b51f6ad85d969b99e793427332e76e7640" dependencies = [ "log", "serde", "serde_derive", "thiserror", - "toml 0.7.3", + "toml 0.8.0", "unic-langid", ] @@ -2096,27 +2117,27 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.28", + "syn 2.0.37", "unic-langid", ] [[package]] name = "i18n-embed-impl" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a95d065e6be4499e50159172395559a388d20cf13c84c77e4a1e341786f219" +checksum = "a2a4d5bff745c9a6e1459c490059281b353a4ab0a4e1e58b3eeeaef71f97d07b" dependencies = [ "find-crate", "i18n-config", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] name = "iced" -version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "iced_accessibility", "iced_core", @@ -2132,7 +2153,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "accesskit", "accesskit_unix", @@ -2140,23 +2161,23 @@ dependencies = [ [[package]] name = "iced_core" -version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "bitflags 1.3.2", "iced_accessibility", "instant", "log", "palette", - "smithay-client-toolkit 0.17.0", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", "thiserror", "twox-hash", ] [[package]] name = "iced_futures" -version = "0.6.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +version = "0.7.0" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "futures", "iced_core", @@ -2168,49 +2189,50 @@ dependencies = [ [[package]] name = "iced_graphics" -version = "0.8.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +version = "0.9.0" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "bitflags 1.3.2", "bytemuck", "glam", + "half", "iced_core", "image", "kamadak-exif", "log", "raw-window-handle 0.5.2", "thiserror", - "tiny-skia 0.9.1", ] [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "iced_graphics", "iced_tiny_skia", "iced_wgpu", + "log", "raw-window-handle 0.5.2", "thiserror", ] [[package]] name = "iced_runtime" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +version = "0.1.1" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "iced_accessibility", "iced_core", "iced_futures", - "smithay-client-toolkit 0.17.0", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", "thiserror", ] [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "enum-repr", "float-cmp", @@ -2221,18 +2243,18 @@ dependencies = [ "iced_style", "itertools 0.10.5", "raw-window-handle 0.5.2", - "smithay-client-toolkit 0.17.0", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", "smithay-clipboard", "thiserror", "tracing", "wayland-backend", - "wayland-protocols 0.30.0", + "wayland-protocols 0.30.1", ] [[package]] name = "iced_style" -version = "0.8.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +version = "0.9.0" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "iced_core", "once_cell", @@ -2242,7 +2264,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "bytemuck", "cosmic-text", @@ -2253,14 +2275,14 @@ dependencies = [ "resvg", "rustc-hash", "softbuffer", - "tiny-skia 0.9.1", + "tiny-skia 0.10.0", "twox-hash", ] [[package]] name = "iced_wgpu" -version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +version = "0.11.1" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2280,23 +2302,23 @@ dependencies = [ [[package]] name = "iced_widget" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +version = "0.1.3" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "iced_renderer", "iced_runtime", "iced_style", "num-traits", - "ouroboros 0.13.0", - "smithay-client-toolkit 0.17.0", + "ouroboros", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", "thiserror", "unicode-segmentation", ] [[package]] name = "iced_winit" -version = "0.9.1" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "iced_graphics", "iced_runtime", @@ -2395,9 +2417,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.6" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" dependencies = [ "bytemuck", "byteorder", @@ -2414,9 +2436,9 @@ dependencies = [ [[package]] name = "imagesize" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b72ad49b554c1728b1e83254a1b1565aea4161e28dabbfa171fc15fe62299caf" +checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] name = "indenter" @@ -2434,6 +2456,16 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "inotify" version = "0.9.6" @@ -2514,20 +2546,19 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi", "libc", "windows-sys 0.48.0", ] [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", + "hermit-abi", + "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -2595,9 +2626,9 @@ dependencies = [ [[package]] name = "kqueue" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8fc60ba15bf51257aa9807a48a61013db043fcf3a78cb0d916e8e396dcad98" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" dependencies = [ "kqueue-sys", "libc", @@ -2605,9 +2636,9 @@ dependencies = [ [[package]] name = "kqueue-sys" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" dependencies = [ "bitflags 1.3.2", "libc", @@ -2636,16 +2667,17 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1562a80245d9d8058e11603e34d0b2e234f20805" +source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" dependencies = [ "apply", + "ashpd", "cosmic-config", "cosmic-theme", "derive_setters", @@ -2663,9 +2695,12 @@ dependencies = [ "lazy_static", "palette", "slotmap", - "smithay-client-toolkit 0.17.0", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", + "thiserror", "tokio", "tracing", + "unicode-segmentation", + "url", ] [[package]] @@ -2710,6 +2745,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" + [[package]] name = "litemap" version = "0.7.0" @@ -2741,17 +2782,17 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" -version = "0.9.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.0", ] [[package]] @@ -2765,9 +2806,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memmap2" @@ -2778,6 +2819,24 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" +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" @@ -2825,15 +2884,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -2864,15 +2914,15 @@ checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b" [[package]] name = "naga" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80cd00bd6180a8790f1c020ed258a46b8d73dd5bd6af104a238c9d71f806938e" +checksum = "bbcc2e0513220fd2b598e6068608d4462db20322c0e77e47f6f488dfcfc279cb" dependencies = [ "bit-set", "bitflags 1.3.2", "codespan-reporting", "hexf-parse", - "indexmap", + "indexmap 1.9.3", "log", "num-traits", "rustc-hash", @@ -2989,16 +3039,15 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", "pin-utils", - "static_assertions", ] [[package]] @@ -3013,20 +3062,21 @@ dependencies = [ [[package]] name = "notify" -version = "6.0.1" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5738a2795d57ea20abec2d6d76c6081186709c0024187cd5977265eda6598b51" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "crossbeam-channel", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", + "log", "mio", "walkdir", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -3050,9 +3100,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint", "num-complex", @@ -3064,9 +3114,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -3075,9 +3125,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -3117,20 +3167,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -3196,9 +3246,9 @@ dependencies = [ [[package]] name = "object" -version = "0.30.4" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -3237,49 +3287,26 @@ dependencies = [ [[package]] name = "ouroboros" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f357ef82d1b4db66fbed0b8d542cbd3c22d0bf5b393b3c257b9ba4568e70c9c3" -dependencies = [ - "aliasable", - "ouroboros_macro 0.13.0", - "stable_deref_trait", -] - -[[package]] -name = "ouroboros" -version = "0.15.6" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" +checksum = "e2ba07320d39dfea882faa70554b4bd342a5f273ed59ba7c1c6b4c840492c954" dependencies = [ "aliasable", - "ouroboros_macro 0.15.6", -] - -[[package]] -name = "ouroboros_macro" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44a0b52c2cbaef7dffa5fec1a43274afe8bd2a644fa9fc50a9ef4ff0269b1257" -dependencies = [ - "Inflector", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "ouroboros_macro", + "static_assertions", ] [[package]] name = "ouroboros_macro" -version = "0.15.6" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" +checksum = "ec4c6225c69b4ca778c0aea097321a64c421cf4577b331c61b229267edabb6f8" dependencies = [ - "Inflector", + "heck", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] @@ -3296,9 +3323,9 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "palette" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1641aee47803391405d0a1250e837d2336fdddd18b27f3ddb8c1d80ce8d7f43" +checksum = "b2e2f34147767aa758aa649415b50a69eeb46a67f9dc7db8011eeb3d84b351dc" dependencies = [ "approx", "fast-srgb8", @@ -3309,13 +3336,13 @@ dependencies = [ [[package]] name = "palette_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c02bfa6b3ba8af5434fa0531bf5701f750d983d4260acd6867faca51cdc4484" +checksum = "b7db010ec5ff3d4385e4f133916faacd9dad0f6a09394c92d825b3aed310fa0a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -3369,7 +3396,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -3408,7 +3435,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -3428,29 +3455,29 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -3466,15 +3493,15 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "png" -version = "0.17.9" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" dependencies = [ "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -3506,7 +3533,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", ] [[package]] @@ -3535,18 +3562,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] [[package]] name = "profiling" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332cd62e95873ea4f41f3dfd6bbbfc5b52aec892d7e8d534197c4720a0bbbab2" +checksum = "f89dff0959d98c9758c88826cc002e2c3d0b9dfac4139711d1f30de442f1139b" [[package]] name = "qoi" @@ -3568,9 +3595,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -3613,9 +3640,9 @@ checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" [[package]] name = "rangemap" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9283c6b06096b47afc7109834fdedab891175bb5241ee5d4f7d2546549f263" +checksum = "977b1e897f9d764566891689e642653e5ed90c6895106acd005eb4c1d0203991" [[package]] name = "raw-window-handle" @@ -3691,9 +3718,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -3702,9 +3741,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "renderdoc-sys" @@ -3714,9 +3753,9 @@ checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b" [[package]] name = "resvg" -version = "0.32.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142e83d8ae8c8c639f304698a5567b229ba65caba867bf4387bbc0ae158827cf" +checksum = "b6554f47c38eca56827eea7f285c2a3018b4e12e0e195cc105833c008be338f1" dependencies = [ "gif", "jpeg-decoder", @@ -3724,9 +3763,8 @@ dependencies = [ "pico-args", "png", "rgb", - "svgfilters", "svgtypes", - "tiny-skia 0.9.1", + "tiny-skia 0.10.0", "usvg", ] @@ -3741,26 +3779,14 @@ dependencies = [ [[package]] name = "ron" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300a51053b1cb55c80b7a9fde4120726ddf25ca241a1cbb926626f62fb136bff" +checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", + "base64", + "bitflags 2.4.0", "serde", -] - -[[package]] -name = "rosvgtree" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad747e7384940e7bf33b15ba433b7bad9f44c0c6d5287a67c2cb22cd1743d497" -dependencies = [ - "log", - "roxmltree", - "simplecss", - "siphasher", - "svgtypes", + "serde_derive", ] [[package]] @@ -3774,9 +3800,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "6.7.0" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73e721f488c353141288f223b599b4ae9303ecf3e62923f40a492f0634a4dc3" +checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -3785,22 +3811,22 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "6.6.0" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22ce362f5561923889196595504317a4372b84210e6e335da529a65ea5452b5" +checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.28", + "syn 2.0.37", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "7.5.0" +version = "7.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" +checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" dependencies = [ "sha2", "walkdir", @@ -3830,35 +3856,64 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.37.20" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.7", "windows-sys 0.48.0", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rustybuzz" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "162bdf42e261bee271b3957691018634488084ef577dddeb6420a9684cab2a6a" +dependencies = [ + "bitflags 1.3.2", + "bytemuck", + "smallvec", + "ttf-parser 0.18.1", + "unicode-bidi-mirroring", + "unicode-ccc", + "unicode-general-category", + "unicode-script", +] + +[[package]] +name = "rustybuzz" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82eea22c8f56965eeaf3a209b3d24508256c7b920fb3b6211b8ba0f7c0583250" dependencies = [ "bitflags 1.3.2", "bytemuck", "libm", "smallvec", - "ttf-parser", + "ttf-parser 0.19.2", "unicode-bidi-mirroring", "unicode-ccc", "unicode-general-category", @@ -3891,9 +3946,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" @@ -3903,7 +3958,7 @@ checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" dependencies = [ "crossfont", "log", - "smithay-client-toolkit 0.16.0", + "smithay-client-toolkit 0.16.1", "tiny-skia 0.7.0", ] @@ -3915,33 +3970,33 @@ checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af" [[package]] name = "serde" -version = "1.0.180" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -4007,9 +4062,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -4026,9 +4081,9 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "simplecss" @@ -4041,15 +4096,15 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -4065,22 +4120,22 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "smithay-client-toolkit" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" dependencies = [ "bitflags 1.3.2", "calloop", "dlib", "lazy_static", "log", - "memmap2", + "memmap2 0.5.10", "nix 0.24.3", "pkg-config", "wayland-client 0.29.5", @@ -4099,14 +4154,38 @@ dependencies = [ "dlib", "lazy_static", "log", - "memmap2", - "nix 0.26.2", + "memmap2 0.5.10", + "nix 0.26.4", + "pkg-config", + "thiserror", + "wayland-backend", + "wayland-client 0.30.2", + "wayland-cursor 0.30.0", + "wayland-protocols 0.30.1", + "wayland-protocols-wlr", + "wayland-scanner 0.30.1", + "xkbcommon", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.17.0" +source = "git+https://github.com/smithay/client-toolkit?rev=c9940f4#c9940f4167f0d81cc26f77b7eeef6a34068a90a5" +dependencies = [ + "bitflags 1.3.2", + "calloop", + "cursor-icon", + "dlib", + "log", + "memmap2 0.5.10", + "nix 0.26.4", "pkg-config", "thiserror", "wayland-backend", "wayland-client 0.30.2", + "wayland-csd-frame", "wayland-cursor 0.30.0", - "wayland-protocols 0.30.0", + "wayland-protocols 0.30.1", "wayland-protocols-wlr", "wayland-scanner 0.30.1", "xkbcommon", @@ -4118,7 +4197,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" dependencies = [ - "smithay-client-toolkit 0.16.0", + "smithay-client-toolkit 0.16.1", "wayland-client 0.29.5", ] @@ -4132,6 +4211,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "softbuffer" version = "0.2.0" @@ -4141,10 +4230,10 @@ dependencies = [ "cfg_aliases", "cocoa", "core-graphics", - "fastrand", + "fastrand 1.9.0", "foreign-types 0.3.2", "log", - "nix 0.26.2", + "nix 0.26.4", "objc", "raw-window-handle 0.5.2", "redox_syscall 0.3.5", @@ -4217,16 +4306,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2" -[[package]] -name = "svgfilters" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639abcebc15fdc2df179f37d6f5463d660c1c79cd552c12343a4600827a04bce" -dependencies = [ - "float-cmp", - "rgb", -] - [[package]] name = "svgtypes" version = "0.11.0" @@ -4260,9 +4339,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -4283,19 +4362,18 @@ dependencies = [ [[package]] name = "sys-locale" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0b9eefabb91675082b41eb94c3ecd91af7656caee3fb4961a07c0ec8c7ca6f" +checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" dependencies = [ "libc", - "windows-sys 0.45.0", ] [[package]] name = "sysinfo" -version = "0.29.2" +version = "0.29.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557d0845b86eea8182f7b10dff120214fb6cd9fd937b6f4917714e546a38695" +checksum = "0a18d114d420ada3a891e6bc8e96a2023402203296a47cdd65083377dad18ba5" dependencies = [ "cfg-if", "core-foundation-sys", @@ -4314,45 +4392,44 @@ checksum = "af547b166dd1ea4b472165569fc456cfb6818116f854690b0ff205e636523dab" [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if", - "fastrand", + "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix", + "rustix 0.38.13", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -4367,9 +4444,9 @@ dependencies = [ [[package]] name = "tiff" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" +checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211" dependencies = [ "flate2", "jpeg-decoder", @@ -4402,9 +4479,9 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2986c82f77818c7b9144c70818fdde98db15308e329ae2f7204d767808fd3c" +checksum = "7db11798945fa5c3e5490c794ccca7c6de86d3afdd54b4eb324109939c6f37bc" dependencies = [ "arrayref", "arrayvec 0.7.4", @@ -4412,7 +4489,7 @@ dependencies = [ "cfg-if", "log", "png", - "tiny-skia-path 0.9.0", + "tiny-skia-path 0.10.0", ] [[package]] @@ -4427,9 +4504,9 @@ dependencies = [ [[package]] name = "tiny-skia-path" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7acb0ccda1ac91084353a56d0b69b0e29c311fd809d2088b1ed2f9ae1841c47" +checksum = "2f60aa35c89ac2687ace1a2556eaaea68e8c0d47408a2e3e7f5c98a489e7281c" dependencies = [ "arrayref", "bytemuck", @@ -4463,18 +4540,18 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.4", "tracing", "windows-sys 0.48.0", ] @@ -4490,14 +4567,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +checksum = "c226a7bba6d859b63c92c4b4fe69c5b6b72d0cb897dbc8e6012298e6154cb56e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.20.0", ] [[package]] @@ -4511,11 +4588,22 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.8" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.0.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +checksum = "8ff63e60a958cefbb518ae1fd6566af80d9d4be430a33f3723dfc47d1d411d95" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -4542,7 +4630,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", ] [[package]] @@ -4596,6 +4684,12 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0609f771ad9c6155384897e1df4d948e692667cc0588548b68eb44d052b27633" +[[package]] +name = "ttf-parser" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" + [[package]] name = "twox-hash" version = "1.6.3" @@ -4618,9 +4712,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "udev" @@ -4688,19 +4782,15 @@ checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-linebreak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137" -dependencies = [ - "hashbrown 0.12.3", - "regex", -] +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-normalization" @@ -4743,22 +4833,23 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] name = "usvg" -version = "0.32.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b44e14b7678bcc5947b397991432d0c4e02a103958a0ed5e1b9b961ddd08b21" +checksum = "14d09ddfb0d93bf84824c09336d32e42f80961a9d1680832eb24fdf249ce11e6" dependencies = [ - "base64 0.21.2", + "base64", "log", "pico-args", "usvg-parser", @@ -4769,31 +4860,32 @@ dependencies = [ [[package]] name = "usvg-parser" -version = "0.32.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90c8251d965c2882a636ffcc054340b1f13a6bce68779cb5b2084d8ffc2535be" +checksum = "d19bf93d230813599927d88557014e0908ecc3531666d47c634c6838bc8db408" dependencies = [ "data-url", "flate2", "imagesize", "kurbo", "log", - "rosvgtree", - "strict-num", + "roxmltree", + "simplecss", + "siphasher", "svgtypes", "usvg-tree", ] [[package]] name = "usvg-text-layout" -version = "0.32.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c4fed019d1af07bfe0f3bac13d120d7b51bc65b38cb24809cf4ed0b8b631138" +checksum = "035044604e89652c0a2959b8b356946997a52649ba6cade45928c2842376feb4" dependencies = [ "fontdb", "kurbo", "log", - "rustybuzz", + "rustybuzz 0.7.0", "unicode-bidi", "unicode-script", "unicode-vo", @@ -4802,14 +4894,14 @@ dependencies = [ [[package]] name = "usvg-tree" -version = "0.32.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7371265c467cdae0ccc3655e2e3f310c695fb9f717c0d25187bf3b333f7b5159" +checksum = "7939a7e4ed21cadb5d311d6339730681c3e24c3e81d60065be80e485d3fc8b92" dependencies = [ - "kurbo", "rctree", "strict-num", "svgtypes", + "tiny-skia-path 0.10.0", ] [[package]] @@ -4844,9 +4936,9 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -4879,7 +4971,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -4913,7 +5005,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4948,7 +5040,7 @@ dependencies = [ "cc", "downcast-rs", "io-lifetimes", - "nix 0.26.2", + "nix 0.26.4", "scoped-tls", "smallvec", "wayland-sys 0.30.1", @@ -4978,7 +5070,7 @@ checksum = "489c9654770f674fc7e266b3c579f4053d7551df0ceb392f153adb1f9ed06ac8" dependencies = [ "bitflags 1.3.2", "calloop", - "nix 0.26.2", + "nix 0.26.4", "wayland-backend", "wayland-scanner 0.30.1", ] @@ -4995,6 +5087,17 @@ dependencies = [ "wayland-sys 0.29.5", ] +[[package]] +name = "wayland-csd-frame" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72191e30290b83491325d32c1327be7f45459c97263d9d48494c81efc9328116" +dependencies = [ + "bitflags 2.4.0", + "cursor-icon", + "wayland-backend", +] + [[package]] name = "wayland-cursor" version = "0.29.5" @@ -5012,7 +5115,7 @@ version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d0c3a0d5b4b688b07b0442362d3ed6bf04724fcc16cd69ab6285b90dbc487aa" dependencies = [ - "nix 0.26.2", + "nix 0.26.4", "wayland-client 0.30.2", "xcursor", ] @@ -5031,9 +5134,9 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fefbeb8a360abe67ab7c2efe1d297a1a50ee011f5460791bc18870c26bb84e2" +checksum = "3b28101e5ca94f70461a6c2d610f76d85ad223d042dd76585ab23d3422dd9b4d" dependencies = [ "bitflags 1.3.2", "wayland-backend", @@ -5051,7 +5154,7 @@ dependencies = [ "bitflags 1.3.2", "wayland-backend", "wayland-client 0.30.2", - "wayland-protocols 0.30.0", + "wayland-protocols 0.30.1", "wayland-scanner 0.30.1", "wayland-server", ] @@ -5087,7 +5190,7 @@ dependencies = [ "bitflags 1.3.2", "downcast-rs", "io-lifetimes", - "nix 0.26.2", + "nix 0.26.4", "wayland-backend", "wayland-scanner 0.30.1", ] @@ -5133,9 +5236,9 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] name = "wgpu" -version = "0.16.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3059ea4ddec41ca14f356833e2af65e7e38c0a8f91273867ed526fb9bafcca95" +checksum = "480c965c9306872eb6255fa55e4b4953be55a8b64d57e61d7ff840d3dcc051cd" dependencies = [ "arrayvec 0.7.4", "cfg-if", @@ -5163,7 +5266,7 @@ checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" dependencies = [ "arrayvec 0.7.4", "bit-vec", - "bitflags 2.3.2", + "bitflags 2.4.0", "codespan-reporting", "log", "naga", @@ -5180,15 +5283,15 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74851c2c8e5d97652e74c241d41b0656b31c924a45dcdecde83975717362cfa4" +checksum = "1ecb3258078e936deee14fd4e0febe1cfe9bbb5ffef165cb60218d2ee5eb4448" dependencies = [ "android_system_properties", "arrayvec 0.7.4", "ash", "bit-set", - "bitflags 2.3.2", + "bitflags 2.4.0", "block", "core-graphics-types", "d3d12", @@ -5222,11 +5325,11 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd33a976130f03dcdcd39b3810c0c3fc05daf86f0aaf867db14bfb7c4a9a32b" +checksum = "d0c153280bb108c2979eb5c7391cb18c56642dd3c072e55f52065e13e2a1252a" dependencies = [ - "bitflags 2.3.2", + "bitflags 2.4.0", "js-sys", "web-sys", ] @@ -5306,7 +5409,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -5337,22 +5440,13 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -5372,17 +5466,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -5393,9 +5487,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -5411,9 +5505,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -5429,9 +5523,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -5447,9 +5541,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -5465,9 +5559,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -5477,9 +5571,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -5495,9 +5589,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winit" @@ -5522,7 +5616,7 @@ dependencies = [ "raw-window-handle 0.4.3", "raw-window-handle 0.5.2", "sctk-adwaita", - "smithay-client-toolkit 0.16.0", + "smithay-client-toolkit 0.16.1", "wasm-bindgen", "wayland-client 0.29.5", "wayland-protocols 0.29.5", @@ -5533,9 +5627,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.4.1" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -5614,12 +5708,9 @@ dependencies = [ [[package]] name = "xdg" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688597db5a750e9cad4511cb94729a078e274308099a0382b5b8203bbc767fee" -dependencies = [ - "home", -] +checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] name = "xdg-home" @@ -5627,14 +5718,14 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" dependencies = [ - "nix 0.26.2", + "nix 0.26.4", "winapi", ] [[package]] name = "xdg-shell-wrapper-config" version = "0.1.0" -source = "git+https://github.com/pop-os/xdg-shell-wrapper#39880a3cf2a11ea969616d8b961289519bbeb742" +source = "git+https://github.com/pop-os/xdg-shell-wrapper#652888ce7a591fb6b03b4d9f215e5bf0a1c8e629" dependencies = [ "serde", "wayland-protocols-wlr", @@ -5642,19 +5733,19 @@ dependencies = [ [[package]] name = "xkbcommon" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbee136714379ab22da0280207fdb7f47e0bb940adea97731b65598b8c7a92e" +checksum = "52db25b599e92bf6e3904134618728eeb7b49a5a4f38f107f92399bb9c496b88" dependencies = [ "libc", - "memmap2", + "memmap2 0.7.1", ] [[package]] name = "xml-rs" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52839dc911083a8ef63efa4d039d1f58b5e409f923e44c80828f206f66e5541c" +checksum = "bab77e97b50aee93da431f2cee7cd0f43b4d1da3c408042f2d7d164187774f0a" [[package]] name = "xmlparser" @@ -5700,9 +5791,9 @@ dependencies = [ [[package]] name = "zbus" -version = "3.13.1" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c3d77c9966c28321f1907f0b6c5a5561189d1f7311eea6d94180c6be9daab29" +checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" dependencies = [ "async-broadcast", "async-executor", @@ -5713,6 +5804,7 @@ dependencies = [ "async-recursion", "async-task", "async-trait", + "blocking", "byteorder", "derivative", "enumflags2", @@ -5721,7 +5813,7 @@ dependencies = [ "futures-sink", "futures-util", "hex", - "nix 0.26.2", + "nix 0.26.4", "once_cell", "ordered-stream", "rand", @@ -5741,24 +5833,23 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.13.1" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e341d12edaff644e539ccbbf7f161601294c9a84ed3d7e015da33155b435af" +checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "regex", "syn 1.0.109", - "winnow", "zvariant_utils", ] [[package]] name = "zbus_names" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82441e6033be0a741157a72951a3e4957d519698f3a824439cc131c5ba77ac2a" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" dependencies = [ "serde", "static_assertions", @@ -5826,23 +5917,24 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622cc473f10cef1b0d73b7b34a266be30ebdcfaea40ec297dd8cbda088f9f93c" +checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" dependencies = [ "byteorder", "enumflags2", "libc", "serde", "static_assertions", + "url", "zvariant_derive", ] [[package]] name = "zvariant_derive" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d9c1b57352c25b778257c661f3c4744b7cefb7fc09dd46909a153cce7773da2" +checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" dependencies = [ "proc-macro-crate", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 6199186c..3dcd12ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,6 @@ git = "https://github.com/pop-os/libcosmic" [workspace.dependencies.libcosmic] git = "https://github.com/pop-os/libcosmic" -default-features = false features = ["debug", "wayland", "tokio"] [workspace.dependencies.cosmic-config] @@ -24,10 +23,10 @@ git = "https://github.com/pop-os/cosmic-comp" git = "https://github.com/pop-os/cosmic-panel" [patch."https://github.com/pop-os/libcosmic"] -# libcosmic = { path = "../libcosmic" } -# cosmic-config = { path = "../libcosmic/cosmic-config" } -# libcosmic = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "flexalloc" } -# cosmic-config = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "flexalloc" } +# libcosmic = { path = "../../libcosmic" } +# cosmic-config = { path = "../../libcosmic/cosmic-config" } +# libcosmic = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "improv" } +# cosmic-config = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "improv" } [profile.release] opt-level = 3 diff --git a/app/src/app.rs b/app/src/app.rs index 7a545724..5db41bd6 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -1,159 +1,96 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -use apply::Apply; - -use cosmic_panel_config::CosmicPanelConfig; -use cosmic_settings_page::{self as page, section}; - +use cosmic::iced::Subscription; use cosmic::{ + app::{Command, Core}, cosmic_config::config_subscription, - iced::{ - self, - event::wayland::{self, WindowEvent, WindowState}, - event::PlatformSpecific, - subscription, window, Application, Color, Command, Length, Subscription, - }, - iced::{ - widget::{self, column, container, horizontal_space, row}, - window::Mode, - }, - iced_sctk::commands::window::{set_mode_window, start_drag_window}, - iced_style::application, - keyboard_nav, - theme::{self, theme_subscription, Theme}, + iced::{self, event::wayland, event::PlatformSpecific, subscription, window, Length}, + prelude::*, widget::{ - header_bar, nav_bar, nav_bar_toggle, scrollable, search, segmented_button, settings, - IconSource, + column, container, icon, nav_bar, navigation, scrollable, search, segmented_button, + settings, }, - Element, ElementExt, + Element, }; -use page::Page; - -use crate::{ - config::Config, - pages::{ - desktop::{ - self, - dock::{self, applets::ADD_DOCK_APPLET_DIALOGUE_ID}, - panel::{ - self, - applets_inner::{self, AppletsPage, APPLET_DND_ICON_ID}, - inner as _panel, - }, - }, - input::{self, keyboard}, - sound, system, time, +use cosmic_panel_config::CosmicPanelConfig; +use cosmic_settings_page::{self as page, section}; + +use crate::config::Config; + +use crate::pages::desktop::{ + self, + dock::{self, applets::ADD_DOCK_APPLET_DIALOGUE_ID}, + panel::{ + self, + applets_inner::{self, AppletsPage, APPLET_DND_ICON_ID}, + inner as _panel, }, - subscription::desktop_files, - widget::{page_title, parent_page_button, search_header, sub_page_button}, }; - -use std::{borrow::Cow, process}; +use crate::pages::input::{self, keyboard}; +use crate::pages::{sound, system, time}; +use crate::subscription::desktop_files; +use crate::widget::{page_title, search_header}; +use std::borrow::Cow; #[allow(clippy::struct_excessive_bools)] #[allow(clippy::module_name_repetitions)] pub struct SettingsApp { - pub active_page: page::Entity, - pub config: Config, - pub debug: bool, - pub nav_bar_toggled_condensed: bool, - pub nav_bar_toggled: bool, - pub nav_bar: segmented_button::SingleSelectModel, - pub pages: page::Binder, - pub scaling_factor: f32, - pub search: search::Model, - pub search_selections: Vec<(page::Entity, section::Entity)>, - pub show_maximize: bool, - pub sharp_corners: bool, - pub show_minimize: bool, - pub theme: Theme, - pub title: String, - pub window_width: u32, + active_page: page::Entity, + config: Config, + core: Core, + nav_model: nav_bar::Model, + pages: page::Binder, + search: search::Model, + search_selections: Vec<(page::Entity, section::Entity)>, } #[allow(dead_code)] #[derive(Clone, Debug)] pub enum Message { - Close, - Drag, - KeyboardNav(keyboard_nav::Message), - Maximize, - Minimize, - NavBar(segmented_button::Entity), - None, + DesktopInfo, Page(page::Entity), PageMessage(crate::pages::Message), - Search(search::Message), - ToggleNavBar, - ToggleNavBarCondensed, - WindowResize(u32, u32), - WindowState(WindowState), PanelConfig(CosmicPanelConfig), - DesktopInfo, - ThemeChanged(Theme), + Search(search::Message), + SetWindowTitle, } -impl Application for SettingsApp { +impl cosmic::Application for SettingsApp { type Executor = cosmic::executor::single::Executor; type Flags = (); type Message = Message; - type Theme = Theme; - fn new(_: Self::Flags) -> (Self, Command) { + const APP_ID: &'static str = "com.system76.CosmicSettings"; + + fn core(&self) -> &Core { + &self.core + } + + fn core_mut(&mut self) -> &mut Core { + &mut self.core + } + + fn init(core: Core, _flags: Self::Flags) -> (Self, Command) { let mut app = SettingsApp { - sharp_corners: false, active_page: page::Entity::default(), config: Config::new(), - debug: false, - nav_bar: segmented_button::Model::default(), - nav_bar_toggled: true, - nav_bar_toggled_condensed: false, + core, + nav_model: nav_bar::Model::default(), pages: page::Binder::default(), - title: crate::fl!("app"), - scaling_factor: std::env::var("COSMIC_SCALE") - .ok() - .and_then(|scale| scale.parse::().ok()) - .unwrap_or(1.0), search: search::Model::default(), search_selections: Vec::default(), - show_maximize: true, - show_minimize: true, - window_width: 0, - theme: cosmic::theme::theme(), }; - // app.insert_page::(); - // app.insert_page::(); - // app.insert_page::(); - let desktop_id = app.insert_page::().id(); - // app.insert_page::(); - // app.insert_page::(); - - // app.insert_page::(); - - // app.insert_page::(); - // app.insert_page::(); - app.insert_page::(); - - // app.insert_page::(); - // app.insert_page::(); - app.insert_page::(); app.insert_page::(); - - // app.insert_page::(); - // app.insert_page::(); - // app.insert_page::(); let active_id = app .pages - .info - .iter() - .find(|(_id, info)| info.id == *app.config.active_page) + .find_page_by_id(&app.config.active_page) .map_or(desktop_id, |(id, _info)| id); let command = app.activate_page(active_id); @@ -161,19 +98,49 @@ impl Application for SettingsApp { (app, command) } - fn title(&self) -> String { - self.title.clone() + fn nav_model(&self) -> Option<&nav_bar::Model> { + Some(&self.nav_model) + } + + fn on_close_requested(&self, id: window::Id) -> Option { + let message = if id == applets_inner::ADD_PANEL_APPLET_DIALOGUE_ID { + Message::PageMessage(crate::pages::Message::PanelApplet( + applets_inner::Message::ClosedAppletDialogue, + )) + } else if id == ADD_DOCK_APPLET_DIALOGUE_ID { + Message::PageMessage(crate::pages::Message::DockApplet(dock::applets::Message( + applets_inner::Message::ClosedAppletDialogue, + ))) + } else { + return None; + }; + + Some(message) + } + + fn on_escape(&mut self) -> Command { + if self.search.is_active() { + self.search.state = search::State::Inactive; + self.search_clear(); + } + + Command::none() + } + + fn on_nav_select(&mut self, id: nav_bar::Id) -> Command { + if let Some(page) = self.nav_model.data::(id).copied() { + return self.activate_page(page); + } + + Command::none() + } + + fn on_search(&mut self) -> Command { + self.search.focus() } fn subscription(&self) -> Subscription { let window_break = subscription::events_with(|event, _| match event { - iced::Event::Window(_window_id, window::Event::Resized { width, height }) => { - Some(Message::WindowResize(width, height)) - } - iced::Event::PlatformSpecific(PlatformSpecific::Wayland(wayland::Event::Window( - WindowEvent::State(s), - .., - ))) => Some(Message::WindowState(s)), iced::Event::PlatformSpecific(PlatformSpecific::Wayland(wayland::Event::Output( wayland::OutputEvent::Created(Some(info)), o, @@ -191,7 +158,6 @@ impl Application for SettingsApp { Subscription::batch(vec![ window_break, - keyboard_nav::subscription().map(Message::KeyboardNav), desktop_files(0).map(|_| Message::DesktopInfo), config_subscription(0, "com.system76.CosmicPanel.Panel".into(), 1).map( |(_, e)| match e { @@ -215,64 +181,28 @@ impl Application for SettingsApp { } }, ), - theme_subscription(0).map(Message::ThemeChanged), ]) } #[allow(clippy::too_many_lines)] - fn update(&mut self, message: Message) -> iced::Command { - let mut ret = Command::none(); + fn update(&mut self, message: Message) -> Command { match message { - Message::WindowResize(_width, _height) => {} - Message::KeyboardNav(message) => match message { - keyboard_nav::Message::Unfocus => ret = keyboard_nav::unfocus(), - keyboard_nav::Message::FocusNext => ret = widget::focus_next(), - keyboard_nav::Message::FocusPrevious => ret = widget::focus_previous(), - keyboard_nav::Message::Escape => { - if self.search.is_active() { - self.search.state = search::State::Inactive; - self.search_clear(); - } - } - keyboard_nav::Message::Search => { - return self.search.focus(); - } - }, - Message::Page(page) => { - return self.activate_page(page); - } - Message::Drag => return start_drag_window(window::Id(0)), - Message::Close => { - process::exit(0); - } - Message::Minimize => return set_mode_window(window::Id(0), Mode::Hidden), - Message::Maximize => { - if self.sharp_corners { - self.sharp_corners = false; - return set_mode_window(window::Id(0), Mode::Windowed); - } + Message::Page(page) => return self.activate_page(page), + + Message::SetWindowTitle => return self.set_window_title(), - self.sharp_corners = true; - return set_mode_window(window::Id(0), Mode::Fullscreen); - } - Message::NavBar(key) => { - if let Some(page) = self.nav_bar.data::(key).copied() { - return self.activate_page(page); - } - } - Message::ToggleNavBar => self.nav_bar_toggled = !self.nav_bar_toggled, - Message::ToggleNavBarCondensed => { - self.nav_bar_toggled_condensed = !self.nav_bar_toggled_condensed; - } Message::Search(search::Message::Activate) => { return self.search.focus(); } + Message::Search(search::Message::Changed(phrase)) => { self.search_changed(phrase); } + Message::Search(search::Message::Clear) => { self.search_clear(); } + Message::PageMessage(message) => match message { crate::pages::Message::About(message) => { page::update!(self.pages, message, system::about::Page); @@ -288,7 +218,7 @@ impl Application for SettingsApp { } crate::pages::Message::Input(message) => { if let Some(page) = self.pages.page_mut::() { - return page.update(message); + return page.update(message).map(cosmic::app::Message::App); } } crate::pages::Message::External { .. } => { @@ -302,7 +232,9 @@ impl Application for SettingsApp { } crate::pages::Message::PanelApplet(message) => { if let Some(page) = self.pages.page_mut::() { - return page.update(message, applets_inner::ADD_PANEL_APPLET_DIALOGUE_ID); + return page + .update(message, applets_inner::ADD_PANEL_APPLET_DIALOGUE_ID) + .map(cosmic::app::Message::App); } } crate::pages::Message::Dock(message) => { @@ -310,13 +242,11 @@ impl Application for SettingsApp { } crate::pages::Message::DockApplet(message) => { if let Some(page) = self.pages.page_mut::() { - return page.update(message); + return page.update(message).map(cosmic::app::Message::App); } } }, - Message::WindowState(state) => { - self.sharp_corners = matches!(state, WindowState::Activated); - } + Message::PanelConfig(config) if config.name.to_lowercase().contains("panel") => { page::update!( self.pages, @@ -325,12 +255,15 @@ impl Application for SettingsApp { ); if let Some(page) = self.pages.page_mut::() { - return page.update( - applets_inner::Message::PanelConfig(config), - applets_inner::ADD_PANEL_APPLET_DIALOGUE_ID, - ); + return page + .update( + applets_inner::Message::PanelConfig(config), + applets_inner::ADD_PANEL_APPLET_DIALOGUE_ID, + ) + .map(cosmic::app::Message::App); } } + Message::PanelConfig(config) if config.name.to_lowercase().contains("dock") => { page::update!( self.pages, @@ -343,6 +276,7 @@ impl Application for SettingsApp { dock::applets::Page ); } + Message::DesktopInfo => { let info_list: Vec<_> = freedesktop_desktop_entry::Iter::new( freedesktop_desktop_entry::default_paths(), @@ -356,22 +290,45 @@ impl Application for SettingsApp { dock::applets::Page ); if let Some(page) = self.pages.page_mut::() { - return page.update( - applets_inner::Message::Applets(info_list), - applets_inner::ADD_PANEL_APPLET_DIALOGUE_ID, - ); + return page + .update( + applets_inner::Message::Applets(info_list), + applets_inner::ADD_PANEL_APPLET_DIALOGUE_ID, + ) + .map(cosmic::app::Message::App); } } - Message::ThemeChanged(theme) => { - self.theme = theme; - } - Message::PanelConfig(_) | Message::None | Message::Search(_) => {} // Ignored + + Message::PanelConfig(_) | Message::Search(_) => {} // Ignored } - ret + + Command::none() + } + + fn view(&self) -> Element { + let page_view = if self.search.is_active() { + self.search_view() + } else if let Some(content) = self.pages.content(self.active_page) { + self.page_view(content) + } else if let Some(sub_pages) = self.pages.sub_pages(self.active_page) { + self.sub_page_view(sub_pages) + } else { + panic!("page without sub-pages or content"); + }; + + container(page_view) + .max_width(800) + .width(Length::Fill) + .apply(container) + .center_x() + .padding([0, 64]) + .width(Length::Fill) + .apply(scrollable) + .into() } #[allow(clippy::too_many_lines)] - fn view(&self, id: window::Id) -> Element { + fn view_window(&self, id: window::Id) -> Element { if let Some(Some(page)) = (id == APPLET_DND_ICON_ID).then(|| self.pages.page::()) { @@ -400,129 +357,13 @@ impl Application for SettingsApp { return page.special_character_key_view(); } - cosmic::iced::widget::responsive(|size| { - let is_condensed = (600.0 * self.scaling_factor) > size.width; - let narrow_navbar = (700.0 * self.scaling_factor) > size.width; - - let (nav_bar_message, nav_bar_toggled) = if is_condensed { - ( - Message::ToggleNavBarCondensed, - self.nav_bar_toggled_condensed, - ) - } else { - (Message::ToggleNavBar, self.nav_bar_toggled) - }; - - let mut header = header_bar() - .title("") - .on_close(Message::Close) - .on_drag(Message::Drag) - .start( - iced::widget::row!( - nav_bar_toggle() - .on_nav_bar_toggled(nav_bar_message) - .nav_bar_active(nav_bar_toggled), - search::search(&self.search, Message::Search) - ) - .align_items(iced::Alignment::Center) - .into(), - ); - - if self.show_maximize { - header = header.on_maximize(Message::Maximize); - } - - if self.show_minimize { - header = header.on_minimize(Message::Minimize); - } - - let header = Into::>::into(header).debug(self.debug); - - let mut widgets = Vec::with_capacity(2); - - if nav_bar_toggled { - let mut nav_bar = nav_bar(&self.nav_bar, Message::NavBar); - - if !is_condensed { - nav_bar = nav_bar.max_width(if narrow_navbar { 200 } else { 300 }); - } - - let nav_bar: Element<_> = nav_bar.into(); - widgets.push(nav_bar.debug(self.debug)); - } - - if !(is_condensed && nav_bar_toggled) { - widgets.push( - scrollable(row![ - horizontal_space(Length::Fill), - (if self.search.is_active() { - self.search_view() - } else if let Some(content) = self.pages.content(self.active_page) { - self.page_view(content) - } else if let Some(sub_pages) = self.pages.sub_pages(self.active_page) { - self.sub_page_view(sub_pages) - } else { - panic!("page without sub-pages or content"); - }) - .debug(self.debug), - horizontal_space(Length::Fill), - ]) - .into(), - ); - } - - let content = container(row(widgets).spacing(8)) - .padding([0, 8, 8, 8]) - .width(Length::Fill) - .height(Length::Fill) - .style(theme::Container::Background) - .into(); - - column(vec![header, content]).into() - }) - .into() - } - - fn theme(&self) -> Theme { - self.theme.clone() - } - - fn scale_factor(&self) -> f64 { - self.scaling_factor as f64 - } - - fn close_requested(&self, id: window::Id) -> Self::Message { - if id == window::Id(0) { - Message::Close - } else if id == applets_inner::ADD_PANEL_APPLET_DIALOGUE_ID { - Message::PageMessage(crate::pages::Message::PanelApplet( - applets_inner::Message::ClosedAppletDialogue, - )) - } else if id == ADD_DOCK_APPLET_DIALOGUE_ID { - Message::PageMessage(crate::pages::Message::DockApplet(dock::applets::Message( - applets_inner::Message::ClosedAppletDialogue, - ))) - } else { - Message::None - } - } - - fn style(&self) -> ::Style { - if self.sharp_corners { - cosmic::theme::Application::default() - } else { - cosmic::theme::Application::Custom(Box::new(|theme| application::Appearance { - background_color: Color::TRANSPARENT, - text_color: theme.cosmic().on_bg_color().into(), - })) - } + panic!("unknown window ID: {id:?}"); } } impl SettingsApp { /// Activates a page. fn activate_page(&mut self, page: page::Entity) -> Command { - self.nav_bar_toggled_condensed = false; let current_page = self.active_page; self.active_page = page; @@ -536,10 +377,25 @@ impl SettingsApp { self.search.state = search::State::Inactive; self.activate_navbar(page); - self.pages + let page_command = self + .pages .page_reload(page) - .unwrap_or(Command::none()) + .unwrap_or(iced::Command::none()) .map(Message::PageMessage) + .map(cosmic::app::Message::App); + + Command::batch(vec![ + page_command, + cosmic::command::future(async { Message::SetWindowTitle }) + .map(cosmic::app::Message::App), + ]) + } + + fn set_window_title(&self) -> Command { + cosmic::app::command::set_title(format!( + "{} - COSMIC Settings", + self.pages.info[self.active_page].title + )) } /// Activates the navbar item associated with a page. @@ -549,7 +405,7 @@ impl SettingsApp { } if let Some(nav_id) = self.pages.data(page) { - self.nav_bar.activate(*nav_id); + self.nav_model.activate(*nav_id); } } @@ -569,10 +425,10 @@ impl SettingsApp { fn navbar_insert(&mut self, id: page::Entity) -> segmented_button::SingleSelectEntityMut { let page = &self.pages.info[id]; - self.nav_bar + self.nav_model .insert() .text(page.title.clone()) - .icon(IconSource::from(page.icon_name.clone())) + .icon(icon::from_name(&*page.icon_name).into()) .data(id) .with_id(|nav_id| self.pages.data_set(id, nav_id)) } @@ -583,9 +439,9 @@ impl SettingsApp { let mut column_widgets = Vec::with_capacity(1); if let Some(parent) = page.parent { - column_widgets.push(parent_page_button( - &self.pages.info[parent], - page, + column_widgets.push(navigation::sub_page_header( + page.title.as_str(), + self.pages.info[parent].title.as_str(), Message::Page(parent), )); } @@ -600,10 +456,7 @@ impl SettingsApp { ); } - settings::view_column(column_widgets) - .max_width(683) - .padding(0) - .into() + settings::view_column(column_widgets).padding(0).into() } fn search_changed(&mut self, phrase: String) { @@ -667,18 +520,22 @@ impl SettingsApp { /// Displays the sub-pages view of a page. fn sub_page_view(&self, sub_pages: &[page::Entity]) -> cosmic::Element { - let page = &self.pages.info[self.active_page]; - - let mut column_widgets = Vec::with_capacity(sub_pages.len()); - column_widgets.push(page_title(page)); + let mut page_list = column::with_capacity(sub_pages.len()).spacing(18); for entity in sub_pages.iter().copied() { let sub_page = &self.pages.info[entity]; - column_widgets.push(sub_page_button(entity, sub_page)); + page_list = page_list.push(navigation::page_list_item( + sub_page.title.as_str(), + sub_page.description.as_str(), + &sub_page.icon_name, + entity, + )); } - settings::view_column(column_widgets) - .apply(Element::from) - .map(Message::Page) + column::with_capacity(2) + .push(page_title(&self.pages.info[self.active_page])) + .push(Element::from(page_list).map(Message::Page)) + .spacing(24) + .into() } } diff --git a/app/src/main.rs b/app/src/main.rs index 78feab34..430e682e 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -19,7 +19,7 @@ pub mod widget; pub mod subscription; use cosmic::{ - iced::{wayland::actions::window::SctkWindowSettings, Application, Limits}, + iced::{wayland::actions::window::SctkWindowSettings, Limits}, iced_sctk::settings::InitialSurface, }; use i18n_embed::DesktopLanguageRequester; @@ -38,17 +38,10 @@ pub fn main() -> color_eyre::Result<()> { init_logger(); init_localizer(); - cosmic::settings::set_default_icon_theme("Pop"); - let mut settings = cosmic::settings(); - settings.default_text_size = 14.0; - settings.initial_surface = InitialSurface::XdgWindow(SctkWindowSettings { - title: Some(fl!("app")), - size_limits: Limits::NONE.min_width(400.0).min_height(300.0), - app_id: Some("com.system76.CosmicSettings".to_string()), - ..Default::default() - }); - - SettingsApp::run(settings)?; + let settings = cosmic::app::Settings::default() + .size_limits(Limits::NONE.min_width(400.0).min_height(300.0)); + + cosmic::app::run::(settings, ())?; Ok(()) } diff --git a/app/src/pages/desktop/options.rs b/app/src/pages/desktop/options.rs index 5056328a..afb3ebbf 100644 --- a/app/src/pages/desktop/options.rs +++ b/app/src/pages/desktop/options.rs @@ -4,10 +4,9 @@ use super::Message; use apply::Apply; use cosmic::{ - iced::widget::{button, container, horizontal_space, row}, iced::Length, theme, - widget::{icon, list, settings, toggler}, + widget::{button, container, horizontal_space, icon, list, row, settings, toggler}, Element, }; @@ -117,18 +116,19 @@ pub fn panel_dock_links() -> Section { settings = if let Some((panel_entity, panel_info)) = binder.info.iter().find(|(_, v)| v.id == "panel") { + let control = row::with_children(vec![ + horizontal_space(Length::Fill).into(), + icon::from_name("go-next-symbolic").size(16).into(), + ]); + settings.add( settings::item::builder(panel_info.title.clone()) .description(panel_info.description.clone()) - .control(row!( - horizontal_space(Length::Fill), - icon("go-next-symbolic", 20).style(theme::Svg::Symbolic) - )) + .control(control) .spacing(16) .apply(container) - .style(theme::Container::custom(list::column::style)) + .style(theme::Container::custom(list::style)) .apply(button) - .padding(0) .style(theme::Button::Transparent) .on_press(crate::pages::Message::Page(panel_entity)), ) @@ -139,18 +139,19 @@ pub fn panel_dock_links() -> Section { settings = if let Some((dock_entity, dock_info)) = binder.info.iter().find(|(_, v)| v.id == "dock") { + let control = row::with_children(vec![ + horizontal_space(Length::Fill).into(), + icon::from_name("go-next-symbolic").size(16).into(), + ]); + settings.add( settings::item::builder(dock_info.title.clone()) .description(dock_info.description.clone()) - .control(row!( - horizontal_space(Length::Fill), - icon("go-next-symbolic", 20).style(theme::Svg::Symbolic) - )) + .control(control) .spacing(16) .apply(container) - .style(theme::Container::custom(list::column::style)) + .style(theme::Container::custom(list::style)) .apply(button) - .padding(0) .style(theme::Button::Transparent) .on_press(crate::pages::Message::Page(dock_entity)), ) diff --git a/app/src/pages/desktop/panel/applets_inner.rs b/app/src/pages/desktop/panel/applets_inner.rs index df453f71..59b26c41 100644 --- a/app/src/pages/desktop/panel/applets_inner.rs +++ b/app/src/pages/desktop/panel/applets_inner.rs @@ -1,4 +1,11 @@ -use apply::Apply; +use button::StyleSheet as ButtonStyleSheet; +use cosmic::iced_style::container::StyleSheet; +use cosmic::iced_widget::text_input::{Icon, Side}; +use cosmic::widget::{ + button, column, container, header_bar, icon, list_column, row, scrollable, text, text_input, + Column, +}; + use cosmic::{ cosmic_config::{Config, CosmicConfigEntry}, iced::{ @@ -18,26 +25,18 @@ use cosmic::{ }, iced_runtime::{command::platform_specific, core::id::Id, Command}, iced_sctk::commands, - iced_style::{ - button::StyleSheet as ButtonStyleSheet, container::StyleSheet as ContainerStyleSheet, - }, iced_widget::{ - column, container, core::{ layout, renderer, widget::{tree, Operation, OperationOutputWrapper, Tree}, Clipboard, Shell, Widget, }, graphics::image::image_rs::EncodableLayout, - row, scrollable, text, text_input, - text_input::{Icon, Side}, - Column, }, sctk::reexports::client::protocol::wl_data_device_manager::DndAction, - theme, - widget::{button, header_bar, icon, list_column}, - Element, + theme, Apply, Element, }; + use std::{ borrow::{Borrow, Cow}, fmt::Debug, @@ -244,32 +243,49 @@ impl Page { } has_some = true; list_column = list_column.add( - row![ - icon(info.icon.clone(), 32).style(theme::Svg::Symbolic), - column![ - text(info.name.clone()), - text(info.description.clone()).size(10) - ] - .spacing(4.0) - .width(Length::Fill), - cosmic::iced::widget::button(text(fl!("add"))) - .style(theme::Button::Custom { - active: Box::new(|theme| { - let mut style = theme.active(&theme::Button::Text); - style.text_color = theme.cosmic().accent_color().into(); + row::with_children(vec![ + icon::from_name(&*info.icon) + .size(32) + .symbolic(true) + .icon() + .into(), + column::with_capacity(2) + .push(text(info.name.clone())) + .push(text(info.description.clone()).size(10)) + .spacing(4.0) + .width(Length::Fill) + .into(), + button(text(fl!("add"))) + .style(button::Style::Custom { + active: Box::new(|focused, theme| { + let mut style = theme.active(focused, &button::Style::Text); + style.text_color = Some(theme.cosmic().accent_color().into()); style }), - hover: Box::new(|theme| { - let mut style = theme.hovered(&theme::Button::Text); - style.text_color = theme.cosmic().accent_color().into(); + disabled: Box::new(|theme| { + let mut style = theme.disabled(&button::Style::Text); + let mut text_color: Color = theme.cosmic().accent_color().into(); + text_color.a *= 0.5; + style.text_color = Some(text_color); style - }) + }), + hovered: Box::new(|focused, theme| { + let mut style = theme.hovered(focused, &theme::Button::Text); + style.text_color = Some(theme.cosmic().accent_color().into()); + style + }), + pressed: Box::new(|focused, theme| { + let mut style = theme.pressed(focused, &theme::Button::Text); + style.text_color = Some(theme.cosmic().accent_color().into()); + style + }), }) .padding(8.0) .on_press(app::Message::PageMessage(msg_map(Message::AddApplet( - info.clone() - )))), - ] + info.clone(), + )))) + .into(), + ]) .padding([0, 32, 0, 32]) .spacing(12) .align_items(Alignment::Center), @@ -282,49 +298,43 @@ impl Page { .horizontal_alignment(Horizontal::Center), ); } - column![ + column::with_children(vec![ header_bar() .title(fl!("add-applet")) .on_close(app::Message::PageMessage(msg_map( - Message::CloseAppletDialogue + Message::CloseAppletDialogue, ))) .on_drag(app::Message::PageMessage(msg_map( - Message::DragAppletDialogue - ))), + Message::DragAppletDialogue, + ))) + .into(), container( scrollable( - column![ - text(fl!("add-applet")).size(24).width(Length::Fill), - text_input(&fl!("search-applets"), &self.search) - .style(theme::TextInput::Search) - .padding([8, 24]) - .icon(Icon { - font: cosmic::iced::Font::default(), - code_point: '🔍', - size: Some(12.0), - spacing: 12.0, - side: Side::Left, - }) + column::with_children(vec![ + text(fl!("add-applet")).size(24).width(Length::Fill).into(), + text_input::search_input(&fl!("search-applets"), &self.search, None) .on_input(move |s| { app::Message::PageMessage(msg_map(Message::Search(s))) }) .on_paste(move |s| { app::Message::PageMessage(msg_map(Message::Search(s))) }) - .width(Length::Fixed(312.0)), - list_column - ] + .width(Length::Fixed(312.0)) + .into(), + list_column.into(), + ]) .padding([0, 64, 32, 64]) .align_items(Alignment::Center) - .spacing(8.0) + .spacing(8.0), ) .width(Length::Fill) - .height(Length::Fill) + .height(Length::Fill), ) .style(theme::Container::Background) .width(Length::Fill) .height(Length::Fill) - ] + .into(), + ]) .into() } @@ -497,33 +507,36 @@ pub fn lists< ); }; - let button = cosmic::iced::widget::button(text(fl!("add-applet"))) - .style(theme::Button::Secondary) - .padding(8.0); - column![ - column![ - row![ - text(fl!("applets")).width(Length::Fill).size(24), - if page.has_dialogue { + let button = button::standard(fl!("add-applet")); + + column::with_children(vec![ + column::with_children(vec![ + row::with_children(vec![ + text(fl!("applets")).width(Length::Fill).size(24).into(), + (if page.has_dialogue { button } else { button.on_press(Message::AddAppletDialogue) - } - ], - text(fl!("start-segment")), + }) + .into(), + ]) + .into(), + text(fl!("start-segment")).into(), AppletReorderList::new( config .plugins_wings .as_ref() - .map(|list| list - .0 - .iter() - .filter_map(|id| page - .available_entries + .map(|list| { + list.0 .iter() - .find(|e| e.id.as_ref() == id.as_str()) - .map(Applet::borrowed)) - .collect()) + .filter_map(|id| { + page.available_entries + .iter() + .find(|e| e.id.as_ref() == id.as_str()) + .map(Applet::borrowed) + }) + .collect() + }) .unwrap_or_default(), Some((window::Id(0), APPLET_DND_ICON_ID)), Message::StartDnd, @@ -533,24 +546,28 @@ pub fn lists< Message::ReorderStart, Message::Save, Message::Cancel, - page.reorder_widget_state.dragged_applet().as_ref() + page.reorder_widget_state.dragged_applet().as_ref(), ) - ] - .spacing(8.0), - column![ - text(fl!("center-segment")), + .into(), + ]) + .spacing(8.0) + .into(), + column::with_children(vec![ + text(fl!("center-segment")).into(), AppletReorderList::new( config .plugins_center .as_ref() - .map(|list| list - .iter() - .filter_map(|id| page - .available_entries - .iter() - .find(|e| e.id.as_ref() == id.as_str()) - .map(Applet::borrowed)) - .collect()) + .map(|list| { + list.iter() + .filter_map(|id| { + page.available_entries + .iter() + .find(|e| e.id.as_ref() == id.as_str()) + .map(Applet::borrowed) + }) + .collect() + }) .unwrap_or_default(), Some((window::Id(0), APPLET_DND_ICON_ID)), Message::StartDnd, @@ -560,25 +577,29 @@ pub fn lists< Message::ReorderCenter, Message::Save, Message::Cancel, - page.reorder_widget_state.dragged_applet().as_ref() + page.reorder_widget_state.dragged_applet().as_ref(), ) - ] - .spacing(8.0), - column![ - text(fl!("end-segment")), + .into(), + ]) + .spacing(8.0) + .into(), + column::with_children(vec![ + text(fl!("end-segment")).into(), AppletReorderList::new( config .plugins_wings .as_ref() - .map(|list| list - .1 - .iter() - .filter_map(|id| page - .available_entries + .map(|list| { + list.1 .iter() - .find(|e| e.id.as_ref() == id.as_str()) - .map(Applet::borrowed)) - .collect()) + .filter_map(|id| { + page.available_entries + .iter() + .find(|e| e.id.as_ref() == id.as_str()) + .map(Applet::borrowed) + }) + .collect() + }) .unwrap_or_default(), Some((window::Id(0), APPLET_DND_ICON_ID)), Message::StartDnd, @@ -588,11 +609,13 @@ pub fn lists< Message::ReorderEnd, Message::Save, Message::Cancel, - page.reorder_widget_state.dragged_applet().as_ref() + page.reorder_widget_state.dragged_applet().as_ref(), ) - ] - .spacing(8.0), - ] + .into(), + ]) + .spacing(8.0) + .into(), + ]) .padding([0, 16, 0, 16]) .spacing(12.0) .apply(Element::from) @@ -700,19 +723,27 @@ impl<'a, Message: 'static + Clone> AppletReorderList<'a, Message> { let id_clone = info.id.to_string(); let is_dragged = active_dnd.as_ref().map_or(false, |dnd| dnd.id == info.id); container( - row![ - icon("open-menu-symbolic", 16).style(theme::Svg::Symbolic), - icon(info.icon, 32).style(theme::Svg::Symbolic), - column![text(info.name), text(info.description).size(10)] + row::with_children(vec![ + icon::from_name("open-menu-symbolic") + .symbolic(true) + .size(16) + .into(), + icon::from_name(info.icon).size(32).symbolic(true).into(), + column::with_capacity(2) .spacing(4.0) - .width(Length::Fill), - button(theme::Button::Text) - .icon(theme::Svg::Symbolic, "edit-delete-symbolic", 16) - .on_press(on_remove(id_clone.clone())), - button(theme::Button::Text) - .icon(theme::Svg::Symbolic, "open-menu-symbolic", 16) - .on_press(on_details(id_clone)), - ] + .width(Length::Fill) + .push(text(info.name)) + .push(text::caption(info.description)) + .into(), + button::icon(icon::from_name("edit-delete-symbolic")) + .extra_small() + .on_press(on_remove(id_clone.clone())) + .into(), + button::icon(icon::from_name("open-menu-symbolic")) + .extra_small() + .on_press(on_details(id_clone)) + .into(), + ]) .spacing(12) .align_items(Alignment::Center), ) @@ -781,23 +812,28 @@ impl<'a, Message: 'static + Clone> AppletReorderList<'a, Message> { surface_ids: None, inner: if let Some(info) = state.dragged_applet() { container( - row![ - icon("open-menu-symbolic", 16).style(theme::Svg::Symbolic), - icon(info.icon.into_owned(), 32).style(theme::Svg::Symbolic), - column![text(info.name), text(info.description).size(10)] + row::with_children(vec![ + icon::from_name("open-menu-symbolic") + .size(16) + .symbolic(true) + .into(), + icon::from_name(info.icon.into_owned()) + .size(32) + .symbolic(true) + .into(), + column::with_capacity(2) .spacing(4.0) - .width(Length::Fill), - button(theme::Button::Text).icon( - theme::Svg::Symbolic, - "edit-delete-symbolic", - 16 - ), - button(theme::Button::Text).icon( - theme::Svg::Symbolic, - "open-menu-symbolic", - 16 - ), - ] + .width(Length::Fill) + .push(text(info.name)) + .push(text::caption(info.description)) + .into(), + button::icon(icon::from_name("edit-delete-symbolic")) + .extra_small() + .into(), + button::icon(icon::from_name("open-menu-symbolic")) + .extra_small() + .into(), + ]) .spacing(12) .align_items(Alignment::Center), ) @@ -939,6 +975,7 @@ where renderer: &cosmic::Renderer, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, + viewport: &Rectangle, ) -> event::Status { let mut ret = match self.inner.as_widget_mut().on_event( &mut tree.children[0], @@ -948,6 +985,7 @@ where renderer, clipboard, shell, + viewport, ) { event::Status::Captured => return event::Status::Captured, event::Status::Ignored => event::Status::Ignored, diff --git a/app/src/pages/desktop/panel/inner.rs b/app/src/pages/desktop/panel/inner.rs index 079ef945..112499ea 100644 --- a/app/src/pages/desktop/panel/inner.rs +++ b/app/src/pages/desktop/panel/inner.rs @@ -1,11 +1,12 @@ use cosmic::{ cosmic_config::{self, CosmicConfigEntry}, - iced::widget::{button, container, horizontal_space, pick_list, row}, iced::Length, iced_widget::slider, sctk::reexports::client::{backend::ObjectId, protocol::wl_output::WlOutput, Proxy}, theme, - widget::{icon, list, settings, text, toggler}, + widget::{ + button, container, horizontal_space, icon, list, pick_list, row, settings, text, toggler, + }, Element, }; @@ -14,7 +15,7 @@ use cosmic_panel_config::{ AutoHide, CosmicPanelBackground, CosmicPanelConfig, CosmicPanelContainerConfig, CosmicPanelOuput, PanelAnchor, PanelSize, }; -use cosmic_settings_page::{self as page, section, Section}; +use cosmic_settings_page::{self as page, Section}; use std::{borrow::Cow, collections::HashMap}; pub struct PageInner { @@ -149,8 +150,8 @@ pub(crate) fn style< .add(settings::item( &descriptions[3], // TODO custom discrete slider variant - row![ - text(fl!("small")), + row::with_children(vec![ + text(fl!("small")).into(), slider( 0..=4, match panel_config.size { @@ -173,20 +174,22 @@ pub(crate) fn style< Message::PanelSize(PanelSize::XL) } }, - ), - text(fl!("large")) - ] + ) + .into(), + text(fl!("large")).into(), + ]) .spacing(12), )) .add(settings::item( &descriptions[4], - row![ - text(fl!("number", HashMap::from_iter(vec![("number", 0)]))), + row::with_children(vec![ + text(fl!("number", HashMap::from_iter(vec![("number", 0)]))).into(), slider(0..=100, (panel_config.opacity * 100.0) as i32, |v| { Message::Opacity(v as f32 / 100.0) - },), - text(fl!("number", HashMap::from_iter(vec![("number", 100)]))), - ] + }) + .into(), + text(fl!("number", HashMap::from_iter(vec![("number", 100)]))).into(), + ]) .spacing(12), )) .apply(Element::from) @@ -208,17 +211,18 @@ pub(crate) fn configuration + PanelPage>( .iter() .find(|(_, v)| v.id == page.applets_page_id()) { + let control = row::with_children(vec![ + horizontal_space(Length::Fill).into(), + icon::from_name("go-next-symbolic").size(16).into(), + ]); + settings.add( settings::item::builder(&descriptions[0]) - .control(row!( - horizontal_space(Length::Fill), - icon("go-next-symbolic", 20).style(theme::Svg::Symbolic) - )) + .control(control) .spacing(16) .apply(container) - .style(theme::Container::custom(list::column::style)) + .style(theme::Container::custom(list::style)) .apply(button) - .padding(0) .style(theme::Button::Transparent) .on_press(crate::pages::Message::Page(panel_applets_entity)), ) diff --git a/app/src/pages/desktop/wallpaper/mod.rs b/app/src/pages/desktop/wallpaper/mod.rs index 497aa80c..de5e5e42 100644 --- a/app/src/pages/desktop/wallpaper/mod.rs +++ b/app/src/pages/desktop/wallpaper/mod.rs @@ -13,7 +13,7 @@ use apply::Apply; use cosmic::widget::{ list_column, segmented_button::{self, SingleSelectModel}, - settings, toggler, + segmented_selection, settings, text, toggler, }; use cosmic::{iced::Length, Element}; use cosmic::{iced_core::alignment, iced_runtime::core::image::Handle as ImageHandle}; @@ -591,7 +591,7 @@ pub fn settings() -> Section { )); children.push(if page.config.same_on_all { - cosmic::widget::text(fl!("all-displays")) + text(fl!("all-displays")) .font(cosmic::font::FONT_SEMIBOLD) .horizontal_alignment(alignment::Horizontal::Center) .vertical_alignment(alignment::Vertical::Center) @@ -602,7 +602,7 @@ pub fn settings() -> Section { .height(Length::Fixed(32.0)) .into() } else { - cosmic::widget::horizontal_segmented_selection(&page.outputs) + segmented_selection::horizontal(&page.outputs) .on_activate(Message::Output) .into() }); @@ -669,7 +669,6 @@ pub fn settings() -> Section { cosmic::iced::widget::column(children) .spacing(22) - .max_width(683) .apply(Element::from) .map(crate::pages::Message::DesktopWallpaper) }) diff --git a/app/src/pages/desktop/wallpaper/widgets.rs b/app/src/pages/desktop/wallpaper/widgets.rs index 75fd8a6a..128006dc 100644 --- a/app/src/pages/desktop/wallpaper/widgets.rs +++ b/app/src/pages/desktop/wallpaper/widgets.rs @@ -2,10 +2,11 @@ // SPDX-License-Identifier: GPL-3.0-only use super::Message; -use apply::Apply; use cosmic::iced_core::{self, gradient::Linear, Background, BorderRadius, Color, Degrees}; use cosmic::iced_core::{alignment, Length}; use cosmic::iced_runtime::core::image::Handle as ImageHandle; +use cosmic::prelude::*; +use cosmic::widget::{button, container, image, space}; use cosmic::{iced, Element}; use cosmic_settings_desktop::wallpaper; use slotmap::DefaultKey; @@ -18,9 +19,9 @@ const ROW_SPACING: u16 = 16; /// A button for selecting a color or gradient. pub fn color_button(color: wallpaper::Color) -> Element<'static, Message> { - iced::widget::button(color_image(color.clone(), COLOR_WIDTH, COLOR_WIDTH, 8.0)) + button(color_image(color.clone(), COLOR_WIDTH, COLOR_WIDTH, 8.0)) .padding(0) - .style(cosmic::theme::Button::Transparent) + .style(button::Style::IconVertical) .on_press(Message::ColorSelect(color)) .into() } @@ -32,9 +33,10 @@ pub fn color_image( height: u16, border_radius: f32, ) -> Element<'static, Message> { - iced::widget::container(iced::widget::space::Space::new(width, height)) + container(space::Space::new(width, height)) .style(cosmic::theme::Container::custom(move |_theme| { - iced::widget::container::Appearance { + container::Appearance { + icon_color: None, text_color: None, background: Some(match &color { wallpaper::Color::Single([r, g, b]) => { @@ -98,9 +100,9 @@ fn flex_select_row<'a>( } fn wallpaper_button(handle: &ImageHandle, id: DefaultKey) -> Element { - let image = iced::widget::image(handle.clone()).apply(iced::Element::from); + let image = image(handle.clone()).apply(iced::Element::from); - iced::widget::button(image) + button(image) .padding(0) .style(cosmic::theme::Button::Transparent) .on_press(Message::Select(id)) diff --git a/app/src/pages/input/keyboard/mod.rs b/app/src/pages/input/keyboard/mod.rs index 6ffd5bb6..67b9397d 100644 --- a/app/src/pages/input/keyboard/mod.rs +++ b/app/src/pages/input/keyboard/mod.rs @@ -6,7 +6,7 @@ use cosmic::{ window, Length, }, iced_style, theme, - widget::settings, + widget::{button, container, icon, radio, settings}, }; use cosmic_settings_page::{self as page, section, Section}; use slotmap::SlotMap; @@ -68,11 +68,11 @@ fn popover_menu_row(label: String) -> cosmic::Element<'static, Message> { .style(cosmic::theme::Container::custom(|theme| { iced_style::container::Appearance { background: None, - ..cosmic::widget::list::column::style(theme) + ..cosmic::widget::list::style(theme) } })) - .apply(widget::button) - .style(cosmic::theme::Button::Transparent) + .apply(button) + .style(theme::Button::Transparent) .into() } @@ -92,7 +92,8 @@ fn popover_menu() -> cosmic::Element<'static, Message> { .height(Length::Shrink) .apply(cosmic::widget::container) .style(cosmic::theme::Container::custom(|theme| { - iced_style::container::Appearance { + container::Appearance { + icon_color: Some(theme.cosmic().background.on.into()), text_color: Some(theme.cosmic().background.on.into()), background: Some(iced::Color::from(theme.cosmic().background.base).into()), border_radius: (12.0).into(), @@ -104,18 +105,14 @@ fn popover_menu() -> cosmic::Element<'static, Message> { } fn popover_button(input_source: &InputSource, expanded: bool) -> cosmic::Element<'static, Message> { - let style = if expanded { - cosmic::theme::Svg::SymbolicActive - } else { - cosmic::theme::Svg::Symbolic - }; let on_press = Message::ExpandInputSourcePopover(if expanded { None } else { Some(input_source.id.clone()) }); - let button = cosmic::widget::button(cosmic::theme::Button::Secondary) - .icon(style, "open-menu-symbolic", 20) + + let button = button::icon(icon::from_name("open-menu-symbolic")) + .extra_small() .padding(0) .on_press(on_press); @@ -195,12 +192,9 @@ fn special_char_radio_row<'a>( value: Option<&'static str>, current_value: Option<&'a str>, ) -> cosmic::Element<'a, Message> { - settings::item_row(vec![iced::widget::radio( - desc, - value, - Some(current_value), - |_| Message::SpecialCharacterSelect(value), - ) + settings::item_row(vec![radio(desc, value, Some(current_value), |_| { + Message::SpecialCharacterSelect(value) + }) .into()]) .into() } @@ -312,7 +306,7 @@ fn keyboard_shortcuts() -> Section { fn go_next_control() -> cosmic::Element<'static, Msg> { widget::row!( horizontal_space(Length::Fill), - cosmic::widget::icon("go-next-symbolic", 20).style(cosmic::theme::Svg::Symbolic) + icon::from_name("go-next-symbolic").size(16).icon(), ) .into() } @@ -321,11 +315,10 @@ fn go_next_item(description: &str, msg: Msg) -> cosmic::El settings::item(description, go_next_control()) .apply(widget::container) .style(cosmic::theme::Container::custom( - cosmic::widget::list::column::style, + cosmic::widget::list::style, )) - .apply(widget::button) - .style(cosmic::theme::Button::Transparent) - .padding(0) + .apply(button) + .style(theme::Button::Transparent) .on_press(msg) .into() } diff --git a/app/src/pages/input/keyboard/shortcuts.rs b/app/src/pages/input/keyboard/shortcuts.rs index 4b0e0369..fa3260cb 100644 --- a/app/src/pages/input/keyboard/shortcuts.rs +++ b/app/src/pages/input/keyboard/shortcuts.rs @@ -1,7 +1,5 @@ -use apply::Apply; -use cosmic::iced::widget; -use cosmic::widget::settings; -use cosmic::Element; +use cosmic::widget::{column, settings}; +use cosmic::{Apply, Element}; use cosmic_settings_page::Section; use cosmic_settings_page::{self as page, section}; use slotmap::SlotMap; @@ -44,7 +42,8 @@ fn shortcuts() -> Section { .apply(Element::from) .map(crate::pages::Message::Input) */ - widget::column![settings::view_section(§ion.title)] + column() + .push(settings::view_section(§ion.title)) .apply(Element::from) .map(crate::pages::Message::Input) }) diff --git a/app/src/pages/input/mouse.rs b/app/src/pages/input/mouse.rs index 2c88456e..da01172b 100644 --- a/app/src/pages/input/mouse.rs +++ b/app/src/pages/input/mouse.rs @@ -1,6 +1,5 @@ use apply::Apply; -use cosmic::iced::widget; -use cosmic::widget::settings; +use cosmic::widget::{self, settings}; use cosmic::Element; use cosmic_comp_config::input::AccelProfile; use cosmic_settings_page::Section; diff --git a/app/src/pages/input/touchpad.rs b/app/src/pages/input/touchpad.rs index 6e2305ee..951ecd8b 100644 --- a/app/src/pages/input/touchpad.rs +++ b/app/src/pages/input/touchpad.rs @@ -1,6 +1,5 @@ use apply::Apply; -use cosmic::iced::widget; -use cosmic::widget::settings; +use cosmic::widget::{self, settings}; use cosmic::Element; use cosmic_comp_config::input::AccelProfile; use cosmic_settings_page::Section; diff --git a/app/src/pages/sound.rs b/app/src/pages/sound.rs index 10fc48ff..f851b39e 100644 --- a/app/src/pages/sound.rs +++ b/app/src/pages/sound.rs @@ -1,7 +1,7 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -use cosmic::{iced, widget::settings}; +use cosmic::widget::{settings, text}; use cosmic_settings_page::{self as page, section, Section}; use slotmap::SlotMap; @@ -39,14 +39,8 @@ fn alerts() -> Section { ]) .view::(|_binder, _page, section| { settings::view_section(§ion.title) - .add(settings::item( - §ion.descriptions[0], - iced::widget::text("TODO"), - )) - .add(settings::item( - §ion.descriptions[1], - iced::widget::text("TODO"), - )) + .add(settings::item(§ion.descriptions[0], text("TODO"))) + .add(settings::item(§ion.descriptions[1], text("TODO"))) .into() }) } @@ -57,10 +51,7 @@ fn applications() -> Section { .descriptions(vec![fl!("sound-applications", "desc")]) .view::(|_binder, _page, section| { settings::view_section(§ion.title) - .add(settings::item( - §ion.descriptions[0], - iced::widget::text("TODO"), - )) + .add(settings::item(§ion.descriptions[0], text("TODO"))) .into() }) } @@ -75,18 +66,9 @@ fn input() -> Section { ]) .view::(|_binder, _page, section| { settings::view_section(§ion.title) - .add(settings::item( - §ion.descriptions[0], - iced::widget::text("TODO"), - )) - .add(settings::item( - §ion.descriptions[1], - iced::widget::text("TODO"), - )) - .add(settings::item( - §ion.descriptions[2], - iced::widget::text("TODO"), - )) + .add(settings::item(§ion.descriptions[0], text("TODO"))) + .add(settings::item(§ion.descriptions[1], text("TODO"))) + .add(settings::item(§ion.descriptions[2], text("TODO"))) .into() }) } @@ -103,22 +85,10 @@ fn output() -> Section { ]) .view::(|_binder, _page, section| { settings::view_section(§ion.title) - .add(settings::item( - §ion.descriptions[0], - iced::widget::text("TODO"), - )) - .add(settings::item( - §ion.descriptions[1], - iced::widget::text("TODO"), - )) - .add(settings::item( - §ion.descriptions[2], - iced::widget::text("TODO"), - )) - .add(settings::item( - §ion.descriptions[3], - iced::widget::text("TODO"), - )) + .add(settings::item(§ion.descriptions[0], text("TODO"))) + .add(settings::item(§ion.descriptions[1], text("TODO"))) + .add(settings::item(§ion.descriptions[2], text("TODO"))) + .add(settings::item(§ion.descriptions[3], text("TODO"))) .into() }) } diff --git a/app/src/pages/system/about.rs b/app/src/pages/system/about.rs index 00421e64..57e0013b 100644 --- a/app/src/pages/system/about.rs +++ b/app/src/pages/system/about.rs @@ -80,7 +80,7 @@ fn distributor_logo() -> Section { .view::(|_binder, _page, _section| { row!( horizontal_space(Length::Fill), - icon("distributor-logo", 78), + icon::from_name("distributor-logo").size(78).icon(), horizontal_space(Length::Fill), ) // Add extra padding to reach 40px from the first section. diff --git a/app/src/theme.rs b/app/src/theme.rs index 14df9d91..9b72506c 100644 --- a/app/src/theme.rs +++ b/app/src/theme.rs @@ -5,7 +5,8 @@ use cosmic::{iced_widget::core::BorderRadius, theme}; #[must_use] pub fn display_container_frame() -> cosmic::theme::Container { - theme::Container::custom(|_theme| cosmic::iced::widget::container::Appearance { + theme::Container::custom(|_theme| cosmic::widget::container::Appearance { + icon_color: None, text_color: None, background: Some(cosmic::iced::Background::Color(cosmic::iced::Color::WHITE)), border_color: cosmic::iced::Color::WHITE, @@ -16,7 +17,8 @@ pub fn display_container_frame() -> cosmic::theme::Container { #[must_use] pub fn display_container_screen() -> cosmic::theme::Container { - theme::Container::custom(|_theme| cosmic::iced::widget::container::Appearance { + theme::Container::custom(|_theme| cosmic::widget::container::Appearance { + icon_color: None, text_color: None, background: Some(cosmic::iced::Background::Color(cosmic::iced::Color::BLACK)), border_color: cosmic::iced::Color::BLACK, diff --git a/app/src/widget/mod.rs b/app/src/widget/mod.rs index 6da97979..55f11fd8 100644 --- a/app/src/widget/mod.rs +++ b/app/src/widget/mod.rs @@ -2,13 +2,11 @@ // SPDX-License-Identifier: GPL-3.0-only use apply::Apply; -use cosmic::iced::{ - self, - widget::{button, column, container, horizontal_space, row, vertical_space, Button}, - Length, +use cosmic::iced::Length; +use cosmic::widget::{ + button, column, container, divider, horizontal_space, row, settings, text, vertical_space, }; -use cosmic::widget::{divider, icon, list, settings, text}; -use cosmic::{theme, Element}; +use cosmic::Element; use cosmic_settings_page as page; #[must_use] @@ -41,87 +39,19 @@ pub fn search_header( column_children.push(vertical_space(Length::Fixed(8.)).into()); column_children.push(divider::horizontal::heavy().into()); - column(column_children).into() + column::with_children(column_children).into() } #[must_use] -pub fn search_page_link(title: &str) -> Button { - text(title) - .size(24) - .horizontal_alignment(iced::alignment::Horizontal::Left) - .apply(button) - .style(cosmic::theme::Button::Link) +pub fn search_page_link(title: &str) -> button::TextButton { + button::text(title).style(button::Style::Link) } #[must_use] pub fn page_title(page: &page::Info) -> Element { - row!( - text(page.title.as_str()).size(24), - horizontal_space(Length::Fill) - ) - .into() -} - -#[must_use] -pub fn parent_page_button<'a, Message: Clone + 'static>( - parent: &'a page::Info, - sub_page: &'a page::Info, - on_press: Message, -) -> Element<'a, Message> { - column!( - button(row!( - icon("go-previous-symbolic", 20).style(theme::Svg::SymbolicLink), - text(parent.title.as_str()).size(14), - )) - .padding(0) - .style(theme::Button::Link) - .on_press(on_press), - row!( - text(sub_page.title.as_str()).size(24), - horizontal_space(Length::Fill), - ) - .align_items(iced::alignment::Alignment::Center), - ) - .spacing(6) - .into() -} - -#[must_use] -pub fn sub_page_button(entity: page::Entity, page: &page::Info) -> Element { - settings::item::builder(page.title.as_str()) - .description(page.description.as_str()) - .icon(icon(&*page.icon_name, 20).style(theme::Svg::Symbolic)) - .control(row!( - horizontal_space(Length::Fill), - icon("go-next-symbolic", 20).style(theme::Svg::Symbolic) - )) - .spacing(16) - .apply(container) - .padding([20, 24]) - .style(theme::Container::custom(list::column::style)) - .apply(button) - .padding(0) - .style(theme::Button::Transparent) - .on_press(entity) - .into() -} - -#[must_use] -pub fn sub_page_section(entity: page::Entity, page: &page::Info) -> Element { - settings::item::builder(page.title.as_str()) - .description(page.description.as_str()) - .control(row!( - horizontal_space(Length::Fill), - icon("go-next-symbolic", 20).style(theme::Svg::Symbolic) - )) - .spacing(16) - .apply(container) - .padding([20, 24]) - .style(theme::Container::custom(list::column::style)) - .apply(button) - .padding(0) - .style(theme::Button::Transparent) - .on_press(entity) + row::with_capacity(2) + .push(text::title3(page.title.as_str())) + .push(horizontal_space(Length::Fill)) .into() } @@ -134,15 +64,16 @@ pub fn unimplemented_page() -> Element<'static, Message> { #[must_use] pub fn display_container<'a, Message: 'a>(widget: Element<'a, Message>) -> Element<'a, Message> { - row!( - horizontal_space(Length::Fill), - container(widget) - .style(crate::theme::display_container_screen()) - .apply(container) - .padding(4) - .style(crate::theme::display_container_frame()), - horizontal_space(Length::Fill), - ) - .padding([0, 0, 8, 0]) - .into() + let display = container(widget) + .style(crate::theme::display_container_screen()) + .apply(container) + .padding(4) + .style(crate::theme::display_container_frame()); + + row::with_capacity(3) + .push(horizontal_space(Length::Fill)) + .push(display) + .push(horizontal_space(Length::Fill)) + .padding([0, 0, 8, 0]) + .into() } diff --git a/page/src/binder.rs b/page/src/binder.rs index 1947a290..a3680e12 100644 --- a/page/src/binder.rs +++ b/page/src/binder.rs @@ -85,6 +85,11 @@ impl Binder { .and_then(|storage| storage.remove(id)); } + #[must_use] + pub fn find_page_by_id(&self, id: &str) -> Option<(crate::Entity, &Info)> { + self.info.iter().find(|(_id, info)| info.id == id) + } + /// Registers a new page in the settings panel. pub fn register>(&mut self) -> crate::Insert { let page = P::default(); From f33f956495d67259c57ad6c989b16e49df617aa7 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Tue, 19 Sep 2023 17:45:10 +0200 Subject: [PATCH 2/6] fix(app): change page padding if window is condensed --- app/src/app.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/app.rs b/app/src/app.rs index 5db41bd6..4b38e23c 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -316,12 +316,14 @@ impl cosmic::Application for SettingsApp { panic!("page without sub-pages or content"); }; + let padding = if self.core.is_condensed() { 0 } else { 64 }; + container(page_view) .max_width(800) .width(Length::Fill) .apply(container) .center_x() - .padding([0, 64]) + .padding([0, padding]) .width(Length::Fill) .apply(scrollable) .into() From ca1bb8007fb71af116656eead95dba9d127fea45 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 19 Sep 2023 17:24:57 -0400 Subject: [PATCH 3/6] fix: remove the dragging state for now when a drop is performed --- app/src/pages/desktop/panel/applets_inner.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/pages/desktop/panel/applets_inner.rs b/app/src/pages/desktop/panel/applets_inner.rs index 59b26c41..ce014fad 100644 --- a/app/src/pages/desktop/panel/applets_inner.rs +++ b/app/src/pages/desktop/panel/applets_inner.rs @@ -1026,6 +1026,13 @@ where } DraggingState::None } + event::Event::PlatformSpecific(PlatformSpecific::Wayland( + wayland::Event::DataSource(wayland::DataSourceEvent::DndDropPerformed), + )) => { + ret = event::Status::Captured; + + DraggingState::None + } _ => DraggingState::Dragging(applet), }, DraggingState::Pressed(start) => { From 38538aecfa260b41dd9c12abf586158c04f02fc2 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Wed, 20 Sep 2023 17:10:32 +0200 Subject: [PATCH 4/6] chore(cargo): update iced --- Cargo.lock | 85 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7bd58526..ed08df2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,9 +69,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2135563fb5c609d2b2b87c1e8ce7bc41b0b45430fa9661f457981503dd5bf0" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -762,7 +762,7 @@ dependencies = [ [[package]] name = "cosmic-comp-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-comp#5cebc7b97de4e8c0ed84ffb3b93837e95f8b4980" +source = "git+https://github.com/pop-os/cosmic-comp#63c073e3e5fc422ae812795b6e47e3557b3f1d84" dependencies = [ "input", "serde", @@ -771,7 +771,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "atomicwrites", "calloop", @@ -786,7 +786,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "quote", "syn 1.0.109", @@ -795,7 +795,7 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#dbd419e7e7e85c7dc2f1caea90bf73e4b28c6c88" +source = "git+https://github.com/pop-os/cosmic-panel#e4bf33198f9da2d7a9bc165ac82ca10c790ee3b1" dependencies = [ "anyhow", "cosmic-config", @@ -920,7 +920,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "almost", "cosmic-config", @@ -2042,9 +2042,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -2137,7 +2137,7 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_accessibility", "iced_core", @@ -2153,7 +2153,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "accesskit", "accesskit_unix", @@ -2162,14 +2162,14 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "bitflags 1.3.2", "iced_accessibility", "instant", "log", "palette", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", "thiserror", "twox-hash", ] @@ -2177,7 +2177,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "futures", "iced_core", @@ -2190,7 +2190,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2207,7 +2207,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2220,19 +2220,19 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_accessibility", "iced_core", "iced_futures", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", "thiserror", ] [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "enum-repr", "float-cmp", @@ -2242,19 +2242,21 @@ dependencies = [ "iced_runtime", "iced_style", "itertools 0.10.5", + "lazy_static", "raw-window-handle 0.5.2", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", "smithay-clipboard", "thiserror", "tracing", "wayland-backend", "wayland-protocols 0.30.1", + "xkeysym", ] [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_core", "once_cell", @@ -2264,7 +2266,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "bytemuck", "cosmic-text", @@ -2282,7 +2284,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2303,14 +2305,14 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_renderer", "iced_runtime", "iced_style", "num-traits", "ouroboros", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", "thiserror", "unicode-segmentation", ] @@ -2318,7 +2320,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_graphics", "iced_runtime", @@ -2674,7 +2676,7 @@ checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#aa2dfe0ea5b8d25a3ae18d9e86ce71367eceabdb" +source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "apply", "ashpd", @@ -2695,7 +2697,7 @@ dependencies = [ "lazy_static", "palette", "slotmap", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=c9940f4)", + "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", "thiserror", "tokio", "tracing", @@ -4170,14 +4172,15 @@ dependencies = [ [[package]] name = "smithay-client-toolkit" version = "0.17.0" -source = "git+https://github.com/smithay/client-toolkit?rev=c9940f4#c9940f4167f0d81cc26f77b7eeef6a34068a90a5" +source = "git+https://github.com/smithay/client-toolkit?rev=f49df45#f49df457aa0dd33d505c212bafab407257cb83f8" dependencies = [ "bitflags 1.3.2", + "bytemuck", "calloop", "cursor-icon", "dlib", "log", - "memmap2 0.5.10", + "memmap2 0.7.1", "nix 0.26.4", "pkg-config", "thiserror", @@ -4189,6 +4192,7 @@ dependencies = [ "wayland-protocols-wlr", "wayland-scanner 0.30.1", "xkbcommon", + "xkeysym", ] [[package]] @@ -4821,9 +4825,9 @@ checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -5089,9 +5093,9 @@ dependencies = [ [[package]] name = "wayland-csd-frame" -version = "0.1.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72191e30290b83491325d32c1327be7f45459c97263d9d48494c81efc9328116" +checksum = "7146581cd54ec2ef3a68e0d0e3501c9cefa8d4894da4007b715ecced5a289a1c" dependencies = [ "bitflags 2.4.0", "cursor-icon", @@ -5358,9 +5362,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -5741,6 +5745,15 @@ dependencies = [ "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.18" From 9ff8d730cebea47b922a13b2bb3b80198c6823bf Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Wed, 20 Sep 2023 17:11:15 +0200 Subject: [PATCH 5/6] chore(wallpaper): use new `FlexRow` widget from libcosmic --- app/src/pages/desktop/wallpaper/widgets.rs | 36 ++++++++++------------ 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/app/src/pages/desktop/wallpaper/widgets.rs b/app/src/pages/desktop/wallpaper/widgets.rs index 128006dc..e2cd0466 100644 --- a/app/src/pages/desktop/wallpaper/widgets.rs +++ b/app/src/pages/desktop/wallpaper/widgets.rs @@ -2,8 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only use super::Message; -use cosmic::iced_core::{self, gradient::Linear, Background, BorderRadius, Color, Degrees}; -use cosmic::iced_core::{alignment, Length}; +use cosmic::iced_core::{self, gradient::Linear, Background, BorderRadius, Color, Degrees, Length}; use cosmic::iced_runtime::core::image::Handle as ImageHandle; use cosmic::prelude::*; use cosmic::widget::{button, container, image, space}; @@ -12,8 +11,6 @@ use cosmic_settings_desktop::wallpaper; use slotmap::DefaultKey; const COLOR_WIDTH: u16 = 70; -const WALLPAPER_WIDTH: u16 = 158; - const COLUMN_SPACING: u16 = 12; const ROW_SPACING: u16 = 16; @@ -68,34 +65,33 @@ pub fn color_image( /// Color selection list pub fn color_select_options() -> Element<'static, Message> { - flex_select_row(|vec, _size| { - for color in wallpaper::DEFAULT_COLORS { - vec.push(color_button(color.clone())); - } + let mut vec = Vec::with_capacity(wallpaper::DEFAULT_COLORS.len()); + + for color in wallpaper::DEFAULT_COLORS { + vec.push(color_button(color.clone())); + } - COLOR_WIDTH - }) + flex_select_row(vec) } /// Background selection list pub fn wallpaper_select_options(page: &super::Page) -> Element { - flex_select_row(move |vec, _size| { - for (id, handle) in &page.selection.selection_handles { - vec.push(wallpaper_button(handle, id)); - } + let mut vec = Vec::with_capacity(page.selection.selection_handles.len()); + + for (id, handle) in &page.selection.selection_handles { + vec.push(wallpaper_button(handle, id)); + } - WALLPAPER_WIDTH - }) + flex_select_row(vec) } -fn flex_select_row<'a>( - elements: impl Fn(&mut Vec>, iced_core::Size) -> u16 + 'a, -) -> Element<'a, Message> { +fn flex_select_row(elements: Vec>) -> Element { cosmic::widget::flex_row(elements) .column_spacing(COLUMN_SPACING) .row_spacing(ROW_SPACING) + .apply(container) .width(Length::Fill) - .align_x(alignment::Horizontal::Center) + .center_x() .into() } From bc056848e04cacda8784e4ec5075554800ca03d0 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 20 Sep 2023 11:54:36 -0400 Subject: [PATCH 6/6] chore: update sctk and add patch --- Cargo.lock | 38 +++++++------------------------------- Cargo.toml | 3 +++ pages/desktop/Cargo.toml | 2 +- 3 files changed, 11 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed08df2d..e654c1cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -856,7 +856,7 @@ dependencies = [ "futures-lite", "image", "rayon", - "smithay-client-toolkit 0.17.0 (git+https://github.com/pop-os/client-toolkit?tag=themed-pointer)", + "smithay-client-toolkit 0.17.0", "tokio", "tracing", "wayland-client 0.30.2", @@ -2169,7 +2169,7 @@ dependencies = [ "instant", "log", "palette", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", + "smithay-client-toolkit 0.17.0", "thiserror", "twox-hash", ] @@ -2225,7 +2225,7 @@ dependencies = [ "iced_accessibility", "iced_core", "iced_futures", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", + "smithay-client-toolkit 0.17.0", "thiserror", ] @@ -2244,7 +2244,7 @@ dependencies = [ "itertools 0.10.5", "lazy_static", "raw-window-handle 0.5.2", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", + "smithay-client-toolkit 0.17.0", "smithay-clipboard", "thiserror", "tracing", @@ -2312,7 +2312,7 @@ dependencies = [ "iced_style", "num-traits", "ouroboros", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", + "smithay-client-toolkit 0.17.0", "thiserror", "unicode-segmentation", ] @@ -2697,7 +2697,7 @@ dependencies = [ "lazy_static", "palette", "slotmap", - "smithay-client-toolkit 0.17.0 (git+https://github.com/smithay/client-toolkit?rev=f49df45)", + "smithay-client-toolkit 0.17.0", "thiserror", "tokio", "tracing", @@ -4148,31 +4148,7 @@ dependencies = [ [[package]] name = "smithay-client-toolkit" version = "0.17.0" -source = "git+https://github.com/pop-os/client-toolkit?tag=themed-pointer#fd15dd954bc5f0c78d079aeda7b11194a682bbff" -dependencies = [ - "bitflags 1.3.2", - "calloop", - "cursor-icon", - "dlib", - "lazy_static", - "log", - "memmap2 0.5.10", - "nix 0.26.4", - "pkg-config", - "thiserror", - "wayland-backend", - "wayland-client 0.30.2", - "wayland-cursor 0.30.0", - "wayland-protocols 0.30.1", - "wayland-protocols-wlr", - "wayland-scanner 0.30.1", - "xkbcommon", -] - -[[package]] -name = "smithay-client-toolkit" -version = "0.17.0" -source = "git+https://github.com/smithay/client-toolkit?rev=f49df45#f49df457aa0dd33d505c212bafab407257cb83f8" +source = "git+https://github.com/smithay/client-toolkit//?rev=f49df45#f49df457aa0dd33d505c212bafab407257cb83f8" dependencies = [ "bitflags 1.3.2", "bytemuck", diff --git a/Cargo.toml b/Cargo.toml index 3dcd12ca..cbf247ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,9 @@ git = "https://github.com/pop-os/cosmic-panel" # libcosmic = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "improv" } # cosmic-config = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "improv" } +[patch."https://github.com/Smithay/client-toolkit"] +sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "f49df45"} + [profile.release] opt-level = 3 lto = "thin" diff --git a/pages/desktop/Cargo.toml b/pages/desktop/Cargo.toml index d705015f..8fdd3bb9 100644 --- a/pages/desktop/Cargo.toml +++ b/pages/desktop/Cargo.toml @@ -13,7 +13,7 @@ freedesktop-icons = "0.2.3" futures-lite = "1.13.0" image = "0.24.6" rayon = "1.7.0" -sctk = { package = "smithay-client-toolkit", git = "https://github.com/pop-os/client-toolkit", tag = "themed-pointer"} +sctk = { git = "https://github.com/smithay/client-toolkit/", package = "smithay-client-toolkit", rev = "f49df45"} tokio = { version = "1.28.0", features = ["sync"] } tracing = "0.1.37" wayland-client = "0.30.1"