From d15ebbd340dee7adf184831311b5da73faaa80f5 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 26 Oct 2023 17:27:52 -0400 Subject: [PATCH] chore: update libcosmic --- Cargo.lock | 841 +++++++++++-------------- app/src/pages/desktop/dock/mod.rs | 3 +- app/src/pages/desktop/panel/inner.rs | 116 ++-- app/src/pages/desktop/panel/mod.rs | 3 +- app/src/pages/desktop/wallpaper/mod.rs | 53 +- 5 files changed, 469 insertions(+), 547 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a5c64f..2156ab5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,22 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ab_glyph" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1061f3ff92c2f65800df1f12fc7b4ff44ee14783104187dd04dfee6f11b0fd2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + [[package]] name = "accesskit" version = "0.11.0" @@ -47,9 +63,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom", "once_cell", @@ -58,13 +74,14 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -94,6 +111,30 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3aa2999eb46af81abb65c2d30d446778d7e613b60bbf4e174a027e80f90a3c14" +[[package]] +name = "android-activity" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +dependencies = [ + "android-properties", + "bitflags 1.3.2", + "cc", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum 0.6.1", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -136,12 +177,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -180,9 +215,9 @@ dependencies = [ [[package]] name = "ashpd" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd40a81a15e8f17f4425f55be1fc823de4d65ee23b1599bd6792341ab3f57ede" +checksum = "2c018490e423efb6f032ef575f873ea57b61d44bec763cfe027b8e8852a027cf" dependencies = [ "async-std", "enumflags2", @@ -219,9 +254,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.4" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1da3ae8dabd9c00f453a329dfe1fb28da3c0a72e2478cdcd93171740c20499" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" dependencies = [ "async-lock", "async-task", @@ -272,9 +307,9 @@ dependencies = [ "log", "parking", "polling 2.8.0", - "rustix 0.37.25", + "rustix 0.37.26", "slab", - "socket2 0.4.9", + "socket2 0.4.10", "waker-fn", ] @@ -300,7 +335,7 @@ dependencies = [ "cfg-if", "event-listener 3.0.0", "futures-lite", - "rustix 0.38.19", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -327,7 +362,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.19", + "rustix 0.38.20", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -361,9 +396,9 @@ dependencies = [ [[package]] name = "async-task" -version = "4.4.1" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9441c6b2fe128a7c2bf680a44c34d0df31ce09e5b7e401fcca3faa483dbc921" +checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" [[package]] name = "async-trait" @@ -388,7 +423,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4d45f362125ed144544e57b0ec6de8fd6a296d41a6252fc4a20c0cf12e9ed3a" dependencies = [ - "rustix 0.38.19", + "rustix 0.38.20", "tempfile", "windows-sys 0.48.0", ] @@ -443,9 +478,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.4" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "bit-set" @@ -498,6 +533,25 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys", + "objc2-encode", +] + [[package]] name = "blocking" version = "1.4.1" @@ -594,7 +648,7 @@ dependencies = [ "bitflags 2.4.1", "log", "polling 3.2.0", - "rustix 0.38.19", + "rustix 0.38.20", "slab", "thiserror", ] @@ -606,7 +660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ "calloop 0.12.3", - "rustix 0.38.19", + "rustix 0.38.20", "wayland-backend 0.3.2", "wayland-client 0.31.1", ] @@ -617,6 +671,7 @@ version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ + "jobserver", "libc", ] @@ -673,15 +728,6 @@ dependencies = [ "x11rb 0.9.0", ] -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - [[package]] name = "cocoa" version = "0.24.1" @@ -693,7 +739,7 @@ dependencies = [ "cocoa-foundation", "core-foundation", "core-graphics", - "foreign-types 0.3.2", + "foreign-types", "libc", "objc", ] @@ -830,7 +876,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types", "libc", ] @@ -845,18 +891,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-text" -version = "19.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" -dependencies = [ - "core-foundation", - "core-graphics", - "foreign-types 0.3.2", - "libc", -] - [[package]] name = "core_maths" version = "0.1.0" @@ -883,7 +917,7 @@ dependencies = [ [[package]] name = "cosmic-comp-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-comp#806e10fcd9775442a530abcd9d689710568a7fa4" +source = "git+https://github.com/pop-os/cosmic-comp#7300e23ce8708313e90689146914b452545e5446" dependencies = [ "input", "serde", @@ -892,7 +926,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "atomicwrites", "calloop 0.12.3", @@ -907,7 +941,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "quote", "syn 1.0.109", @@ -916,14 +950,14 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#df55f44f504c1cee9377cb331c1fb9d95ca83967" +source = "git+https://github.com/pop-os/cosmic-panel#021faaf459cbb47e7f5b94316cfd93ccaed7ecf6" dependencies = [ "anyhow", "cosmic-config", "ron", "serde", "tracing", - "wayland-protocols-wlr 0.1.0", + "wayland-protocols-wlr", "xdg-shell-wrapper-config", ] @@ -933,7 +967,7 @@ version = "0.1.0" dependencies = [ "anyhow", "apply", - "ashpd 0.6.5", + "ashpd 0.6.7", "async-channel", "color-eyre", "cosmic-comp-config", @@ -1043,7 +1077,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "almost", "cosmic-config", @@ -1056,9 +1090,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1115,29 +1149,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossfont" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" -dependencies = [ - "cocoa", - "core-foundation", - "core-foundation-sys", - "core-graphics", - "core-text", - "dwrote", - "foreign-types 0.5.0", - "freetype-rs", - "libc", - "log", - "objc", - "once_cell", - "pkg-config", - "servo-fontconfig", - "winapi", -] - [[package]] name = "crunchy" version = "0.2.2" @@ -1170,12 +1181,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "cursor-icon" version = "1.0.0" @@ -1193,38 +1198,14 @@ dependencies = [ "winapi", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1241,24 +1222,13 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core 0.20.3", + "darling_core", "quote", "syn 2.0.38", ] @@ -1270,10 +1240,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.1", + "hashbrown 0.14.2", "lock_api", "once_cell", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -1299,7 +1269,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e8ef033054e131169b8f0f9a7af8f5533a9436fadf3c500ed547f730f07090d" dependencies = [ - "darling 0.20.3", + "darling", "proc-macro2", "quote", "syn 2.0.38", @@ -1403,20 +1373,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" -[[package]] -name = "dwrote" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" -dependencies = [ - "lazy_static", - "libc", - "serde", - "serde_derive", - "winapi", - "wio", -] - [[package]] name = "either" version = "1.9.0" @@ -1530,16 +1486,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "expat-sys" -version = "2.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" -dependencies = [ - "cmake", - "pkg-config", -] - [[package]] name = "exr" version = "1.6.4" @@ -1737,28 +1683,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1", -] - -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared 0.3.1", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", + "foreign-types-shared", ] [[package]] @@ -1767,12 +1692,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - [[package]] name = "form_urlencoded" version = "1.2.0" @@ -1818,28 +1737,6 @@ dependencies = [ "xdg", ] -[[package]] -name = "freetype-rs" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" -dependencies = [ - "bitflags 1.3.2", - "freetype-sys", - "libc", -] - -[[package]] -name = "freetype-sys" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" -dependencies = [ - "cmake", - "libc", - "pkg-config", -] - [[package]] name = "fsevent-sys" version = "4.1.0" @@ -1851,9 +1748,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1866,9 +1763,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -1876,15 +1773,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1894,9 +1791,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" @@ -1915,9 +1812,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", @@ -1926,21 +1823,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -2118,7 +2015,7 @@ checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ "bitflags 2.4.1", "gpu-descriptor-types", - "hashbrown 0.14.1", + "hashbrown 0.14.2", ] [[package]] @@ -2162,16 +2059,16 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] name = "hashbrown" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "allocator-api2", ] @@ -2230,7 +2127,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.2", + "toml 0.8.5", "unic-langid", ] @@ -2293,7 +2190,7 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "iced_accessibility", "iced_core", @@ -2309,7 +2206,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "accesskit", "accesskit_unix", @@ -2318,7 +2215,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -2333,7 +2230,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "futures", "iced_core", @@ -2346,7 +2243,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2357,27 +2254,27 @@ dependencies = [ "kamadak-exif", "log", "lyon_path", - "raw-window-handle 0.5.2", + "raw-window-handle", "thiserror", ] [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "iced_graphics", "iced_tiny_skia", "iced_wgpu", "log", - "raw-window-handle 0.5.2", + "raw-window-handle", "thiserror", ] [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "iced_accessibility", "iced_core", @@ -2389,7 +2286,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "enum-repr", "float-cmp", @@ -2400,7 +2297,7 @@ dependencies = [ "iced_style", "itertools 0.10.5", "lazy_static", - "raw-window-handle 0.5.2", + "raw-window-handle", "smithay-client-toolkit 0.17.0", "smithay-clipboard", "thiserror", @@ -2413,7 +2310,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "iced_core", "once_cell", @@ -2423,14 +2320,14 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "bytemuck", "cosmic-text", "iced_graphics", "kurbo", "log", - "raw-window-handle 0.5.2", + "raw-window-handle", "resvg", "rustc-hash", "softbuffer", @@ -2441,7 +2338,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2453,7 +2350,7 @@ dependencies = [ "log", "lyon", "once_cell", - "raw-window-handle 0.5.2", + "raw-window-handle", "resvg", "rustc-hash", "twox-hash", @@ -2463,7 +2360,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "iced_renderer", "iced_runtime", @@ -2478,13 +2375,13 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "iced_graphics", "iced_runtime", "iced_style", "log", - "raw-window-handle 0.5.2", + "raw-window-handle", "thiserror", "web-sys", "winapi", @@ -2662,7 +2559,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.1", + "hashbrown 0.14.2", ] [[package]] @@ -2693,7 +2590,7 @@ checksum = "e6e74cd82cedcd66db78742a8337bdc48f188c4d2c12742cbc5cd85113f0b059" dependencies = [ "bitflags 1.3.2", "input-sys", - "io-lifetimes", + "io-lifetimes 1.0.11", "libc", "log", "udev", @@ -2750,6 +2647,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "io-lifetimes" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bffb4def18c48926ccac55c1223e02865ce1a821751a95920448662696e7472c" + [[package]] name = "is-terminal" version = "0.4.9" @@ -2757,7 +2660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.19", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -2785,6 +2688,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + [[package]] name = "jpeg-decoder" version = "0.3.0" @@ -2849,7 +2761,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", ] [[package]] @@ -2882,7 +2794,7 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" +source = "git+https://github.com/pop-os/libcosmic#6b517ddb0e7fe2ed8b04d6f71d1c45a374c92e14" dependencies = [ "apply", "ashpd 0.5.0", @@ -2982,9 +2894,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -3005,7 +2917,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" dependencies = [ - "hashbrown 0.14.1", + "hashbrown 0.14.2", ] [[package]] @@ -3034,7 +2946,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74df1ff0a0147282eb10699537a03baa7d31972b58984a1d44ce0624043fe8ad" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "euclid", "num-traits", ] @@ -3138,7 +3050,7 @@ dependencies = [ "bitflags 1.3.2", "block", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types", "log", "objc", ] @@ -3161,9 +3073,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "log", @@ -3215,8 +3127,8 @@ dependencies = [ "bitflags 1.3.2", "jni-sys", "ndk-sys", - "num_enum", - "raw-window-handle 0.5.2", + "num_enum 0.5.11", + "raw-window-handle", "thiserror", ] @@ -3226,35 +3138,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-glue" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" -dependencies = [ - "libc", - "log", - "ndk", - "ndk-context", - "ndk-macro", - "ndk-sys", - "once_cell", - "parking_lot 0.12.1", -] - -[[package]] -name = "ndk-macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" -dependencies = [ - "darling 0.13.4", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ndk-sys" version = "0.4.1+23.1.7779620" @@ -3456,7 +3339,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", ] [[package]] @@ -3471,6 +3363,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "objc" version = "0.2.7" @@ -3492,6 +3396,32 @@ dependencies = [ "objc_id", ] +[[package]] +name = "objc-sys" +version = "0.2.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + +[[package]] +name = "objc2" +version = "0.3.0-beta.3.patch-leaks.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +dependencies = [ + "block2", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys", +] + [[package]] name = "objc_exception" version = "0.1.2" @@ -3531,6 +3461,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "orbclient" +version = "0.3.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8378ac0dfbd4e7895f2d2c1f1345cab3836910baf3a300b000d04250f0c8428f" +dependencies = [ + "redox_syscall 0.3.5", +] + [[package]] name = "ordered-multimap" version = "0.4.3" @@ -3581,6 +3520,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "owned_ttf_parser" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706de7e2214113d63a8238d1910463cfce781129a6f263d13fdb09ff64355ba4" +dependencies = [ + "ttf-parser 0.19.2", +] + [[package]] name = "owo-colors" version = "3.5.0" @@ -3613,9 +3561,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -3635,7 +3583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -3654,13 +3602,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -3806,7 +3754,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.19", + "rustix 0.38.20", "tracing", "windows-sys 0.48.0", ] @@ -3944,15 +3892,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "977b1e897f9d764566891689e642653e5ed90c6895106acd005eb4c1d0203991" -[[package]] -name = "raw-window-handle" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" -dependencies = [ - "cty", -] - [[package]] name = "raw-window-handle" version = "0.5.2" @@ -4003,6 +3942,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -4154,13 +4102,13 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.37.25" +version = "0.37.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4eb579851244c2c03e7c24f501c3432bed80b8f720af1d6e5b0e0f01555a035" +checksum = "84f3f8f960ed3b5a59055428714943298bf3fa2d4a1d53135084e0544829d995" dependencies = [ "bitflags 1.3.2", "errno", - "io-lifetimes", + "io-lifetimes 1.0.11", "libc", "linux-raw-sys 0.3.8", "windows-sys 0.48.0", @@ -4168,9 +4116,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.19" +version = "0.38.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" +checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" dependencies = [ "bitflags 2.4.1", "errno", @@ -4218,15 +4166,6 @@ dependencies = [ "unicode-script", ] -[[package]] -name = "safe_arch" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" -dependencies = [ - "bytemuck", -] - [[package]] name = "same-file" version = "1.0.6" @@ -4250,14 +4189,15 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.4.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" +checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" dependencies = [ - "crossfont", + "ab_glyph", "log", + "memmap2 0.5.10", "smithay-client-toolkit 0.16.1", - "tiny-skia 0.7.0", + "tiny-skia 0.8.4", ] [[package]] @@ -4268,18 +4208,18 @@ checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af" [[package]] name = "serde" -version = "1.0.189" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", @@ -4299,34 +4239,13 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] -[[package]] -name = "servo-fontconfig" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" -dependencies = [ - "libc", - "servo-fontconfig-sys", -] - -[[package]] -name = "servo-fontconfig-sys" -version = "5.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" -dependencies = [ - "expat-sys", - "freetype-sys", - "pkg-config", -] - [[package]] name = "sha1" version = "0.10.6" @@ -4452,7 +4371,7 @@ dependencies = [ "wayland-csd-frame", "wayland-cursor 0.31.0", "wayland-protocols 0.31.0", - "wayland-protocols-wlr 0.2.0", + "wayland-protocols-wlr", "wayland-scanner 0.31.0", "xkbcommon", "xkeysym", @@ -4470,9 +4389,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -4480,9 +4399,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys 0.48.0", @@ -4498,11 +4417,11 @@ dependencies = [ "cocoa", "core-graphics", "fastrand 1.9.0", - "foreign-types 0.3.2", + "foreign-types", "log", "nix 0.26.4", "objc", - "raw-window-handle 0.5.2", + "raw-window-handle", "redox_syscall 0.3.5", "thiserror", "wasm-bindgen", @@ -4654,9 +4573,9 @@ dependencies = [ [[package]] name = "taffy" version = "0.3.11" -source = "git+https://github.com/DioxusLabs/taffy#daa07e0f4e3e009f5b0c11ada5df9785efd4b2c2" +source = "git+https://github.com/DioxusLabs/taffy#d4374b93f0ec2c0ace42d3feafec22d3af1940d8" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "grid", "num-traits", "slotmap", @@ -4677,7 +4596,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.19", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -4692,18 +4611,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", @@ -4742,17 +4661,16 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.7.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" +checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" dependencies = [ "arrayref", - "arrayvec 0.5.2", + "arrayvec", "bytemuck", "cfg-if", "png", - "safe_arch", - "tiny-skia-path 0.7.0", + "tiny-skia-path 0.8.4", ] [[package]] @@ -4762,7 +4680,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7db11798945fa5c3e5490c794ccca7c6de86d3afdd54b4eb324109939c6f37bc" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec", "bytemuck", "cfg-if", "log", @@ -4772,12 +4690,13 @@ dependencies = [ [[package]] name = "tiny-skia-path" -version = "0.7.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" +checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" dependencies = [ "arrayref", "bytemuck", + "strict-num", ] [[package]] @@ -4829,7 +4748,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.4", + "socket2 0.5.5", "tracing", "windows-sys 0.48.0", ] @@ -4845,21 +4764,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "3efaf127c78d5339cc547cce4e4d973bd5e4f56e949a06d091c082ebeef2f800" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.20.5", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -4877,9 +4796,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "782bf6c2ddf761c1e7855405e8975472acf76f7f36d0d4328bd3b7a2fae12a85" dependencies = [ "indexmap 2.0.2", "serde", @@ -4890,9 +4809,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -4932,12 +4851,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -5195,9 +5114,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" +checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" [[package]] name = "vec_map" @@ -5322,7 +5241,7 @@ checksum = "41b48e27457e8da3b2260ac60d0a94512f5cba36448679f3747c0865b7893ed8" dependencies = [ "cc", "downcast-rs", - "io-lifetimes", + "io-lifetimes 1.0.11", "nix 0.26.4", "scoped-tls", "smallvec", @@ -5450,7 +5369,6 @@ dependencies = [ "wayland-backend 0.1.2", "wayland-client 0.30.2", "wayland-scanner 0.30.1", - "wayland-server", ] [[package]] @@ -5463,19 +5381,6 @@ dependencies = [ "wayland-backend 0.3.2", "wayland-client 0.31.1", "wayland-scanner 0.31.0", -] - -[[package]] -name = "wayland-protocols-wlr" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce991093320e4a6a525876e6b629ab24da25f9baef0c2e0080ad173ec89588a" -dependencies = [ - "bitflags 1.3.2", - "wayland-backend 0.1.2", - "wayland-client 0.30.2", - "wayland-protocols 0.30.1", - "wayland-scanner 0.30.1", "wayland-server", ] @@ -5490,6 +5395,7 @@ dependencies = [ "wayland-client 0.31.1", "wayland-protocols 0.31.0", "wayland-scanner 0.31.0", + "wayland-server", ] [[package]] @@ -5527,16 +5433,16 @@ dependencies = [ [[package]] name = "wayland-server" -version = "0.30.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c43c28096fe1d49fff7d1079404fdd0f669cd1a5b00c615bdfe71bb1884d23a" +checksum = "3f3f0c52a445936ca1184c98f1a69cf4ad9c9130788884531ef04428468cb1ce" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "downcast-rs", - "io-lifetimes", + "io-lifetimes 2.0.2", "nix 0.26.4", - "wayland-backend 0.1.2", - "wayland-scanner 0.30.1", + "wayland-backend 0.3.2", + "wayland-scanner 0.31.0", ] [[package]] @@ -5595,14 +5501,14 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "480c965c9306872eb6255fa55e4b4953be55a8b64d57e61d7ff840d3dcc051cd" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "cfg-if", "js-sys", "log", "naga", "parking_lot 0.12.1", "profiling", - "raw-window-handle 0.5.2", + "raw-window-handle", "smallvec", "static_assertions", "wasm-bindgen", @@ -5619,7 +5525,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "bit-vec", "bitflags 2.4.1", "codespan-reporting", @@ -5627,7 +5533,7 @@ dependencies = [ "naga", "parking_lot 0.12.1", "profiling", - "raw-window-handle 0.5.2", + "raw-window-handle", "rustc-hash", "smallvec", "thiserror", @@ -5643,14 +5549,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ecb3258078e936deee14fd4e0febe1cfe9bbb5ffef165cb60218d2ee5eb4448" dependencies = [ "android_system_properties", - "arrayvec 0.7.4", + "arrayvec", "ash", "bit-set", "bitflags 2.4.1", "block", "core-graphics-types", "d3d12", - "foreign-types 0.3.2", + "foreign-types", "glow", "gpu-alloc", "gpu-allocator", @@ -5667,7 +5573,7 @@ dependencies = [ "parking_lot 0.12.1", "profiling", "range-alloc", - "raw-window-handle 0.5.2", + "raw-window-handle", "renderdoc-sys", "rustc-hash", "smallvec", @@ -5745,7 +5651,7 @@ dependencies = [ "clipboard_macos", "clipboard_wayland", "clipboard_x11", - "raw-window-handle 0.5.2", + "raw-window-handle", "thiserror", ] @@ -5767,19 +5673,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -5795,6 +5688,15 @@ 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" @@ -5846,12 +5748,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -5864,12 +5760,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -5882,12 +5772,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -5900,12 +5784,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -5930,12 +5808,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -5950,11 +5822,12 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winit" -version = "0.27.2" -source = "git+https://github.com/pop-os/winit.git?branch=iced#d35712bba65eb1dad8f6f546af49b96fdad9467e" +version = "0.28.6" +source = "git+https://github.com/pop-os/winit.git?branch=master#4060baa6ad2237092fed166d96f18d5394f92ef1" dependencies = [ + "android-activity", "bitflags 1.3.2", - "cocoa", + "cfg_aliases", "core-foundation", "core-graphics", "dispatch", @@ -5963,20 +5836,21 @@ dependencies = [ "log", "mio", "ndk", - "ndk-glue", - "objc", + "objc2", "once_cell", - "parking_lot 0.12.1", + "orbclient", "percent-encoding", - "raw-window-handle 0.4.3", - "raw-window-handle 0.5.2", + "raw-window-handle", + "redox_syscall 0.3.5", "sctk-adwaita", "smithay-client-toolkit 0.16.1", "wasm-bindgen", "wayland-client 0.29.5", + "wayland-commons", "wayland-protocols 0.29.5", + "wayland-scanner 0.29.5", "web-sys", - "windows-sys 0.36.1", + "windows-sys 0.45.0", "x11-dl", ] @@ -5989,15 +5863,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "wio" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" -dependencies = [ - "winapi", -] - [[package]] name = "writeable" version = "0.5.3" @@ -6080,10 +5945,10 @@ dependencies = [ [[package]] name = "xdg-shell-wrapper-config" version = "0.1.0" -source = "git+https://github.com/pop-os/xdg-shell-wrapper#652888ce7a591fb6b03b4d9f215e5bf0a1c8e629" +source = "git+https://github.com/pop-os/xdg-shell-wrapper#fa62a8c865cc5ba391a48fe4753a8687d8ab8ded" dependencies = [ "serde", - "wayland-protocols-wlr 0.1.0", + "wayland-protocols-wlr", ] [[package]] @@ -6226,6 +6091,26 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" +[[package]] +name = "zerocopy" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81ba595b9f2772fbee2312de30eeb80ec773b4cb2f1e8098db024afadda6c06f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772666c41fb6dceaf520b564b962d738a8e1a83b41bd48945f50837aed78bb1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "zerofrom" version = "0.1.3" diff --git a/app/src/pages/desktop/dock/mod.rs b/app/src/pages/desktop/dock/mod.rs index 1937788..47b64fd 100644 --- a/app/src/pages/desktop/dock/mod.rs +++ b/app/src/pages/desktop/dock/mod.rs @@ -117,7 +117,8 @@ impl Default for Page { config_helper, panel_config, container_config, - outputs: HashMap::new(), + outputs_map: HashMap::new(), + ..Default::default() }, } } diff --git a/app/src/pages/desktop/panel/inner.rs b/app/src/pages/desktop/panel/inner.rs index 55704c0..17fc5b4 100644 --- a/app/src/pages/desktop/panel/inner.rs +++ b/app/src/pages/desktop/panel/inner.rs @@ -5,7 +5,7 @@ use cosmic::{ sctk::reexports::client::{backend::ObjectId, protocol::wl_output::WlOutput, Proxy}, theme, widget::{ - button, container, horizontal_space, icon, list, pick_list, row, settings, text, toggler, + button, container, dropdown, horizontal_space, icon, list, row, settings, text, toggler, }, Element, }; @@ -16,14 +16,40 @@ use cosmic_panel_config::{ CosmicPanelOuput, PanelAnchor, PanelSize, }; use cosmic_settings_page::{self as page, Section}; -use std::{borrow::Cow, collections::HashMap}; +use std::collections::HashMap; pub struct PageInner { pub(crate) config_helper: Option, pub(crate) panel_config: Option, + pub outputs: Vec, + pub anchors: Vec, + pub backgrounds: Vec, pub(crate) container_config: Option, // TODO move these into panel config - pub(crate) outputs: HashMap, + pub(crate) outputs_map: HashMap, +} + +impl Default for PageInner { + fn default() -> Self { + Self { + config_helper: Default::default(), + panel_config: Default::default(), + outputs: vec![fl!("all")], + anchors: vec![ + Anchor(PanelAnchor::Left).to_string(), + Anchor(PanelAnchor::Right).to_string(), + Anchor(PanelAnchor::Top).to_string(), + Anchor(PanelAnchor::Bottom).to_string(), + ], + backgrounds: vec![ + Appearance::Match.to_string(), + Appearance::Light.to_string(), + Appearance::Dark.to_string(), + ], + container_config: Default::default(), + outputs_map: Default::default(), + } + } } pub trait PanelPage { @@ -71,30 +97,20 @@ pub(crate) fn behavior_and_position< )) .add(settings::item( &descriptions[1], - pick_list( - Cow::from(vec![ - Anchor(PanelAnchor::Top), - Anchor(PanelAnchor::Left), - Anchor(PanelAnchor::Right), - Anchor(PanelAnchor::Bottom), - ]), - Some(Anchor(panel_config.anchor)), - |a| Message::PanelAnchor(a.0), + dropdown( + page.anchors.as_slice(), + Some(panel_config.anchor as usize), + Message::PanelAnchor, ), )) .add(settings::item( &descriptions[2], - pick_list( - Cow::from( - Some(fl!("all")) - .into_iter() - .chain(page.outputs.values().map(|(name, _)| name.clone())) - .collect::>(), - ), + dropdown( + page.outputs.as_slice(), match &panel_config.output { - CosmicPanelOuput::All => Some(fl!("all")), + CosmicPanelOuput::All => Some(0), CosmicPanelOuput::Active => None, - CosmicPanelOuput::Name(ref name) => Some(name.clone()), + CosmicPanelOuput::Name(n) => page.outputs.iter().position(|o| o == n), }, Message::Output, ), @@ -141,9 +157,14 @@ pub(crate) fn style< )) .add(settings::item( &descriptions[2], - pick_list( - Cow::from(vec![Appearance::Match, Appearance::Light, Appearance::Dark]), - panel_config.background.clone().try_into().ok(), + dropdown( + inner.backgrounds.as_slice(), + match panel_config.background { + CosmicPanelBackground::ThemeDefault => Some(0), + CosmicPanelBackground::Dark => Some(1), + CosmicPanelBackground::Light => Some(2), + CosmicPanelBackground::Color(_) => None, + }, Message::Appearance, ), )) @@ -312,11 +333,11 @@ impl From for CosmicPanelBackground { pub enum Message { // panel messages AutoHidePanel(bool), - PanelAnchor(PanelAnchor), - Output(String), + PanelAnchor(usize), + Output(usize), AnchorGap(bool), PanelSize(PanelSize), - Appearance(Appearance), + Appearance(usize), ExtendToEdge(bool), Opacity(f32), OutputAdded(String, WlOutput), @@ -346,14 +367,25 @@ impl PageInner { panel_config.autohide = None; } } - Message::PanelAnchor(anchor) => { - panel_config.anchor = anchor; + Message::PanelAnchor(i) => { + if let Some(anchor) = [ + PanelAnchor::Left, + PanelAnchor::Right, + PanelAnchor::Top, + PanelAnchor::Bottom, + ] + .iter() + .find(|a| a.to_string() == self.anchors[i]) + { + panel_config.anchor = *anchor; + } } - Message::Output(name) => { - panel_config.output = match name { - s if s == fl!("all") => CosmicPanelOuput::All, - _ => CosmicPanelOuput::Name(name), - }; + Message::Output(i) => { + if i == 0 { + panel_config.output = CosmicPanelOuput::All; + } else { + panel_config.output = CosmicPanelOuput::Name(self.outputs[i].clone()) + } } Message::AnchorGap(enabled) => { panel_config.anchor_gap = enabled; @@ -368,7 +400,12 @@ impl PageInner { panel_config.size = size; } Message::Appearance(a) => { - panel_config.background = a.into(); + if let Some(b) = [Appearance::Match, Appearance::Light, Appearance::Dark] + .iter() + .find(|b| b.to_string() == self.backgrounds[a]) + { + panel_config.background = b.clone().into(); + } } Message::ExtendToEdge(enabled) => { panel_config.expand_to_edges = enabled; @@ -377,10 +414,15 @@ impl PageInner { panel_config.opacity = opacity; } Message::OutputAdded(name, output) => { - self.outputs.insert(output.id(), (name, output)); + self.outputs.push(name.clone()); + self.outputs_map.insert(output.id(), (name, output)); } Message::OutputRemoved(output) => { - self.outputs.remove(&output.id()); + if let Some((name, _)) = self.outputs_map.remove(&output.id()) { + if let Some(pos) = self.outputs.iter().position(|o| o == &name) { + self.outputs.remove(pos); + } + } } Message::PanelConfig(c) => { self.panel_config = Some(c); diff --git a/app/src/pages/desktop/panel/mod.rs b/app/src/pages/desktop/panel/mod.rs index 29331de..123369a 100644 --- a/app/src/pages/desktop/panel/mod.rs +++ b/app/src/pages/desktop/panel/mod.rs @@ -75,7 +75,8 @@ impl Default for Page { config_helper, panel_config, container_config, - outputs: HashMap::new(), + outputs_map: HashMap::new(), + ..Default::default() }, } } diff --git a/app/src/pages/desktop/wallpaper/mod.rs b/app/src/pages/desktop/wallpaper/mod.rs index de5e5e4..a29cddc 100644 --- a/app/src/pages/desktop/wallpaper/mod.rs +++ b/app/src/pages/desktop/wallpaper/mod.rs @@ -11,7 +11,7 @@ use std::{ use apply::Apply; use cosmic::widget::{ - list_column, + dropdown, list_column, segmented_button::{self, SingleSelectModel}, segmented_selection, settings, text, toggler, }; @@ -44,11 +44,11 @@ const HOUR_2: usize = 5; #[derive(Clone, Debug)] pub enum Message { - ChangeCategory(String), + ChangeCategory(usize), ColorSelect(wallpaper::Color), Fit(String), Output(segmented_button::Entity), - RotationFrequency(String), + RotationFrequency(usize), SameBackground(bool), Select(DefaultKey), Slideshow(bool), @@ -322,21 +322,19 @@ impl Page { } /// Changes the selection category, such as wallpaper select or color select. - fn change_category(&mut self, category: &str) { - if let Some(pos) = self.categories.iter().position(|c| c == category) { - self.active_category = pos; - match pos { - CATEGORY_SYSTEM_WALLPAPERS => { - self.select_first_background(); - } - - CATEGORY_COLOR => { - self.selection.active = Choice::Color(wallpaper::DEFAULT_COLORS[0].clone()); - self.cache_display_image(); - } - - _ => (), + fn change_category(&mut self, pos: usize) { + self.active_category = pos; + match pos { + CATEGORY_SYSTEM_WALLPAPERS => { + self.select_first_background(); } + + CATEGORY_COLOR => { + self.selection.active = Choice::Color(wallpaper::DEFAULT_COLORS[0].clone()); + self.cache_display_image(); + } + + _ => (), } } @@ -349,13 +347,8 @@ impl Page { } // Changes the slideshow background rotation frequency - pub fn change_rotation_frequency(&mut self, option: &str) { - self.selected_rotation = self - .rotation_options - .iter() - .enumerate() - .find(|(_, key)| **key == option) - .map_or(0, |(indice, _)| indice); + pub fn change_rotation_frequency(&mut self, option: usize) { + self.selected_rotation = option; self.rotation_frequency = match self.selected_rotation { MINUTES_5 => 300, @@ -382,7 +375,7 @@ impl Page { #[allow(clippy::too_many_lines)] pub fn update(&mut self, message: Message) { match message { - Message::ChangeCategory(category) => self.change_category(&category), + Message::ChangeCategory(pos) => self.change_category(pos), Message::ColorSelect(color) => { self.selection.active = Choice::Color(color); @@ -402,7 +395,7 @@ impl Page { Message::Output(id) => self.change_output(id), - Message::RotationFrequency(option) => self.change_rotation_frequency(&option), + Message::RotationFrequency(pos) => self.change_rotation_frequency(pos), Message::SameBackground(value) => { self.config.same_on_all = value; @@ -633,9 +626,9 @@ pub fn settings() -> Section { column .add(settings::item( &descriptions[3], - cosmic::iced::widget::pick_list( + dropdown( &page.rotation_options, - page.rotation_options.get(page.selected_rotation).cloned(), + Some(page.selected_rotation), Message::RotationFrequency, ), )) @@ -645,9 +638,9 @@ pub fn settings() -> Section { } }); - let category_selection = cosmic::iced::widget::pick_list( + let category_selection = dropdown( &page.categories, - Some(page.categories[page.active_category].clone()), + Some(page.active_category), Message::ChangeCategory, );