diff --git a/Cargo.lock b/Cargo.lock index 16807bfb..2decf0f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,7 +84,7 @@ dependencies = [ "accesskit_consumer", "hashbrown 0.16.1", "static_assertions", - "windows", + "windows 0.61.3", "windows-core 0.61.2", ] @@ -225,9 +225,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07d1f37ff60921c83bdfc7407723bdefe89b44b98a9b772f225c8f9d67141a6" +checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207" dependencies = [ "rustversion", ] @@ -250,6 +250,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" +[[package]] +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" +dependencies = [ + "libloading", +] + [[package]] name = "ashpd" version = "0.11.1" @@ -397,9 +406,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" dependencies = [ "async-io", "async-lock", @@ -890,7 +899,7 @@ dependencies = [ "bitflags 1.3.2", "block", "cocoa-foundation", - "core-foundation", + "core-foundation 0.9.4", "core-graphics", "foreign-types", "libc", @@ -905,8 +914,8 @@ checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" dependencies = [ "bitflags 1.3.2", "block", - "core-foundation", - "core-graphics-types", + "core-foundation 0.9.4", + "core-graphics-types 0.1.3", "libc", "objc", ] @@ -917,6 +926,8 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ + "serde", + "termcolor", "unicode-width", ] @@ -976,6 +987,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -989,8 +1010,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", + "core-foundation 0.9.4", + "core-graphics-types 0.1.3", "foreign-types", "libc", ] @@ -1002,7 +1023,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.11.0", + "core-foundation 0.10.1", "libc", ] @@ -1180,7 +1212,7 @@ dependencies = [ "futures-util", "i18n-embed", "i18n-embed-fl", - "indexmap 2.13.1", + "indexmap 2.14.0", "libcosmic", "nm-secret-agent-manager", "rust-embed", @@ -1362,7 +1394,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1383,7 +1415,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "quote", "syn", @@ -1477,7 +1509,7 @@ dependencies = [ [[package]] name = "cosmic-pipewire" version = "1.0.7" -source = "git+https://github.com/pop-os/cosmic-settings#59ccde22fae21cfb323ff45fa945d362a20992a0" +source = "git+https://github.com/pop-os/cosmic-settings#04da80bb904f500ea07ec6ee4ea45d3b50adb9bb" dependencies = [ "intmap", "libspa", @@ -1505,7 +1537,7 @@ dependencies = [ [[package]] name = "cosmic-settings-a11y-manager-subscription" version = "1.0.7" -source = "git+https://github.com/pop-os/cosmic-settings#59ccde22fae21cfb323ff45fa945d362a20992a0" +source = "git+https://github.com/pop-os/cosmic-settings#04da80bb904f500ea07ec6ee4ea45d3b50adb9bb" dependencies = [ "cosmic-protocols", "iced_futures", @@ -1519,7 +1551,7 @@ dependencies = [ [[package]] name = "cosmic-settings-accessibility-subscription" version = "1.0.7" -source = "git+https://github.com/pop-os/cosmic-settings#59ccde22fae21cfb323ff45fa945d362a20992a0" +source = "git+https://github.com/pop-os/cosmic-settings#04da80bb904f500ea07ec6ee4ea45d3b50adb9bb" dependencies = [ "cosmic-dbus-a11y", "futures", @@ -1532,7 +1564,7 @@ dependencies = [ [[package]] name = "cosmic-settings-airplane-mode-subscription" version = "1.0.7" -source = "git+https://github.com/pop-os/cosmic-settings#59ccde22fae21cfb323ff45fa945d362a20992a0" +source = "git+https://github.com/pop-os/cosmic-settings#04da80bb904f500ea07ec6ee4ea45d3b50adb9bb" dependencies = [ "futures", "iced_futures", @@ -1565,7 +1597,7 @@ dependencies = [ [[package]] name = "cosmic-settings-daemon-subscription" version = "1.0.7" -source = "git+https://github.com/pop-os/cosmic-settings#59ccde22fae21cfb323ff45fa945d362a20992a0" +source = "git+https://github.com/pop-os/cosmic-settings#04da80bb904f500ea07ec6ee4ea45d3b50adb9bb" dependencies = [ "futures", "iced_futures", @@ -1578,7 +1610,7 @@ dependencies = [ [[package]] name = "cosmic-settings-network-manager-subscription" version = "1.0.7" -source = "git+https://github.com/pop-os/cosmic-settings#59ccde22fae21cfb323ff45fa945d362a20992a0" +source = "git+https://github.com/pop-os/cosmic-settings#04da80bb904f500ea07ec6ee4ea45d3b50adb9bb" dependencies = [ "bitflags 2.11.0", "cosmic-dbus-networkmanager", @@ -1597,7 +1629,7 @@ dependencies = [ [[package]] name = "cosmic-settings-sound-subscription" version = "1.0.7" -source = "git+https://github.com/pop-os/cosmic-settings#59ccde22fae21cfb323ff45fa945d362a20992a0" +source = "git+https://github.com/pop-os/cosmic-settings#04da80bb904f500ea07ec6ee4ea45d3b50adb9bb" dependencies = [ "cosmic-pipewire", "futures", @@ -1612,7 +1644,7 @@ dependencies = [ [[package]] name = "cosmic-settings-upower-subscription" version = "1.0.7" -source = "git+https://github.com/pop-os/cosmic-settings#59ccde22fae21cfb323ff45fa945d362a20992a0" +source = "git+https://github.com/pop-os/cosmic-settings#04da80bb904f500ea07ec6ee4ea45d3b50adb9bb" dependencies = [ "futures", "iced_futures", @@ -1626,7 +1658,7 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.18.2" -source = "git+https://github.com/pop-os/cosmic-text.git#9a5579f5231bc52b3688a2de3643091f1ce32cbd" +source = "git+https://github.com/pop-os/cosmic-text.git#9a2ab09f06905e91f41d64ac6eee887726e7fd76" dependencies = [ "bitflags 2.11.0", "fontdb", @@ -1649,7 +1681,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "almost", "configparser", @@ -2264,9 +2296,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "fdeflate" @@ -2399,9 +2431,9 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "font-types" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73829a7b5c91198af28a99159b7ae4afbb252fb906159ff7f189f3a2ceaa3df2" +checksum = "2d9237c6d82152100c691fb77ea18037b402bcc7257d2c876a4ffac81bc22a1c" dependencies = [ "bytemuck", ] @@ -2486,7 +2518,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc6d3a3635983a889f065aa9ce760384713f23a9b4a04f696f86c39a5d7a6a5a" dependencies = [ - "indexmap 2.13.1", + "indexmap 2.14.0", "nom 8.0.0", ] @@ -2686,6 +2718,17 @@ dependencies = [ "weezl", ] +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + [[package]] name = "glam" version = "0.25.0" @@ -2698,6 +2741,78 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +[[package]] +name = "glow" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "gpu-alloc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.11.0", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +dependencies = [ + "bitflags 2.11.0", +] + +[[package]] +name = "gpu-allocator" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" +dependencies = [ + "log", + "presser", + "thiserror 1.0.69", + "windows 0.58.0", +] + +[[package]] +name = "gpu-descriptor" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" +dependencies = [ + "bitflags 2.11.0", + "gpu-descriptor-types", + "hashbrown 0.15.5", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" +dependencies = [ + "bitflags 2.11.0", +] + [[package]] name = "grid" version = "1.0.0" @@ -2763,6 +2878,12 @@ dependencies = [ "foldhash 0.2.0", ] +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + [[package]] name = "heck" version = "0.4.1" @@ -2911,7 +3032,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "dnd", "iced_accessibility", @@ -2932,7 +3053,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "accesskit", "accesskit_winit", @@ -2941,7 +3062,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "bitflags 2.11.0", "bytes", @@ -2965,7 +3086,7 @@ dependencies = [ [[package]] name = "iced_debug" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "iced_core", "iced_futures", @@ -2975,7 +3096,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "futures", "iced_core", @@ -2989,7 +3110,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "bitflags 2.11.0", "bytemuck", @@ -3010,7 +3131,7 @@ dependencies = [ [[package]] name = "iced_program" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "iced_graphics", "iced_runtime", @@ -3019,7 +3140,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3031,7 +3152,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -3046,7 +3167,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "bytemuck", "cosmic-text", @@ -3063,11 +3184,12 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "as-raw-xcb-connection", "bitflags 2.11.0", "bytemuck", + "cosmic-client-toolkit", "cryoglyph", "futures", "glam", @@ -3093,7 +3215,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.2" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3111,7 +3233,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "cosmic-client-toolkit", "cursor-icon", @@ -3616,12 +3738,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a8a2b9cb3e0b0c1803dbb0758ffac5de2f425b23c28f518faabd9d805342ff" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.17.0", "serde", "serde_core", ] @@ -3671,9 +3793,9 @@ dependencies = [ [[package]] name = "input-sys" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd4f5b4d1c00331c5245163aacfe5f20be75b564c7112d45893d4ae038119eb0" +checksum = "36eee07d8e02bd95bf52b2e642cf13d33701b94c6e4b04fbf1d1fb07e9cb19e7" [[package]] name = "intl-memoizer" @@ -3881,6 +4003,23 @@ dependencies = [ "serde", ] +[[package]] +name = "khronos-egl" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" +dependencies = [ + "libc", + "libloading", + "pkg-config", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "known-folders" version = "1.4.2" @@ -3952,7 +4091,7 @@ checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" [[package]] name = "libcosmic" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#cdd825b953b528b19907e185957f8bc203514d3d" +source = "git+https://github.com/pop-os/libcosmic#6caccaba337ed9bab21c5fe3c2aa7392e322e89c" dependencies = [ "apply", "ashpd 0.12.3", @@ -3977,6 +4116,7 @@ dependencies = [ "iced_renderer", "iced_runtime", "iced_tiny_skia", + "iced_wgpu", "iced_widget", "iced_winit", "image", @@ -4281,6 +4421,21 @@ dependencies = [ "autocfg", ] +[[package]] +name = "metal" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" +dependencies = [ + "bitflags 2.11.0", + "block", + "core-graphics-types 0.2.0", + "foreign-types", + "log", + "objc", + "paste", +] + [[package]] name = "mime" version = "0.1.0" @@ -4367,12 +4522,13 @@ dependencies = [ "half", "hashbrown 0.16.1", "hexf-parse", - "indexmap 2.13.1", + "indexmap 2.14.0", "libm", "log", "num-traits", "once_cell", "rustc-hash 1.1.0", + "spirv", "thiserror 2.0.18", "unicode-ident", ] @@ -4843,6 +4999,15 @@ dependencies = [ "libredox", ] +[[package]] +name = "ordered-float" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7d950ca161dc355eaf28f82b11345ed76c6e1f6eb1f4f4479e0323b9e2fbd0e" +dependencies = [ + "num-traits", +] + [[package]] name = "ordered-stream" version = "0.2.0" @@ -4940,6 +5105,12 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "percent-encoding" version = "2.3.2" @@ -5209,6 +5380,12 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + [[package]] name = "prettyplease" version = "0.2.37" @@ -5395,6 +5572,12 @@ dependencies = [ "getrandom 0.3.4", ] +[[package]] +name = "range-alloc" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" + [[package]] name = "rangemap" version = "1.7.1" @@ -5785,9 +5968,9 @@ checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" @@ -5837,7 +6020,7 @@ version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ - "indexmap 2.13.1", + "indexmap 2.14.0", "itoa", "memchr", "serde", @@ -5875,7 +6058,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.13.1", + "indexmap 2.14.0", "schemars 0.9.0", "schemars 1.2.1", "serde_core", @@ -6091,6 +6274,15 @@ dependencies = [ "x11rb", ] +[[package]] +name = "spirv" +version = "0.3.0+sdk-1.3.268.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +dependencies = [ + "bitflags 2.11.0", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -6262,6 +6454,15 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -6423,9 +6624,9 @@ checksum = "b130bd8a58c163224b44e217b4239ca7b927d82bf6cc2fea1fc561d15056e3f7" [[package]] name = "tokio" -version = "1.51.0" +version = "1.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd1c4c0fc4a7ab90fc15ef6daaa3ec3b893f004f915f2392557ed23237820cd" +checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c" dependencies = [ "bytes", "libc", @@ -6476,7 +6677,7 @@ version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ - "indexmap 2.13.1", + "indexmap 2.14.0", "serde_core", "serde_spanned", "toml_datetime", @@ -6496,11 +6697,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.10+spec-1.1.0" +version = "0.25.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82418ca169e235e6c399a84e395ab6debeb3bc90edc959bf0f48647c6a32d1b" +checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" dependencies = [ - "indexmap 2.13.1", + "indexmap 2.14.0", "toml_datetime", "toml_parser", "winnow 1.0.1", @@ -6940,7 +7141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", - "indexmap 2.13.1", + "indexmap 2.14.0", "wasm-encoder", "wasmparser", ] @@ -6953,7 +7154,7 @@ checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ "bitflags 2.11.0", "hashbrown 0.15.5", - "indexmap 2.13.1", + "indexmap 2.14.0", "semver", ] @@ -7159,12 +7360,18 @@ dependencies = [ "cfg_aliases", "document-features", "hashbrown 0.16.1", + "js-sys", "log", + "naga", + "parking_lot", "portable-atomic", "profiling", "raw-window-handle", "smallvec", "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", "wgpu-core", "wgpu-hal", "wgpu-types", @@ -7184,7 +7391,7 @@ dependencies = [ "cfg_aliases", "document-features", "hashbrown 0.16.1", - "indexmap 2.13.1", + "indexmap 2.14.0", "log", "naga", "once_cell", @@ -7195,11 +7402,31 @@ dependencies = [ "rustc-hash 1.1.0", "smallvec", "thiserror 2.0.18", + "wgpu-core-deps-apple", + "wgpu-core-deps-emscripten", "wgpu-core-deps-windows-linux-android", "wgpu-hal", "wgpu-types", ] +[[package]] +name = "wgpu-core-deps-apple" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-emscripten" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5" +dependencies = [ + "wgpu-hal", +] + [[package]] name = "wgpu-core-deps-windows-linux-android" version = "27.0.0" @@ -7215,18 +7442,47 @@ version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bit-set", "bitflags 2.11.0", + "block", + "bytemuck", "cfg-if", "cfg_aliases", + "core-graphics-types 0.2.0", + "glow", + "glutin_wgl_sys", + "gpu-alloc", + "gpu-allocator", + "gpu-descriptor", + "hashbrown 0.16.1", + "js-sys", + "khronos-egl", + "libc", "libloading", "log", + "metal", "naga", + "ndk-sys", + "objc", + "once_cell", + "ordered-float", + "parking_lot", "portable-atomic", "portable-atomic-util", + "profiling", + "range-alloc", "raw-window-handle", "renderdoc-sys", + "smallvec", "thiserror 2.0.18", + "wasm-bindgen", + "web-sys", "wgpu-types", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] @@ -7289,6 +7545,16 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows" version = "0.61.3" @@ -7311,14 +7577,27 @@ dependencies = [ "windows-core 0.61.2", ] +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-core" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement", - "windows-interface", + "windows-implement 0.60.2", + "windows-interface 0.59.3", "windows-link 0.1.3", "windows-result 0.3.4", "windows-strings 0.4.2", @@ -7330,8 +7609,8 @@ version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-implement", - "windows-interface", + "windows-implement 0.60.2", + "windows-interface 0.59.3", "windows-link 0.2.1", "windows-result 0.4.1", "windows-strings 0.5.1", @@ -7348,6 +7627,17 @@ dependencies = [ "windows-threading", ] +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-implement" version = "0.60.2" @@ -7359,6 +7649,17 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-interface" version = "0.59.3" @@ -7392,6 +7693,15 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.3.4" @@ -7410,6 +7720,16 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-strings" version = "0.4.2" @@ -7929,7 +8249,7 @@ checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" dependencies = [ "anyhow", "heck 0.5.0", - "indexmap 2.13.1", + "indexmap 2.14.0", "prettyplease", "syn", "wasm-metadata", @@ -7960,7 +8280,7 @@ checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", "bitflags 2.11.0", - "indexmap 2.13.1", + "indexmap 2.14.0", "log", "serde", "serde_derive", @@ -7979,7 +8299,7 @@ checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" dependencies = [ "anyhow", "id-arena", - "indexmap 2.13.1", + "indexmap 2.14.0", "log", "semver", "serde", diff --git a/cosmic-applet-network/src/app.rs b/cosmic-applet-network/src/app.rs index 0b06303a..727d9b10 100644 --- a/cosmic-applet-network/src/app.rs +++ b/cosmic-applet-network/src/app.rs @@ -26,17 +26,16 @@ use cosmic::{ }, cctk::sctk::reexports::calloop, cosmic_theme::Spacing, + iced::core::window, iced::{ Alignment, Length, Subscription, platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup}, - widget::{column, row}, }, - iced_runtime::core::window, surface, theme, widget::{ - Column, Id, Row, button, container, divider, + Column, Id, Row, button, column, container, divider, icon::{self, from_name}, - scrollable, secure_input, text, text_input, toggler, + row, scrollable, secure_input, text, text_input, toggler, }, }; use cosmic_dbus_networkmanager::interface::{ @@ -191,8 +190,8 @@ fn vpn_section<'a>( show_available_vpns: bool, space_xxs: u16, space_s: u16, -) -> Column<'a, Message> { - let mut vpn_col = column![]; +) -> cosmic::iced::widget::Column<'a, Message, cosmic::Theme> { + let mut vpn_col = cosmic::widget::column::with_capacity::<'_, Message, cosmic::Theme, _>(4); if !nm_state.known_vpns.is_empty() { let dropdown_icon = if show_available_vpns { @@ -225,30 +224,39 @@ fn vpn_section<'a>( .on_submit(|_| Message::ConnectVPNWithPassword) .width(Length::Fill) .into(), - row![ - button::standard(fl!("cancel")).on_press(Message::CancelVPNConnection), - button::suggested(fl!("connect")).on_press(Message::ConnectVPNWithPassword) - ] + row::with_children([ + button::standard(fl!("cancel")) + .on_press(Message::CancelVPNConnection) + .into(), + button::suggested(fl!("connect")) + .on_press(Message::ConnectVPNWithPassword) + .into(), + ]) .spacing(24) .into(), ]; - let col = padded_control( - Column::with_children(column_content) - .spacing(8) - .align_x(Alignment::Center), - ) - .align_x(Alignment::Center); + let col: Element<'a, Message> = Element::from( + padded_control( + column::with_children(column_content) + .spacing(8) + .align_x(Alignment::Center), + ) + .align_x(Alignment::Center), + ); vpn_col = vpn_col.push(col); } - let vpn_toggle_btn = menu_button(row![ - text::body(fl!("vpn-connections")) - .width(Length::Fill) - .height(Length::Fixed(24.0)) - .align_y(Alignment::Center), + let vpn_toggle_btn = menu_button(row::with_children([ + Element::from( + text::body(fl!("vpn-connections")) + .width(Length::Fill) + .height(Length::Fixed(24.0)) + .align_y(Alignment::Center), + ), container(icon::from_name(dropdown_icon).size(16).symbolic(true)) .center(Length::Fixed(24.0)) - ]) + .into(), + ])) .on_press(Message::ToggleVpnList); vpn_col = vpn_col.push(vpn_toggle_btn); @@ -277,7 +285,7 @@ fn vpn_section<'a>( } let mut btn = menu_button( - Row::with_children(btn_content) + row::with_children(btn_content) .align_y(Alignment::Center) .spacing(8), ); @@ -369,7 +377,11 @@ impl CosmicNetworkApplet { changed = true; } } - fn view_window_return<'a>(&self, mut content: Column<'a, Message>) -> Element<'a, Message> { + + fn view_window_return<'a>( + &self, + mut content: cosmic::iced::widget::Column<'a, Message, cosmic::Theme>, + ) -> Element<'a, Message> { let Spacing { space_xxs, space_s, .. } = theme::active().cosmic().spacing; @@ -1383,7 +1395,8 @@ impl cosmic::Application for CosmicNetworkApplet { space_xxs, space_s, .. } = theme::active().cosmic().spacing; - let mut vpn_ethernet_col = column![]; + let mut vpn_ethernet_col: cosmic::iced::widget::Column = + cosmic::widget::column::with_capacity(1); let mut known_wifi = Vec::new(); for conn in &self.nm_state.nm_state.active_conns { match conn { @@ -1398,25 +1411,33 @@ impl cosmic::Application for CosmicNetworkApplet { for addr in ip_addresses { ipv4.push(text::caption(format!("{}: {}", fl!("ipv4"), addr)).into()); } - vpn_ethernet_col = vpn_ethernet_col.push(column![ - row![ - icon::icon( - icon::from_name(self.icon_name.clone()) - .symbolic(true) - .into() + vpn_ethernet_col = vpn_ethernet_col.push( + column::with_capacity::(2) + .push( + row::with_children([ + Element::from( + icon::icon( + icon::from_name(self.icon_name.clone()) + .symbolic(true) + .into(), + ) + .size(40), + ), + column::with_children(ipv4).into(), + text::body(fl!("connected")) + .width(Length::Fill) + .align_x(Alignment::End) + .into(), + ]) + .align_y(Alignment::Center) + .spacing(8) + .padding(menu_control_padding()), ) - .size(40), - Column::with_children(ipv4), - text::body(fl!("connected")) - .width(Length::Fill) - .align_x(Alignment::End), - ] - .align_y(Alignment::Center) - .spacing(8) - .padding(menu_control_padding()), - padded_control(divider::horizontal::default()) - .padding([space_xxs, space_s]), - ]); + .push( + padded_control(divider::horizontal::default()) + .padding([space_xxs, space_s]), + ), + ); } ActiveConnectionInfo::Wired { name, @@ -1459,25 +1480,33 @@ impl cosmic::Application for CosmicNetworkApplet { right_column.push(text(speed_text).size(12).into()); } - vpn_ethernet_col = vpn_ethernet_col.push(column![ - row![ - icon::icon( - icon::from_name(self.icon_name.clone()) - .symbolic(true) - .into() - ) - .size(40), - Column::with_children(ipv4), - Column::with_children(right_column) - .width(Length::Fill) - .align_x(Alignment::End), - ] - .align_y(Alignment::Center) - .spacing(8) - .padding(menu_control_padding()), - padded_control(divider::horizontal::default()) - .padding([space_xxs, space_s]), - ]); + vpn_ethernet_col = vpn_ethernet_col + .push( + column::with_capacity(2).push( + row::with_children([ + Element::from( + icon::icon( + icon::from_name(self.icon_name.clone()) + .symbolic(true) + .into(), + ) + .size(40), + ), + column::with_children(ipv4).into(), + column::with_children(right_column) + .width(Length::Fill) + .align_x(Alignment::End) + .into(), + ]) + .align_y(Alignment::Center) + .spacing(8) + .padding(menu_control_padding()), + ), + ) + .push( + padded_control(divider::horizontal::default()) + .padding([space_xxs, space_s]), + ); } ActiveConnectionInfo::WiFi { name, @@ -1500,9 +1529,12 @@ impl cosmic::Application for CosmicNetworkApplet { .size(24) .symbolic(true) .into(), - column![text::body(name), Column::with_children(ipv4)] - .width(Length::Fill) - .into(), + column::with_children([ + text::body(name).into(), + column::with_children(ipv4).into(), + ]) + .width(Length::Fill) + .into(), ]; match state { ActiveConnectionState::Activating | ActiveConnectionState::Deactivating => { @@ -1536,81 +1568,88 @@ impl cosmic::Application for CosmicNetworkApplet { } known_wifi.push(Element::from( - column![ + column::with_children([Element::from( menu_button( - Row::with_children(btn_content) + row::with_children(btn_content) .align_y(Alignment::Center) - .spacing(8) + .spacing(8), ) .on_press(Message::Disconnect( Arc::from(name.as_str()), - HwAddress::from_str(&hw_address).unwrap() - )) - ] + HwAddress::from_str(&hw_address).unwrap(), + )), + )]) .align_x(Alignment::Center), )); } } } - let mut content = if let Some(active_device) = self.active_device.as_ref() { - column![ - vpn_ethernet_col, - menu_button(row![ + let mut content = cosmic::widget::column::with_capacity(known_wifi.len() + 1); + + if let Some(active_device) = self.active_device.as_ref() { + let menu_row = row::with_children::<'_, Message, cosmic::Theme, _>([ + Element::<'_, Message>::from( container( icon::from_name("go-previous-symbolic") .size(16) - .symbolic(true) + .symbolic(true), ) .align_x(Alignment::Start) .align_y(Alignment::Center) .width(Length::Fixed(24.0)) .height(Length::Fixed(24.0)), - text::body(&active_device.interface) - .width(Length::Fill) - .height(Length::Fixed(24.0)) - .align_y(Alignment::Center), - ]) - .on_press(Message::SelectDevice(None)) - ] - } else { - column![ - // TODO: remove excesive column! - Element::from( - column![ - vpn_ethernet_col, - padded_control( - toggler(self.nm_state.nm_state.airplane_mode,) - .label(fl!("airplane-mode")) - .on_toggle(Message::ToggleAirplaneMode) - .text_size(14) - .width(Length::Fill) - ), - padded_control(divider::horizontal::default()) - .padding([space_xxs, space_s]), - ] - .align_x(Alignment::Center) ), + text::body(&active_device.interface) + .width(Length::Fill) + .height(Length::Fixed(24.0)) + .align_y(Alignment::Center) + .into(), + ]); + content = content + .push(vpn_ethernet_col) + .push(menu_button(menu_row).on_press(Message::SelectDevice(None))); + } else { + let menu_column = column::with_children([ + Element::from(vpn_ethernet_col), padded_control( - toggler(self.nm_state.nm_state.wifi_enabled,) + toggler(self.nm_state.nm_state.airplane_mode) + .label(fl!("airplane-mode")) + .on_toggle(Message::ToggleAirplaneMode) + .text_size(14) + .width(Length::Fill), + ) + .into(), + padded_control(divider::horizontal::default()) + .padding([space_xxs, space_s]) + .into(), + ]) + .align_x(Alignment::Center); + content = content + .push(Element::from(menu_column)) + .push(padded_control( + toggler(self.nm_state.nm_state.wifi_enabled) .label(fl!("wifi")) .on_toggle(Message::WiFiEnable) .text_size(14) - .width(Length::Fill) - ), - ] - .align_x(Alignment::Center) - }; + .width(Length::Fill), + )) + .align_x(Alignment::Center); + } if self.nm_state.nm_state.airplane_mode { content = content.push( - column!( - padded_control(divider::horizontal::default()).padding([space_xxs, space_s]), + column::with_children([ + Element::from( + padded_control(divider::horizontal::default()) + .padding([space_xxs, space_s]), + ), icon::from_name("airplane-mode-symbolic") .size(48) - .symbolic(true), - text::body(fl!("airplane-mode-on")), - text(fl!("turn-off-airplane-mode")).size(12) - ) + .symbolic(true) + .into(), + text::body(fl!("airplane-mode-on")).into(), + text(fl!("turn-off-airplane-mode")).size(12).into(), + ]) .spacing(8) .padding([0, 0, 8, 0]) .align_x(Alignment::Center) @@ -1659,10 +1698,10 @@ impl cosmic::Application for CosmicNetworkApplet { let is_connected = interface.active_connection.is_some(); let mut btn_content = vec![ - column![ - text::body(display_name), - Column::with_children([text("Adapter").size(10).into()]) - ] + column::with_children([ + text::body(display_name).into(), + column::with_children([text("Adapter").size(10).into()]).into(), + ]) .width(Length::Fill) .into(), ]; @@ -1682,7 +1721,7 @@ impl cosmic::Application for CosmicNetworkApplet { ); content = content.push(Element::from( menu_button( - Row::with_children(btn_content) + row::with_children(btn_content) .align_y(Alignment::Center) .spacing(8), ) @@ -1750,7 +1789,7 @@ impl cosmic::Application for CosmicNetworkApplet { } let mut btn = menu_button( - Row::with_children(btn_content) + row::with_children(btn_content) .align_y(Alignment::Center) .spacing(8), ); @@ -1767,10 +1806,12 @@ impl cosmic::Application for CosmicNetworkApplet { } _ => btn, }; - known_wifi.push(Element::from(row![btn].align_y(Alignment::Center))); + known_wifi.push(Element::from( + row::with_capacity(1).push(btn).align_y(Alignment::Center), + )); } let has_known_wifi = !known_wifi.is_empty(); - content = content.push(Column::with_children(known_wifi)); + content = content.push(column::with_children(known_wifi)); if has_known_wifi { content = content .push(padded_control(divider::horizontal::default()).padding([space_xxs, space_s])); @@ -1781,14 +1822,17 @@ impl cosmic::Application for CosmicNetworkApplet { } else { "go-down-symbolic" }; - let available_connections_btn = menu_button(row![ - text::body(fl!("visible-wireless-networks")) - .width(Length::Fill) - .height(Length::Fixed(24.0)) - .align_y(Alignment::Center), + let available_connections_btn = menu_button(row::with_children([ + Element::from( + text::body(fl!("visible-wireless-networks")) + .width(Length::Fill) + .height(Length::Fixed(24.0)) + .align_y(Alignment::Center), + ), container(icon::from_name(dropdown_icon).size(16).symbolic(true)) .center(Length::Fixed(24.0)) - ]) + .into(), + ])) .on_press(Message::ToggleVisibleNetworks); content = content.push(available_connections_btn); @@ -1814,12 +1858,14 @@ impl cosmic::Application for CosmicNetworkApplet { password_hidden, } => { let id = padded_control( - row![ - icon::from_name("network-wireless-acquiring-symbolic") - .size(24) - .symbolic(true), - text::body(access_point.ssid.as_ref()), - ] + row::with_children([ + Element::from( + icon::from_name("network-wireless-acquiring-symbolic") + .size(24) + .symbolic(true), + ), + text::body(access_point.ssid.as_ref()).into(), + ]) .align_y(Alignment::Center) .spacing(12), ); @@ -1827,7 +1873,7 @@ impl cosmic::Application for CosmicNetworkApplet { let is_enterprise = matches!(access_point.network_type, NetworkType::EAP); let enter_password_col = - column![] + cosmic::widget::column::with_capacity(4) .push_maybe(is_enterprise.then(|| text::body(fl!("identity")))) .push_maybe(is_enterprise.then(|| { text_input::text_input("", identity) @@ -1851,12 +1897,16 @@ impl cosmic::Application for CosmicNetworkApplet { container(text::body(fl!("router-wps-button"))).padding(8) })) .push( - row![ - button::standard(fl!("cancel")) - .on_press(Message::CancelNewConnection), - button::suggested(fl!("connect")) - .on_press(Message::ConnectWithPassword) - ] + row::with_children([ + Element::from( + button::standard(fl!("cancel")) + .on_press(Message::CancelNewConnection), + ), + Element::from( + button::suggested(fl!("connect")) + .on_press(Message::ConnectWithPassword), + ), + ]) .spacing(24), ); let col = @@ -1865,52 +1915,62 @@ impl cosmic::Application for CosmicNetworkApplet { content = content.push(col); } NewConnectionState::Waiting(access_point) => { - let id = row![ - icon::from_name("network-wireless-acquiring-symbolic") - .size(24) - .symbolic(true), - text::body(access_point.ssid.as_ref()), - ] + let id = row::with_children([ + Element::from( + icon::from_name("network-wireless-acquiring-symbolic") + .size(24) + .symbolic(true), + ), + text::body(access_point.ssid.as_ref()).into(), + ]) .align_y(Alignment::Center) .width(Length::Fill) .spacing(12); let connecting = padded_control( - row![ - id, + row::with_children([ + Element::from(id), icon::from_name("process-working-symbolic") .size(24) - .symbolic(true), - ] + .symbolic(true) + .into(), + ]) .spacing(8), ); content = content.push(connecting); } NewConnectionState::Failure(access_point) => { let id = padded_control( - row![ - icon::from_name("network-wireless-error-symbolic") - .size(24) - .symbolic(true), - text::body(access_point.ssid.as_ref()), - ] + row::with_children([ + Element::from( + icon::from_name("network-wireless-error-symbolic") + .size(24) + .symbolic(true), + ), + text::body(access_point.ssid.as_ref()).into(), + ]) .align_y(Alignment::Center) .spacing(12), ) .align_x(Alignment::Center); content = content.push(id); let col = padded_control( - column![ - text(fl!("unable-to-connect")), - text(fl!("check-wifi-connection")), - row![ - button::standard(fl!("cancel")) - .on_press(Message::CancelNewConnection), - button::suggested(fl!("connect")).on_press( - Message::SelectWirelessAccessPoint(access_point.clone()) - ) - ] + column::with_children([ + Element::from(text(fl!("unable-to-connect"))), + text(fl!("check-wifi-connection")).into(), + row::with_children([ + Element::from( + button::standard(fl!("cancel")) + .on_press(Message::CancelNewConnection), + ), + button::suggested(fl!("connect")) + .on_press(Message::SelectWirelessAccessPoint( + access_point.clone(), + )) + .into(), + ]) .spacing(24) - ] + .into(), + ]) .spacing(16) .align_x(Alignment::Center), ) @@ -1943,20 +2003,26 @@ impl cosmic::Application for CosmicNetworkApplet { }) .map(|ap| { let button = menu_button( - row![ - icon::from_name(wifi_icon(ap.strength)) - .size(16) - .symbolic(true), - text::body(ap.ssid.as_ref()).align_y(Alignment::Center) - ] + row::with_children([ + Element::from( + icon::from_name(wifi_icon(ap.strength)) + .size(16) + .symbolic(true), + ), + text::body(ap.ssid.as_ref()) + .align_y(Alignment::Center) + .into(), + ]) .align_y(Alignment::Center) .spacing(12), ) .on_press(Message::SelectWirelessAccessPoint(ap.clone())); button.into() }); - content = content - .push(scrollable(Column::with_children(list_col)).height(Length::Fixed(300.0))); + content = content.push( + scrollable::<'_, Message>(column::with_children(list_col)) + .height(Length::Fixed(300.0)), + ); } // Add VPN connections section after wireless networks when they are expanded