From c886d18134b5e287244805f65fe2cfadb580508e Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 26 Aug 2025 09:44:06 -0500 Subject: [PATCH 01/15] beginning the switch... lots to go yet --- Cargo.lock | 3226 +++++++++++++++++++-------------- Cargo.toml | 15 +- src/core/model.rs | 2 +- src/core/service_items.rs | 2 +- src/core/slide.rs | 2 +- src/core/songs.rs | 2 +- src/core/videos.rs | 2 +- src/main.rs | 236 ++- src/ui/double_ended_slider.rs | 2 +- src/ui/library.rs | 52 +- src/ui/presenter.rs | 36 +- src/ui/slide_editor.rs | 54 +- src/ui/song_editor.rs | 26 +- src/ui/text_svg.rs | 15 +- src/ui/widgets/slide_text.rs | 14 +- 15 files changed, 2123 insertions(+), 1563 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9de55f7..4e2f6cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,86 +18,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" -[[package]] -name = "accesskit" -version = "0.16.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#956955342dadab7e588e21be726817fca39510f3" - -[[package]] -name = "accesskit_atspi_common" -version = "0.9.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#956955342dadab7e588e21be726817fca39510f3" -dependencies = [ - "accesskit", - "accesskit_consumer", - "atspi-common", - "serde", - "thiserror 1.0.69", - "zvariant 3.15.2", -] - -[[package]] -name = "accesskit_consumer" -version = "0.24.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#956955342dadab7e588e21be726817fca39510f3" -dependencies = [ - "accesskit", - "immutable-chunkmap", -] - -[[package]] -name = "accesskit_macos" -version = "0.17.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#956955342dadab7e588e21be726817fca39510f3" -dependencies = [ - "accesskit", - "accesskit_consumer", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", - "once_cell", -] - -[[package]] -name = "accesskit_unix" -version = "0.12.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#956955342dadab7e588e21be726817fca39510f3" -dependencies = [ - "accesskit", - "accesskit_atspi_common", - "atspi", - "futures-lite 1.13.0", - "serde", - "tokio", - "tokio-stream", - "zbus 3.15.2", -] - -[[package]] -name = "accesskit_windows" -version = "0.22.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#956955342dadab7e588e21be726817fca39510f3" -dependencies = [ - "accesskit", - "accesskit_consumer", - "paste", - "static_assertions", - "windows 0.54.0", -] - -[[package]] -name = "accesskit_winit" -version = "0.22.0" -source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#956955342dadab7e588e21be726817fca39510f3" -dependencies = [ - "accesskit", - "accesskit_macos", - "accesskit_unix", - "accesskit_windows", - "raw-window-handle", - "winit", -] - [[package]] name = "addr2line" version = "0.24.2" @@ -113,6 +33,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.16", + "once_cell", + "version_check", +] + [[package]] name = "ahash" version = "0.8.12" @@ -141,18 +72,21 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + [[package]] name = "allocator-api2" version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "almost" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aa2999eb46af81abb65c2d30d446778d7e613b60bbf4e174a027e80f90a3c14" - [[package]] name = "alsa" version = "0.9.1" @@ -268,10 +202,10 @@ dependencies = [ ] [[package]] -name = "apply" -version = "0.3.0" +name = "anyhow" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f47b57fc4521e3cae26a4d45b5227f8fadee4c345be0fefd8d5d1711afb8aeb9" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "approx" @@ -282,6 +216,23 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "arrayref" version = "0.3.9" @@ -300,33 +251,58 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" +[[package]] +name = "ash" +version = "0.37.3+1.3.251" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" +dependencies = [ + "libloading 0.7.4", +] + [[package]] name = "ash" version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "libloading", + "libloading 0.8.8", ] [[package]] name = "ashpd" -version = "0.11.0" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbdf310d77fd3aaee6ea2093db7011dc2d35d2eb3481e5607f1f8d942ed99df" +checksum = "4ac22eda5891cc086690cb6fa10121c0390de0e3b04eb269f2d766b00d3f2d81" dependencies = [ + "async-fs 2.1.3", + "async-net", "enumflags2", "futures-channel", "futures-util", - "rand 0.9.2", - "raw-window-handle", + "once_cell", + "rand", + "serde", + "serde_repr", + "url", + "zbus 3.15.2", +] + +[[package]] +name = "ashpd" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3d60bee1a1d38c2077030f4788e1b4e31058d2e79a8cfc8f2b440bd44db290" +dependencies = [ + "async-fs 2.1.3", + "async-net", + "enumflags2", + "futures-channel", + "futures-util", + "rand", "serde", "serde_repr", - "tokio", "url", - "wayland-backend", - "wayland-client", - "wayland-protocols", "zbus 5.9.0", ] @@ -352,6 +328,17 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + [[package]] name = "async-channel" version = "2.5.0" @@ -378,6 +365,44 @@ dependencies = [ "slab", ] +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-fs" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f7e37c0ed80b2a977691c47dae8625cfb21e205827106c64f7c588766b2e50" +dependencies = [ + "async-lock 3.4.1", + "blocking", + "futures-lite 2.6.1", +] + +[[package]] +name = "async-global-executor" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +dependencies = [ + "async-channel 2.5.0", + "async-executor", + "async-io 2.5.0", + "async-lock 3.4.1", + "blocking", + "futures-lite 2.6.1", + "once_cell", +] + [[package]] name = "async-io" version = "1.13.0" @@ -436,6 +461,17 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-net" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" +dependencies = [ + "async-io 2.5.0", + "blocking", + "futures-lite 2.6.1", +] + [[package]] name = "async-process" version = "1.8.1" @@ -459,7 +495,7 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65daa13722ad51e6ab1a1b9c01299142bc75135b337923cfa10e79bbbd669f00" dependencies = [ - "async-channel", + "async-channel 2.5.0", "async-io 2.5.0", "async-lock 3.4.1", "async-signal", @@ -500,6 +536,32 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "async-std" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c8e079a4ab67ae52b7403632e4618815d6db36d2a010cfe41b02c1b1578f93b" +dependencies = [ + "async-channel 1.9.0", + "async-global-executor", + "async-io 2.5.0", + "async-lock 3.4.1", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite 2.6.1", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + [[package]] name = "async-task" version = "4.7.1" @@ -538,82 +600,35 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41e67cd8309bbd06cd603a9e693a784ac2e5d1e955f11286e355089fcab3047c" -[[package]] -name = "atomicwrites" -version = "0.4.2" -source = "git+https://github.com/jackpot51/rust-atomicwrites#043ab4859d53ffd3d55334685303d8df39c9f768" -dependencies = [ - "rustix 0.38.44", - "tempfile", - "windows-sys 0.48.0", -] - -[[package]] -name = "atspi" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" -dependencies = [ - "atspi-common", - "atspi-connection", - "atspi-proxies", -] - -[[package]] -name = "atspi-common" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" -dependencies = [ - "enumflags2", - "serde", - "static_assertions", - "zbus 3.15.2", - "zbus_names 2.6.1", - "zvariant 3.15.2", -] - -[[package]] -name = "atspi-connection" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" -dependencies = [ - "atspi-common", - "atspi-proxies", - "futures-lite 1.13.0", - "zbus 3.15.2", -] - -[[package]] -name = "atspi-proxies" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" -dependencies = [ - "atspi-common", - "serde", - "zbus 3.15.2", -] - -[[package]] -name = "auto_enums" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c170965892137a3a9aeb000b4524aa3cc022a310e709d848b6e1cdce4ab4781" -dependencies = [ - "derive_utils", - "proc-macro2", - "quote", - "syn 2.0.106", -] - [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "av1-grain" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3efb2ca85bc610acfa917b5aaa36f3fcbebed5b3182d7f877b02531c4b80c8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c8fbc0f831f4519fe8b810b6a7a91410ec83031b8233f730a0480029f6a23f" +dependencies = [ + "arrayvec", +] + [[package]] name = "backtrace" version = "0.3.75" @@ -656,6 +671,35 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bincode" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" +dependencies = [ + "bincode_derive", + "serde", + "unty", +] + +[[package]] +name = "bincode_derive" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" +dependencies = [ + "virtue", +] + [[package]] name = "bindgen" version = "0.72.0" @@ -676,18 +720,39 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.6.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ - "bit-vec", + "bit-vec 0.6.3", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec 0.8.0", ] [[package]] name = "bit-vec" -version = "0.7.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" [[package]] name = "bitflags" @@ -704,6 +769,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bitstream-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2" + [[package]] name = "block" version = "0.1.6" @@ -725,16 +796,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2 0.5.2", -] - -[[package]] -name = "block2" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340d2f0bdb2a43c1d3cd40513185b2bd7def0aa1052f956455114bc98f82dcf2" -dependencies = [ - "objc2 0.6.2", + "objc2", ] [[package]] @@ -743,13 +805,19 @@ version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" dependencies = [ - "async-channel", + "async-channel 2.5.0", "async-task", "futures-io", "futures-lite 2.6.1", "piper", ] +[[package]] +name = "built" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ed6191a7e78c36abdb16ab65341eefd73d64d303fffccdbb00d51e4205967b" + [[package]] name = "bumpalo" version = "3.19.0" @@ -826,6 +894,17 @@ dependencies = [ "wayland-client", ] +[[package]] +name = "cargo-hot-protocol" +version = "0.1.0" +source = "git+https://github.com/hecrj/cargo-hot.git?rev=b8dc518b8640928178a501257e353b73bc06cf47#b8dc518b8640928178a501257e353b73bc06cf47" +dependencies = [ + "anyhow", + "bincode 2.0.1", + "log", + "subsecond", +] + [[package]] name = "cc" version = "1.2.33" @@ -852,6 +931,16 @@ dependencies = [ "nom", ] +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon 0.12.16", +] + [[package]] name = "cfg-expr" version = "0.20.2" @@ -859,7 +948,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d458d63f0f0f482c8da9b7c8b76c21bd885a02056cc94c6404d861ca2b8206" dependencies = [ "smallvec", - "target-lexicon", + "target-lexicon 0.13.2", ] [[package]] @@ -888,10 +977,7 @@ checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", - "js-sys", "num-traits", - "serde", - "wasm-bindgen", "windows-link", ] @@ -903,7 +989,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.8.8", ] [[package]] @@ -964,63 +1050,34 @@ dependencies = [ [[package]] name = "clipboard_macos" -version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7f4aaa047ba3c3630b080bb9860894732ff23e2aee290a418909aa6d5df38f" dependencies = [ - "objc", - "objc-foundation", - "objc_id", + "objc2", + "objc2-app-kit", + "objc2-foundation", ] [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003f886bc4e2987729d10c1db3424e7f80809f3fc22dbc16c685738887cb37b8" dependencies = [ - "dnd", - "mime 0.1.0", "smithay-clipboard", ] [[package]] name = "clipboard_x11" version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4274ea815e013e0f9f04a2633423e14194e408a0576c943ce3d14ca56c50031c" dependencies = [ "thiserror 1.0.69", "x11rb", ] -[[package]] -name = "cocoa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation", - "core-graphics-types", - "libc", - "objc", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -1031,6 +1088,17 @@ dependencies = [ "unicode-width 0.1.14", ] +[[package]] +name = "codespan-reporting" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" +dependencies = [ + "serde", + "termcolor", + "unicode-width 0.2.1", +] + [[package]] name = "color_quant" version = "1.1.0" @@ -1115,6 +1183,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" @@ -1128,8 +1206,21 @@ 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", +] + +[[package]] +name = "core-graphics" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" +dependencies = [ + "bitflags 2.9.2", + "core-foundation 0.10.1", + "core-graphics-types 0.2.0", "foreign-types", "libc", ] @@ -1141,17 +1232,19 @@ 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_maths" -version = "0.1.1" +name = "core-graphics-types" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "libm", + "bitflags 2.9.2", + "core-foundation 0.10.1", + "libc", ] [[package]] @@ -1174,112 +1267,21 @@ dependencies = [ "bindgen", ] -[[package]] -name = "cosmic-client-toolkit" -version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=178eb0b#178eb0b14a0e5c192f64f6dee6c40341a8e5ee51" -dependencies = [ - "cosmic-protocols", - "libc", - "smithay-client-toolkit", - "wayland-client", - "wayland-protocols", -] - -[[package]] -name = "cosmic-config" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" -dependencies = [ - "atomicwrites", - "cosmic-config-derive", - "cosmic-settings-daemon", - "dirs 6.0.0", - "futures-util", - "iced_futures", - "known-folders", - "notify", - "once_cell", - "ron 0.9.0", - "serde", - "tokio", - "tracing", - "xdg", - "zbus 5.9.0", -] - -[[package]] -name = "cosmic-config-derive" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" -dependencies = [ - "quote", - "syn 2.0.106", -] - -[[package]] -name = "cosmic-freedesktop-icons" -version = "0.3.0" -source = "git+https://github.com/pop-os/freedesktop-icons#8a05c322c482ff3c69cf34bacfee98907ac45307" -dependencies = [ - "dirs 5.0.1", - "ini_core", - "memmap2 0.9.7", - "thiserror 2.0.16", - "tracing", - "xdg", -] - -[[package]] -name = "cosmic-protocols" -version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=178eb0b#178eb0b14a0e5c192f64f6dee6c40341a8e5ee51" -dependencies = [ - "bitflags 2.9.2", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-wlr", - "wayland-scanner", - "wayland-server", -] - -[[package]] -name = "cosmic-settings-config" -version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#19f10525ff00d76558147ea060bd856a87122353" -dependencies = [ - "cosmic-config", - "ron 0.9.0", - "serde", - "serde_with", - "thiserror 2.0.16", - "tracing", - "xkbcommon", -] - -[[package]] -name = "cosmic-settings-daemon" -version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#3b86984332be2c930a3536ab714b843c851fa8ca" -dependencies = [ - "zbus 5.9.0", -] - [[package]] name = "cosmic-text" -version = "0.14.2" -source = "git+https://github.com/pop-os/cosmic-text.git#f7033bb0433f6a9ba109007027781ba46ea9ba27" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2" dependencies = [ "bitflags 2.9.2", - "fontdb 0.23.0", + "fontdb 0.16.2", "log", "rangemap", + "rayon", "rustc-hash 1.1.0", "rustybuzz", "self_cell", - "smol_str", - "swash", + "swash 0.1.19", "sys-locale", "ttf-parser 0.21.1", "unicode-bidi", @@ -1289,20 +1291,26 @@ dependencies = [ ] [[package]] -name = "cosmic-theme" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +name = "cosmic-text" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da46a9d5a8905cc538a4a5bceb6a4510de7a51049c5588c0114efce102bcbbe8" dependencies = [ - "almost", - "cosmic-config", - "csscolorparser", - "dirs 6.0.0", - "lazy_static", - "palette", - "ron 0.9.0", - "serde", - "serde_json", - "thiserror 2.0.16", + "bitflags 2.9.2", + "fontdb 0.16.2", + "log", + "rangemap", + "rustc-hash 1.1.0", + "rustybuzz", + "self_cell", + "smol_str", + "swash 0.2.5", + "sys-locale", + "ttf-parser 0.21.1", + "unicode-bidi", + "unicode-linebreak", + "unicode-script", + "unicode-segmentation", ] [[package]] @@ -1413,6 +1421,18 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "cryoglyph" +version = "0.1.0" +source = "git+https://github.com/iced-rs/cryoglyph.git?rev=453cedec0d2ec563bd7fa87e84a2319bcebb1ba3#453cedec0d2ec563bd7fa87e84a2319bcebb1ba3" +dependencies = [ + "cosmic-text 0.14.2", + "etagere", + "lru 0.16.0", + "rustc-hash 2.1.1", + "wgpu 26.0.1", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -1423,22 +1443,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "css-color" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42aaeae719fd78ce501d77c6cdf01f7e96f26bcd5617a4903a1c2b97e388543a" - -[[package]] -name = "csscolorparser" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fda6aace1fbef3aa217b27f4c8d7d071ef2a70a5ca51050b1f17d40299d3f16" -dependencies = [ - "phf", - "serde", -] - [[package]] name = "ctor-lite" version = "0.1.0" @@ -1453,48 +1457,43 @@ checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" [[package]] name = "d3d12" -version = "22.0.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" +checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307" dependencies = [ "bitflags 2.9.2", - "libloading", + "libloading 0.8.8", "winapi", ] [[package]] -name = "darling" -version = "0.20.11" +name = "dark-light" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +checksum = "2a76fa97167fa740dcdbfe18e8895601e1bc36525f09b044e00916e717c03a3c" dependencies = [ - "darling_core", - "darling_macro", + "dconf_rs", + "detect-desktop-environment", + "dirs 4.0.0", + "objc", + "rust-ini", + "web-sys", + "winreg 0.10.1", + "zbus 4.4.0", ] [[package]] -name = "darling_core" -version = "0.20.11" +name = "dark-light" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +checksum = "18e1a09f280e29a8b00bc7e81eca5ac87dca0575639c9422a5fa25a07bb884b8" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.106", -] - -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.106", + "ashpd 0.10.3", + "async-std", + "objc2", + "objc2-foundation", + "web-sys", + "winreg 0.52.0", ] [[package]] @@ -1509,6 +1508,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" +[[package]] +name = "dconf_rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7046468a81e6a002061c01e6a7c83139daf91b11c30e66795b13217c2d885c8b" + [[package]] name = "der" version = "0.7.10" @@ -1527,7 +1532,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", - "serde", ] [[package]] @@ -1542,27 +1546,10 @@ dependencies = [ ] [[package]] -name = "derive_setters" -version = "0.1.8" +name = "detect-desktop-environment" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae5c625eda104c228c06ecaf988d1c60e542176bd7a490e60eeda3493244c0c9" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.106", -] - -[[package]] -name = "derive_utils" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccfae181bab5ab6c5478b2ccb69e4c68a02f8c3ec72f6616bfec9dbc599d2ee0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.106", -] +checksum = "21d8ad60dd5b13a4ee6bd8fa2d5d88965c597c67bce32b5fc49c94f55cb50810" [[package]] name = "diff" @@ -1582,6 +1569,15 @@ dependencies = [ "subtle", ] +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys 0.3.7", +] + [[package]] name = "dirs" version = "5.0.1" @@ -1592,12 +1588,14 @@ dependencies = [ ] [[package]] -name = "dirs" -version = "6.0.0" +name = "dirs-sys" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ - "dirs-sys 0.5.0", + "libc", + "redox_users", + "winapi", ] [[package]] @@ -1608,40 +1606,16 @@ checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", "option-ext", - "redox_users 0.4.6", + "redox_users", "windows-sys 0.48.0", ] -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users 0.5.2", - "windows-sys 0.60.2", -] - [[package]] name = "dispatch" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" -[[package]] -name = "dispatch2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" -dependencies = [ - "bitflags 2.9.2", - "block2 0.6.1", - "libc", - "objc2 0.6.2", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -1659,20 +1633,14 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading", + "libloading 0.8.8", ] [[package]] -name = "dnd" -version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" -dependencies = [ - "bitflags 2.9.2", - "mime 0.1.0", - "raw-window-handle", - "smithay-client-toolkit", - "smithay-clipboard", -] +name = "dlv-list" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" [[package]] name = "document-features" @@ -1698,13 +1666,19 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dpi" version = "0.1.1" -source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13#1cc02bdab141072eaabad639d74b032fd0fcc62e" +source = "git+https://github.com/iced-rs/winit.git?rev=11414b6aa45699f038114e61b4ddf5102b2d3b4b#11414b6aa45699f038114e61b4ddf5102b2d3b4b" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" [[package]] name = "drm" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" +checksum = "98888c4bbd601524c11a7ed63f814b8825f420514f78e96f752c437ae9cbb5d1" dependencies = [ "bitflags 2.9.2", "bytemuck", @@ -1715,9 +1689,9 @@ dependencies = [ [[package]] name = "drm-ffi" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" +checksum = "97c98727e48b7ccb4f4aea8cfe881e5b07f702d17b7875991881b41af7278d53" dependencies = [ "drm-sys", "rustix 0.38.44", @@ -1731,20 +1705,14 @@ checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" [[package]] name = "drm-sys" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d09ff881f92f118b11105ba5e34ff8f4adf27b30dae8f12e28c193af1c83176" +checksum = "fd39dde40b6e196c2e8763f23d119ddb1a8714534bf7d77fa97a65b0feda3986" dependencies = [ "libc", "linux-raw-sys 0.6.5", ] -[[package]] -name = "dyn-clone" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" - [[package]] name = "either" version = "1.15.0" @@ -1796,6 +1764,26 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -1886,6 +1874,21 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "exr" +version = "1.73.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + [[package]] name = "extended" version = "0.1.0" @@ -1966,18 +1969,21 @@ dependencies = [ "spin", ] -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foldhash" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "font-types" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3971f9a5ca983419cdc386941ba3b9e1feba01a0ab888adf78739feb2798492" +dependencies = [ + "bytemuck", +] + [[package]] name = "font-types" version = "0.9.0" @@ -1996,6 +2002,20 @@ dependencies = [ "roxmltree", ] +[[package]] +name = "fontdb" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2", + "slotmap", + "tinyvec", + "ttf-parser 0.20.0", +] + [[package]] name = "fontdb" version = "0.18.0" @@ -2004,26 +2024,12 @@ checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.9.7", + "memmap2", "slotmap", "tinyvec", "ttf-parser 0.21.1", ] -[[package]] -name = "fontdb" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" -dependencies = [ - "fontconfig-parser", - "log", - "memmap2 0.9.7", - "slotmap", - "tinyvec", - "ttf-parser 0.25.1", -] - [[package]] name = "foreign-types" version = "0.5.0" @@ -2060,29 +2066,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "freedesktop-desktop-entry" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de88bb3b555a4b38372082c5ede431e1e0e14f32be1d02998c6366eb4d2682ed" -dependencies = [ - "gettext-rs", - "log", - "memchr", - "thiserror 2.0.16", - "unicase", - "xdg", -] - -[[package]] -name = "fsevent-sys" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" -dependencies = [ - "libc", -] - [[package]] name = "futures" version = "0.3.31" @@ -2255,26 +2238,6 @@ dependencies = [ "wasi 0.14.2+wasi-0.2.4", ] -[[package]] -name = "gettext-rs" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44e92f7dc08430aca7ed55de161253a22276dfd69c5526e5c5e95d1f7cf338a" -dependencies = [ - "gettext-sys", - "locale_config", -] - -[[package]] -name = "gettext-sys" -version = "0.22.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb45773f5b8945f12aecd04558f545964f943dacda1b1155b3d738f5469ef661" -dependencies = [ - "cc", - "temp-dir", -] - [[package]] name = "gif" version = "0.13.3" @@ -2300,7 +2263,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", + "system-deps 7.0.5", "windows-sys 0.59.0", ] @@ -2362,7 +2325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ab79e1ed126803a8fb827e3de0e2ff95191912b8db65cee467edb56fc4cc215" dependencies = [ "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2371,6 +2334,18 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "glow" version = "0.13.1" @@ -2383,6 +2358,27 @@ dependencies = [ "web-sys", ] +[[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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +dependencies = [ + "gl_generator", +] + [[package]] name = "glutin_wgl_sys" version = "0.6.1" @@ -2400,7 +2396,7 @@ checksum = "ec9aca94bb73989e3cfdbf8f2e0f1f6da04db4d291c431f444838925c4c63eda" dependencies = [ "glib-sys", "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2424,9 +2420,9 @@ dependencies = [ [[package]] name = "gpu-allocator" -version = "0.26.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" dependencies = [ "log", "presser", @@ -2435,6 +2431,29 @@ dependencies = [ "windows 0.52.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.54.0", +] + +[[package]] +name = "gpu-descriptor" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" +dependencies = [ + "bitflags 2.9.2", + "gpu-descriptor-types 0.1.2", + "hashbrown 0.14.5", +] + [[package]] name = "gpu-descriptor" version = "0.3.2" @@ -2442,10 +2461,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ "bitflags 2.9.2", - "gpu-descriptor-types", + "gpu-descriptor-types 0.2.0", "hashbrown 0.15.5", ] +[[package]] +name = "gpu-descriptor-types" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" +dependencies = [ + "bitflags 2.9.2", +] + [[package]] name = "gpu-descriptor-types" version = "0.2.0" @@ -2455,12 +2483,6 @@ dependencies = [ "bitflags 2.9.2", ] -[[package]] -name = "grid" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df00eed8d1f0db937f6be10e46e8072b0671accb504cf0f959c5c52c679f5b9" - [[package]] name = "gstreamer" version = "0.23.7" @@ -2511,37 +2533,7 @@ dependencies = [ "gstreamer-base-sys", "gstreamer-sys", "libc", - "system-deps", -] - -[[package]] -name = "gstreamer-audio" -version = "0.23.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7ec7e0374298897e669db7c79544bc44df12011985e7dd5f38644edaf2caf4" -dependencies = [ - "cfg-if", - "glib", - "gstreamer", - "gstreamer-audio-sys", - "gstreamer-base", - "libc", - "once_cell", - "smallvec", -] - -[[package]] -name = "gstreamer-audio-sys" -version = "0.23.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5f3e09e7c04ec91d78c2a6ca78d50b574b9ed49fdf5e72f3693adca4306a87" -dependencies = [ - "glib-sys", - "gobject-sys", - "gstreamer-base-sys", - "gstreamer-sys", - "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2568,37 +2560,7 @@ dependencies = [ "gobject-sys", "gstreamer-sys", "libc", - "system-deps", -] - -[[package]] -name = "gstreamer-pbutils" -version = "0.23.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf4bf5857fa22f910634e86a5bce33b5581a9e90caa4e32fd4a20bdd4c83ed0" -dependencies = [ - "glib", - "gstreamer", - "gstreamer-audio", - "gstreamer-pbutils-sys", - "gstreamer-video", - "libc", - "thiserror 2.0.16", -] - -[[package]] -name = "gstreamer-pbutils-sys" -version = "0.23.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304101f5fccbbe41e0169536777ddb7680c2c837e18575c22b30fc20cedfb76f" -dependencies = [ - "glib-sys", - "gobject-sys", - "gstreamer-audio-sys", - "gstreamer-sys", - "gstreamer-video-sys", - "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2610,38 +2572,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", -] - -[[package]] -name = "gstreamer-video" -version = "0.23.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1318b599d77ca4f7702ecbdeac1672d6304cb16b7e5752fabb3ee8260449a666" -dependencies = [ - "cfg-if", - "futures-channel", - "glib", - "gstreamer", - "gstreamer-base", - "gstreamer-video-sys", - "libc", - "once_cell", - "thiserror 2.0.16", -] - -[[package]] -name = "gstreamer-video-sys" -version = "0.23.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a70f0947f12d253b9de9bc3fd92f981e4d025336c18389c7f08cdf388a99f5c" -dependencies = [ - "glib-sys", - "gobject-sys", - "gstreamer-base-sys", - "gstreamer-sys", - "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2662,6 +2593,7 @@ checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" dependencies = [ "cfg-if", "crunchy", + "num-traits", ] [[package]] @@ -2669,6 +2601,19 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash 0.8.12", + "allocator-api2", +] [[package]] name = "hashbrown" @@ -2699,7 +2644,7 @@ dependencies = [ "bitflags 2.9.2", "com", "libc", - "libloading", + "libloading 0.8.8", "thiserror 1.0.69", "widestring", "winapi", @@ -2774,15 +2719,6 @@ version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" -[[package]] -name = "html-escape" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" -dependencies = [ - "utf8-width", -] - [[package]] name = "iana-time-zone" version = "0.1.63" @@ -2809,138 +2745,282 @@ dependencies = [ [[package]] name = "iced" -version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88acfabc84ec077eaf9ede3457ffa3a104626d79022a9bf7f296093b1d60c73f" dependencies = [ - "dnd", - "iced_accessibility", - "iced_core", - "iced_futures", - "iced_renderer", - "iced_widget", - "iced_winit", - "image", - "mime 0.1.0", + "iced_core 0.13.2", + "iced_futures 0.13.2", + "iced_renderer 0.13.0", + "iced_widget 0.13.4", + "iced_winit 0.13.0", + "image 0.24.9", "thiserror 1.0.69", - "window_clipboard", ] [[package]] -name = "iced_accessibility" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +name = "iced" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ - "accesskit", - "accesskit_winit", + "iced_core 0.14.0-dev", + "iced_debug", + "iced_devtools", + "iced_futures 0.14.0-dev", + "iced_renderer 0.14.0-dev", + "iced_runtime 0.14.0-dev", + "iced_widget 0.14.0-dev", + "iced_winit 0.14.0-dev", + "image 0.25.6", + "thiserror 1.0.69", +] + +[[package]] +name = "iced_beacon" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" +dependencies = [ + "bincode 1.3.3", + "futures", + "iced_core 0.14.0-dev", + "log", + "semver", + "serde", + "thiserror 1.0.69", + "tokio", +] + +[[package]] +name = "iced_core" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0013a238275494641bf8f1732a23a808196540dc67b22ff97099c044ae4c8a1c" +dependencies = [ + "bitflags 2.9.2", + "bytes", + "dark-light 1.1.1", + "glam", + "log", + "num-traits", + "once_cell", + "palette", + "rustc-hash 2.1.1", + "smol_str", + "thiserror 1.0.69", + "web-time", ] [[package]] name = "iced_core" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ "bitflags 2.9.2", "bytes", - "dnd", + "dark-light 2.0.0", "glam", - "iced_accessibility", + "lilt", "log", - "mime 0.1.0", "num-traits", - "once_cell", - "palette", - "raw-window-handle", "rustc-hash 2.1.1", "serde", "smol_str", "thiserror 1.0.69", "web-time", - "window_clipboard", +] + +[[package]] +name = "iced_debug" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" +dependencies = [ + "cargo-hot-protocol", + "iced_beacon", + "iced_core 0.14.0-dev", + "iced_futures 0.14.0-dev", + "log", +] + +[[package]] +name = "iced_devtools" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" +dependencies = [ + "iced_debug", + "iced_program", + "iced_widget 0.14.0-dev", + "log", ] [[package]] name = "iced_futures" -version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c04a6745ba2e80f32cf01e034fd00d853aa4f4cd8b91888099cb7aaee0d5d7c" dependencies = [ "futures", - "iced_core", + "iced_core 0.13.2", "log", "rustc-hash 2.1.1", - "tokio", "wasm-bindgen-futures", "wasm-timer", ] +[[package]] +name = "iced_futures" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" +dependencies = [ + "futures", + "iced_core 0.14.0-dev", + "log", + "rustc-hash 2.1.1", + "tokio", + "wasm-bindgen-futures", + "wasmtimer", +] + [[package]] name = "iced_glyphon" version = "0.6.0" -source = "git+https://github.com/pop-os/glyphon.git?tag=iced-0.14-dev#6ef9d12a20cfd0f7bdf38136a26ded9f7459ec8b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c3bb56f1820ca252bc1d0994ece33d233a55657c0c263ea7cb16895adbde82" dependencies = [ - "cosmic-text", + "cosmic-text 0.12.1", "etagere", - "lru", + "lru 0.12.5", "rustc-hash 2.1.1", - "wgpu", + "wgpu 0.19.4", ] [[package]] name = "iced_graphics" -version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba25a18cfa6d5cc160aca7e1b34f73ccdff21680fa8702168c09739767b6c66f" dependencies = [ "bitflags 2.9.2", "bytemuck", - "cosmic-text", + "cosmic-text 0.12.1", "half", - "iced_core", - "iced_futures", - "image", + "iced_core 0.13.2", + "iced_futures 0.13.2", + "image 0.24.9", "kamadak-exif", "log", - "lyon_path", "once_cell", - "raw-window-handle", + "raw-window-handle 0.6.2", "rustc-hash 2.1.1", "thiserror 1.0.69", "unicode-segmentation", ] +[[package]] +name = "iced_graphics" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" +dependencies = [ + "bitflags 2.9.2", + "bytemuck", + "cosmic-text 0.14.2", + "half", + "iced_core 0.14.0-dev", + "iced_futures 0.14.0-dev", + "image 0.25.6", + "kamadak-exif", + "log", + "lyon_path", + "raw-window-handle 0.6.2", + "rustc-hash 2.1.1", + "thiserror 1.0.69", + "unicode-segmentation", +] + +[[package]] +name = "iced_program" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" +dependencies = [ + "iced_graphics 0.14.0-dev", + "iced_runtime 0.14.0-dev", +] + +[[package]] +name = "iced_renderer" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73558208059f9e622df2bf434e044ee2f838ce75201a023cf0ca3e1244f46c2a" +dependencies = [ + "iced_graphics 0.13.0", + "iced_tiny_skia 0.13.0", + "iced_wgpu 0.13.5", + "log", + "thiserror 1.0.69", +] + [[package]] name = "iced_renderer" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ - "iced_graphics", - "iced_tiny_skia", - "iced_wgpu", + "iced_graphics 0.14.0-dev", + "iced_tiny_skia 0.14.0-dev", + "iced_wgpu 0.14.0-dev", "log", "thiserror 1.0.69", ] [[package]] name = "iced_runtime" -version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "348b5b2c61c934d88ca3b0ed1ed913291e923d086a66fa288ce9669da9ef62b5" dependencies = [ "bytes", - "dnd", - "iced_accessibility", - "iced_core", - "iced_futures", - "raw-window-handle", + "iced_core 0.13.2", + "iced_futures 0.13.2", + "raw-window-handle 0.6.2", "thiserror 1.0.69", - "window_clipboard", +] + +[[package]] +name = "iced_runtime" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" +dependencies = [ + "bytes", + "iced_core 0.14.0-dev", + "iced_debug", + "iced_futures 0.14.0-dev", + "raw-window-handle 0.6.2", + "thiserror 1.0.69", +] + +[[package]] +name = "iced_tiny_skia" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c625d368284fcc43b0b36b176f76eff1abebe7959dd58bd8ce6897d641962a50" +dependencies = [ + "bytemuck", + "cosmic-text 0.12.1", + "iced_graphics 0.13.0", + "kurbo 0.10.4", + "log", + "rustc-hash 2.1.1", + "softbuffer", + "tiny-skia", ] [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ "bytemuck", - "cosmic-text", - "iced_graphics", + "cosmic-text 0.14.2", + "iced_debug", + "iced_graphics 0.14.0-dev", "kurbo 0.10.4", "log", "resvg", @@ -2952,15 +3032,14 @@ dependencies = [ [[package]] name = "iced_video_player" version = "0.6.0" -source = "git+https://github.com/jackpot51/iced_video_player.git?branch=cosmic#ff37a34f99814597db0e265e172dd5a85a03394a" +source = "git+https://github.com/jazzfool/iced_video_player.git?branch=master#a8656e8021f7a6c316760fffc84664b92e5abc61" dependencies = [ "glib", "gstreamer", "gstreamer-app", "gstreamer-base", - "gstreamer-pbutils", - "html-escape", - "libcosmic", + "iced 0.13.1", + "iced_wgpu 0.13.5", "log", "thiserror 1.0.69", "url", @@ -2968,75 +3047,110 @@ dependencies = [ [[package]] name = "iced_wgpu" -version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15708887133671d2bcc6c1d01d1f176f43a64d6cdc3b2bf893396c3ee498295f" dependencies = [ - "as-raw-xcb-connection", "bitflags 2.9.2", "bytemuck", - "cosmic-client-toolkit", "futures", "glam", "guillotiere", "iced_glyphon", - "iced_graphics", + "iced_graphics 0.13.0", + "log", + "once_cell", + "rustc-hash 2.1.1", + "thiserror 1.0.69", + "wgpu 0.19.4", +] + +[[package]] +name = "iced_wgpu" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" +dependencies = [ + "bitflags 2.9.2", + "bytemuck", + "cryoglyph", + "futures", + "glam", + "guillotiere", + "iced_debug", + "iced_graphics 0.14.0-dev", "log", "lyon", - "once_cell", - "raw-window-handle", "resvg", "rustc-hash 2.1.1", - "rustix 0.38.44", "thiserror 1.0.69", - "tiny-xlib", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-sys", - "wgpu", - "x11rb", + "wgpu 26.0.1", +] + +[[package]] +name = "iced_widget" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81429e1b950b0e4bca65be4c4278fea6678ea782030a411778f26fa9f8983e1d" +dependencies = [ + "iced_renderer 0.13.0", + "iced_runtime 0.13.2", + "num-traits", + "once_cell", + "rustc-hash 2.1.1", + "thiserror 1.0.69", + "unicode-segmentation", ] [[package]] name = "iced_widget" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ - "dnd", - "iced_accessibility", - "iced_renderer", - "iced_runtime", + "iced_renderer 0.14.0-dev", + "iced_runtime 0.14.0-dev", "log", "num-traits", - "once_cell", "ouroboros", "rustc-hash 2.1.1", "thiserror 1.0.69", "unicode-segmentation", +] + +[[package]] +name = "iced_winit" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f44cd4e1c594b6334f409282937bf972ba14d31fedf03c23aa595d982a2fda28" +dependencies = [ + "iced_futures 0.13.2", + "iced_graphics 0.13.0", + "iced_runtime 0.13.2", + "log", + "rustc-hash 2.1.1", + "thiserror 1.0.69", + "tracing", + "wasm-bindgen-futures", + "web-sys", + "winapi", "window_clipboard", + "winit 0.30.12", ] [[package]] name = "iced_winit" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ - "dnd", - "iced_accessibility", - "iced_futures", - "iced_graphics", - "iced_runtime", + "iced_debug", + "iced_program", "log", "rustc-hash 2.1.1", - "rustix 0.38.44", "thiserror 1.0.69", "tracing", "wasm-bindgen-futures", - "wayland-client", "web-sys", - "winapi", "window_clipboard", - "winit", + "winit 0.30.8", ] [[package]] @@ -3125,12 +3239,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "1.0.3" @@ -3152,6 +3260,24 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "image" +version = "0.24.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "exr", + "gif", + "jpeg-decoder", + "num-traits", + "png", + "qoi", + "tiff", +] + [[package]] name = "image" version = "0.25.6" @@ -3160,12 +3286,31 @@ checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" dependencies = [ "bytemuck", "byteorder-lite", + "color_quant", + "exr", + "gif", + "image-webp", "num-traits", "png", + "qoi", + "ravif", + "rayon", + "rgb", + "tiff", "zune-core", "zune-jpeg", ] +[[package]] +name = "image-webp" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6970fe7a5300b4b42e62c52efa0187540a5bef546c60edaf554ef595d2e6f0b" +dependencies = [ + "byteorder-lite", + "quick-error", +] + [[package]] name = "imagesize" version = "0.12.0" @@ -3173,24 +3318,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] -name = "immutable-chunkmap" -version = "2.0.6" +name = "imgref" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f97096f508d54f8f8ab8957862eee2ccd628847b6217af1a335e1c44dee578" -dependencies = [ - "arrayvec", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] +checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408" [[package]] name = "indexmap" @@ -3200,36 +3331,6 @@ checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", "hashbrown 0.15.5", - "serde", -] - -[[package]] -name = "ini_core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a467a31a9f439b5262fa99c17084537bff57f24703d5a09a2b5c9657ec73a61" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "inotify" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" -dependencies = [ - "bitflags 2.9.2", - "inotify-sys", - "libc", -] - -[[package]] -name = "inotify-sys" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" -dependencies = [ - "libc", ] [[package]] @@ -3241,6 +3342,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -3275,6 +3387,15 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -3336,6 +3457,9 @@ name = "jpeg-decoder" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" +dependencies = [ + "rayon", +] [[package]] name = "js-sys" @@ -3363,7 +3487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading", + "libloading 0.8.8", "pkg-config", ] @@ -3373,35 +3497,6 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" -[[package]] -name = "known-folders" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c644f4623d1c55eb60a9dac35e0858a59f982fb87db6ce34c872372b0a5b728f" -dependencies = [ - "windows-sys 0.60.2", -] - -[[package]] -name = "kqueue" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" -dependencies = [ - "kqueue-sys", - "libc", -] - -[[package]] -name = "kqueue-sys" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" -dependencies = [ - "bitflags 1.3.2", - "libc", -] - [[package]] name = "kurbo" version = "0.10.4" @@ -3423,6 +3518,15 @@ dependencies = [ "smallvec", ] +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -3432,6 +3536,12 @@ dependencies = [ "spin", ] +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + [[package]] name = "lewton" version = "0.10.2" @@ -3471,51 +3581,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] -name = "libcosmic" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#29f38f83a38b550ae0de2b130fde9f2c36341fab" +name = "libfuzzer-sys" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5037190e1f70cbeef565bd267599242926f724d3b8a9f510fd7e0b540cfa4404" dependencies = [ - "apply", - "ashpd", - "auto_enums", - "chrono", - "cosmic-config", - "cosmic-freedesktop-icons", - "cosmic-settings-config", - "cosmic-settings-daemon", - "cosmic-theme", - "css-color", - "derive_setters", - "freedesktop-desktop-entry", - "futures", - "iced", - "iced_accessibility", - "iced_core", - "iced_futures", - "iced_renderer", - "iced_runtime", - "iced_tiny_skia", - "iced_wgpu", - "iced_widget", - "iced_winit", - "image", - "lazy_static", - "libc", - "mime 0.3.17", - "palette", - "raw-window-handle", - "rfd", - "rustix 1.0.8", - "serde", - "shlex", - "slotmap", - "taffy", - "thiserror 2.0.16", - "tokio", - "tracing", - "unicode-segmentation", - "url", - "zbus 5.9.0", + "arbitrary", + "cc", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", ] [[package]] @@ -3556,6 +3638,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "lilt" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67562e5eff6b20553fa9be1c503356768420994e28f67e3eafe6f41910e57ad" +dependencies = [ + "web-time", +] + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -3592,19 +3683,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed" -[[package]] -name = "locale_config" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d2c35b16f4483f6c26f0e4e9550717a2f6575bcd6f12a53ff0c490a94a6934" -dependencies = [ - "lazy_static", - "objc", - "objc-foundation", - "regex", - "winapi", -] - [[package]] name = "lock_api" version = "0.4.13" @@ -3620,6 +3698,18 @@ name = "log" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +dependencies = [ + "value-bag", +] + +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] [[package]] name = "lru" @@ -3627,6 +3717,12 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +[[package]] +name = "lru" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ea4e65087ff52f3862caff188d489f1fab49a0cb09e01b2e3f1a617b10aaed" + [[package]] name = "lumina" version = "0.1.0" @@ -3637,14 +3733,15 @@ dependencies = [ "dirs 5.0.1", "gstreamer", "gstreamer-app", + "iced 0.14.0-dev", "iced_video_player", "lexpr", - "libcosmic", "miette", "pretty_assertions", "rayon", + "rfd", "rodio", - "ron 0.8.1", + "ron", "serde", "serde-lexpr", "sqlx", @@ -3736,6 +3833,16 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + [[package]] name = "md-5" version = "0.10.6" @@ -3753,12 +3860,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] -name = "memmap2" -version = "0.8.0" +name = "memfd" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "libc", + "rustix 0.38.44", ] [[package]] @@ -3790,13 +3897,28 @@ dependencies = [ [[package]] name = "metal" -version = "0.29.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ "bitflags 2.9.2", "block", - "core-graphics-types", + "core-graphics-types 0.1.3", + "foreign-types", + "log", + "objc", + "paste", +] + +[[package]] +name = "metal" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" +dependencies = [ + "bitflags 2.9.2", + "block", + "core-graphics-types 0.2.0", "foreign-types", "log", "objc", @@ -3833,20 +3955,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "mime" -version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" -dependencies = [ - "smithay-clipboard", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -3870,7 +3978,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "log", "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.59.0", ] @@ -3889,18 +3996,17 @@ checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" [[package]] name = "naga" -version = "22.1.0" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" +checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843" dependencies = [ - "arrayvec", - "bit-set", + "bit-set 0.5.3", "bitflags 2.9.2", - "cfg_aliases 0.1.1", - "codespan-reporting", + "codespan-reporting 0.11.1", "hexf-parse", - "indexmap 2.10.0", + "indexmap", "log", + "num-traits", "rustc-hash 1.1.0", "spirv", "termcolor", @@ -3908,6 +4014,32 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "naga" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916cbc7cb27db60be930a4e2da243cf4bc39569195f22fd8ee419cd31d5b662c" +dependencies = [ + "arrayvec", + "bit-set 0.8.0", + "bitflags 2.9.2", + "cfg-if", + "cfg_aliases 0.2.1", + "codespan-reporting 0.12.0", + "half", + "hashbrown 0.15.5", + "hexf-parse", + "indexmap", + "libm", + "log", + "num-traits", + "once_cell", + "rustc-hash 1.1.0", + "spirv", + "thiserror 2.0.16", + "unicode-ident", +] + [[package]] name = "ndk" version = "0.8.0" @@ -3933,7 +4065,7 @@ dependencies = [ "log", "ndk-sys 0.6.0+11769913", "num_enum", - "raw-window-handle", + "raw-window-handle 0.6.2", "thiserror 1.0.69", ] @@ -3961,6 +4093,12 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + [[package]] name = "nibble_vec" version = "0.1.0" @@ -3994,6 +4132,19 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.9.2", + "cfg-if", + "cfg_aliases 0.2.1", + "libc", + "memoffset 0.9.1", +] + [[package]] name = "nix" version = "0.30.1" @@ -4018,28 +4169,10 @@ dependencies = [ ] [[package]] -name = "notify" -version = "8.2.0" +name = "noop_proc_macro" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" -dependencies = [ - "bitflags 2.9.2", - "fsevent-sys", - "inotify", - "kqueue", - "libc", - "log", - "mio", - "notify-types", - "walkdir", - "windows-sys 0.60.2", -] - -[[package]] -name = "notify-types" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" [[package]] name = "nu-ansi-term" @@ -4051,6 +4184,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + [[package]] name = "num-bigint-dig" version = "0.8.4" @@ -4063,7 +4206,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand 0.8.5", + "rand", "smallvec", "zeroize", ] @@ -4111,6 +4254,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ + "num-bigint", "num-integer", "num-traits", ] @@ -4173,6 +4317,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", + "objc_exception", ] [[package]] @@ -4202,15 +4347,6 @@ dependencies = [ "objc2-encode", ] -[[package]] -name = "objc2" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561f357ba7f3a2a61563a186a163d0a3a5247e1089524a3981d49adb775078bc" -dependencies = [ - "objc2-encode", -] - [[package]] name = "objc2-app-kit" version = "0.2.2" @@ -4218,27 +4354,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ "bitflags 2.9.2", - "block2 0.5.1", + "block2", "libc", - "objc2 0.5.2", + "objc2", "objc2-core-data", "objc2-core-image", - "objc2-foundation 0.2.2", + "objc2-foundation", "objc2-quartz-core", ] -[[package]] -name = "objc2-app-kit" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f29f568bec459b0ddff777cec4fe3fd8666d82d5a40ebd0ff7e66134f89bcc" -dependencies = [ - "bitflags 2.9.2", - "block2 0.6.1", - "objc2 0.6.2", - "objc2-foundation 0.3.1", -] - [[package]] name = "objc2-cloud-kit" version = "0.2.2" @@ -4246,10 +4370,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ "bitflags 2.9.2", - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-core-location", - "objc2-foundation 0.2.2", + "objc2-foundation", ] [[package]] @@ -4258,9 +4382,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", + "block2", + "objc2", + "objc2-foundation", ] [[package]] @@ -4270,20 +4394,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.9.2", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", -] - -[[package]] -name = "objc2-core-foundation" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" -dependencies = [ - "bitflags 2.9.2", - "dispatch2", - "objc2 0.6.2", + "block2", + "objc2", + "objc2-foundation", ] [[package]] @@ -4292,9 +4405,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", + "block2", + "objc2", + "objc2-foundation", "objc2-metal", ] @@ -4304,10 +4417,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-contacts", - "objc2-foundation 0.2.2", + "objc2-foundation", ] [[package]] @@ -4323,21 +4436,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.9.2", - "block2 0.5.1", + "block2", "dispatch", "libc", - "objc2 0.5.2", -] - -[[package]] -name = "objc2-foundation" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900831247d2fe1a09a683278e5384cfb8c80c79fe6b166f9d14bfdde0ea1b03c" -dependencies = [ - "bitflags 2.9.2", - "objc2 0.6.2", - "objc2-core-foundation", + "objc2", ] [[package]] @@ -4346,10 +4448,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", ] [[package]] @@ -4359,9 +4461,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.9.2", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", + "block2", + "objc2", + "objc2-foundation", ] [[package]] @@ -4371,9 +4473,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.9.2", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", + "block2", + "objc2", + "objc2-foundation", "objc2-metal", ] @@ -4383,8 +4485,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" dependencies = [ - "objc2 0.5.2", - "objc2-foundation 0.2.2", + "objc2", + "objc2-foundation", ] [[package]] @@ -4394,13 +4496,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ "bitflags 2.9.2", - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-cloud-kit", "objc2-core-data", "objc2-core-image", "objc2-core-location", - "objc2-foundation 0.2.2", + "objc2-foundation", "objc2-link-presentation", "objc2-quartz-core", "objc2-symbols", @@ -4414,9 +4516,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", + "block2", + "objc2", + "objc2-foundation", ] [[package]] @@ -4426,10 +4528,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ "bitflags 2.9.2", - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-core-location", - "objc2-foundation 0.2.2", + "objc2-foundation", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", ] [[package]] @@ -4518,6 +4629,25 @@ dependencies = [ "libredox", ] +[[package]] +name = "ordered-float" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2c1f9f56e534ac6a9b8a4600bdf0f530fb393b5f393e7b4d03489c3cf0c3f01" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ordered-multimap" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +dependencies = [ + "dlv-list", + "hashbrown 0.12.3", +] + [[package]] name = "ordered-stream" version = "0.2.0" @@ -4583,7 +4713,6 @@ dependencies = [ "fast-srgb8", "palette_derive", "phf", - "serde", ] [[package]] @@ -4690,7 +4819,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", - "rand 0.8.5", + "rand", ] [[package]] @@ -4836,9 +4965,24 @@ dependencies = [ [[package]] name = "pollster" -version = "0.4.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" +checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" + +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] [[package]] name = "potential_utf" @@ -4926,6 +5070,34 @@ name = "profiling" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" +dependencies = [ + "quote", + "syn 2.0.106", +] + +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" @@ -4968,18 +5140,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_chacha", + "rand_core", ] [[package]] @@ -4989,17 +5151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.3", + "rand_core", ] [[package]] @@ -5011,15 +5163,6 @@ dependencies = [ "getrandom 0.2.16", ] -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom 0.3.3", -] - [[package]] name = "range-alloc" version = "0.1.4" @@ -5032,6 +5175,62 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93e7e49bb0bf967717f7bd674458b3d6b0c5f48ec7e3038166026a69fc22223" +[[package]] +name = "rav1e" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.12.1", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "once_cell", + "paste", + "profiling", + "rand", + "rand_chacha", + "simd_helpers", + "system-deps 6.2.2", + "thiserror 1.0.69", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.11.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5825c26fddd16ab9f515930d49028a630efec172e903483c94796cfe31893e6b" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + +[[package]] +name = "raw-window-handle" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + [[package]] name = "raw-window-handle" version = "0.6.2" @@ -5058,6 +5257,16 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "read-fonts" +version = "0.22.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69aacb76b5c29acfb7f90155d39759a29496aebb49395830e928a9703d2eec2f" +dependencies = [ + "bytemuck", + "font-types 0.7.3", +] + [[package]] name = "read-fonts" version = "0.29.3" @@ -5065,7 +5274,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04ca636dac446b5664bd16c069c00a9621806895b8bb02c2dc68542b23b8f25d" dependencies = [ "bytemuck", - "font-types", + "font-types 0.9.0", ] [[package]] @@ -5106,37 +5315,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "redox_users" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" -dependencies = [ - "getrandom 0.2.16", - "libredox", - "thiserror 2.0.16", -] - -[[package]] -name = "ref-cast" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.106", -] - [[package]] name = "regex" version = "1.11.1" @@ -5205,26 +5383,27 @@ dependencies = [ [[package]] name = "rfd" -version = "0.15.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed" +checksum = "3c9e7b57df6e8472152674607f6cc68aa14a748a3157a857a94f516e11aeacc2" dependencies = [ - "ashpd", - "block2 0.6.1", - "dispatch2", + "ashpd 0.6.8", + "async-io 1.13.0", + "block", + "dispatch", + "futures-util", "js-sys", "log", - "objc2 0.6.2", - "objc2-app-kit 0.3.1", - "objc2-core-foundation", - "objc2-foundation 0.3.1", + "objc", + "objc-foundation", + "objc_id", "pollster", - "raw-window-handle", + "raw-window-handle 0.5.2", "urlencoding", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -5262,19 +5441,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "ron" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63f3aa105dea217ef30d89581b65a4d527a19afc95ef5750be3890e8d3c5b837" -dependencies = [ - "base64 0.22.1", - "bitflags 2.9.2", - "serde", - "serde_derive", - "unicode-ident", -] - [[package]] name = "roxmltree" version = "0.20.0" @@ -5294,13 +5460,23 @@ dependencies = [ "num-traits", "pkcs1", "pkcs8", - "rand_core 0.6.4", + "rand_core", "signature", "spki", "subtle", "zeroize", ] +[[package]] +name = "rust-ini" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +dependencies = [ + "cfg-if", + "ordered-multimap", +] + [[package]] name = "rustc-demangle" version = "0.1.26" @@ -5419,30 +5595,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schemars" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" -dependencies = [ - "dyn-clone", - "ref-cast", - "serde", - "serde_json", -] - -[[package]] -name = "schemars" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" -dependencies = [ - "dyn-clone", - "ref-cast", - "serde", - "serde_json", -] - [[package]] name = "scoped-tls" version = "1.0.1" @@ -5463,7 +5615,7 @@ checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", - "memmap2 0.9.7", + "memmap2", "smithay-client-toolkit", "tiny-skia", ] @@ -5474,6 +5626,15 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749" +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +dependencies = [ + "serde", +] + [[package]] name = "serde" version = "1.0.219" @@ -5510,7 +5671,6 @@ version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" dependencies = [ - "indexmap 2.10.0", "itoa", "memchr", "ryu", @@ -5549,38 +5709,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_with" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.10.0", - "schemars 0.9.0", - "schemars 1.0.4", - "serde", - "serde_derive", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.106", -] - [[package]] name = "sha1" version = "0.10.6" @@ -5634,7 +5762,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -5643,6 +5771,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + [[package]] name = "simplecss" version = "0.2.2" @@ -5658,6 +5795,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +[[package]] +name = "skrifa" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1c44ad1f6c5bdd4eefed8326711b7dbda9ea45dfd36068c427d332aa382cbe" +dependencies = [ + "bytemuck", + "read-fonts 0.22.7", +] + [[package]] name = "skrifa" version = "0.31.3" @@ -5665,7 +5812,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbeb4ca4399663735553a09dd17ce7e49a0a0203f03b706b39628c4d913a8607" dependencies = [ "bytemuck", - "read-fonts", + "read-fonts 0.29.3", ] [[package]] @@ -5699,14 +5846,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ "bitflags 2.9.2", - "bytemuck", "calloop", "calloop-wayland-source", "cursor-icon", "libc", "log", - "memmap2 0.9.7", - "pkg-config", + "memmap2", "rustix 0.38.44", "thiserror 1.0.69", "wayland-backend", @@ -5716,17 +5861,16 @@ dependencies = [ "wayland-protocols", "wayland-protocols-wlr", "wayland-scanner", - "xkbcommon", "xkeysym", ] [[package]] name = "smithay-clipboard" -version = "0.8.0" -source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-dnd-5#5a3007def49eb678d1144850c9ee04b80707c56a" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc8216eec463674a0e90f29e0ae41a4db573ec5b56b1c6c1c71615d249b6d846" dependencies = [ "libc", - "raw-window-handle", "smithay-client-toolkit", "wayland-backend", ] @@ -5762,23 +5906,25 @@ dependencies = [ [[package]] name = "softbuffer" -version = "0.4.1" -source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-4.0#6e75b1ad7e98397d37cb187886d05969bc480995" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08" dependencies = [ "as-raw-xcb-connection", "bytemuck", "cfg_aliases 0.2.1", - "cocoa", - "core-graphics", + "core-graphics 0.24.0", "drm", "fastrand 2.3.0", "foreign-types", "js-sys", "log", - "memmap2 0.9.7", - "objc", - "raw-window-handle", - "redox_syscall 0.4.1", + "memmap2", + "objc2", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle 0.6.2", + "redox_syscall 0.5.17", "rustix 0.38.44", "tiny-xlib", "wasm-bindgen", @@ -5786,7 +5932,7 @@ dependencies = [ "wayland-client", "wayland-sys", "web-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "x11rb", ] @@ -5849,7 +5995,7 @@ dependencies = [ "futures-util", "hashbrown 0.15.5", "hashlink", - "indexmap 2.10.0", + "indexmap", "log", "memchr", "once_cell", @@ -5932,7 +6078,7 @@ dependencies = [ "memchr", "once_cell", "percent-encoding", - "rand 0.8.5", + "rand", "rsa", "serde", "sha1", @@ -5970,7 +6116,7 @@ dependencies = [ "md-5", "memchr", "once_cell", - "rand 0.8.5", + "rand", "serde", "serde_json", "sha2", @@ -6063,6 +6209,34 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "subsecond" +version = "0.7.0-rc.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b14ed4d86ab065ffbfdb994fd3e44daf5244b02cb643bd52949d74b703f36605" +dependencies = [ + "js-sys", + "libc", + "libloading 0.8.8", + "memfd", + "memmap2", + "serde", + "subsecond-types", + "thiserror 2.0.16", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "subsecond-types" +version = "0.7.0-rc.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "275920a8a5634e47e12253971db85946798795bbe4d9dfc1debf23533d823983" +dependencies = [ + "serde", +] + [[package]] name = "subtle" version = "2.6.1" @@ -6106,15 +6280,26 @@ dependencies = [ "siphasher", ] +[[package]] +name = "swash" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd59f3f359ddd2c95af4758c18270eddd9c730dde98598023cdabff472c2ca2" +dependencies = [ + "skrifa 0.22.3", + "yazi 0.1.6", + "zeno 0.2.3", +] + [[package]] name = "swash" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f745de914febc7c9ab4388dfaf94bbc87e69f57bb41133a9b0c84d4be49856f3" dependencies = [ - "skrifa", - "yazi", - "zeno", + "skrifa 0.31.3", + "yazi 0.2.1", + "zeno 0.3.3", ] [[package]] @@ -6306,11 +6491,11 @@ dependencies = [ [[package]] name = "system-deps" -version = "7.0.5" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4be53aa0cba896d2dc615bd42bbc130acdcffa239e0a2d965ea5b3b2a86ffdb" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ - "cfg-expr", + "cfg-expr 0.15.8", "heck 0.5.0", "pkg-config", "toml", @@ -6318,28 +6503,30 @@ dependencies = [ ] [[package]] -name = "taffy" -version = "0.3.11" -source = "git+https://github.com/DioxusLabs/taffy?rev=7781c70#7781c70241f7f572130c13106f2a869a9cf80885" +name = "system-deps" +version = "7.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4be53aa0cba896d2dc615bd42bbc130acdcffa239e0a2d965ea5b3b2a86ffdb" dependencies = [ - "arrayvec", - "grid", - "num-traits", - "slotmap", + "cfg-expr 0.20.2", + "heck 0.5.0", + "pkg-config", + "toml", + "version-compare", ] +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + [[package]] name = "target-lexicon" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" -[[package]] -name = "temp-dir" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83176759e9416cf81ee66cb6508dbfe9c96f20b8b56265a39917551c23c70964" - [[package]] name = "tempfile" version = "3.21.0" @@ -6431,6 +6618,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "tiff" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + [[package]] name = "time" version = "0.3.41" @@ -6498,7 +6696,7 @@ checksum = "0324504befd01cab6e0c994f34b2ffa257849ee019d3fb3b64fb2c858887d89e" dependencies = [ "as-raw-xcb-connection", "ctor-lite", - "libloading", + "libloading 0.8.8", "pkg-config", "tracing", ] @@ -6540,11 +6738,9 @@ dependencies = [ "libc", "mio", "pin-project-lite", - "signal-hook-registry", "slab", "socket2 0.6.0", "tokio-macros", - "tracing", "windows-sys 0.59.0", ] @@ -6597,7 +6793,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.10.0", + "indexmap", "toml_datetime", "winnow 0.5.40", ] @@ -6608,7 +6804,7 @@ version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.10.0", + "indexmap", "serde", "serde_spanned", "toml_datetime", @@ -6679,6 +6875,12 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "ttf-parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" + [[package]] name = "ttf-parser" version = "0.21.1" @@ -6690,9 +6892,6 @@ name = "ttf-parser" version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" -dependencies = [ - "core_maths", -] [[package]] name = "typenum" @@ -6711,12 +6910,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "unicase" -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" - [[package]] name = "unicode-bidi" version = "0.3.18" @@ -6798,6 +6991,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "unty" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" + [[package]] name = "url" version = "2.5.4" @@ -6843,12 +7042,6 @@ dependencies = [ "xmlwriter", ] -[[package]] -name = "utf8-width" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -6861,12 +7054,29 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "v_frame" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" +[[package]] +name = "value-bag" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" + [[package]] name = "vcpkg" version = "0.2.15" @@ -6885,6 +7095,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "virtue" +version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" + [[package]] name = "waker-fn" version = "1.2.0" @@ -7008,6 +7224,20 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmtimer" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d49b5d6c64e8558d9b1b065014426f35c18de636895d24893dbbd329743446" +dependencies = [ + "futures", + "js-sys", + "parking_lot 0.12.4", + "pin-utils", + "slab", + "wasm-bindgen", +] + [[package]] name = "wayland-backend" version = "0.3.11" @@ -7066,7 +7296,6 @@ dependencies = [ "wayland-backend", "wayland-client", "wayland-scanner", - "wayland-server", ] [[package]] @@ -7093,7 +7322,6 @@ dependencies = [ "wayland-client", "wayland-protocols", "wayland-scanner", - "wayland-server", ] [[package]] @@ -7107,19 +7335,6 @@ dependencies = [ "quote", ] -[[package]] -name = "wayland-server" -version = "0.31.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcbd4f3aba6c9fba70445ad2a484c0ef0356c1a9459b1e8e435bedc1971a6222" -dependencies = [ - "bitflags 2.9.2", - "downcast-rs", - "rustix 1.0.8", - "wayland-backend", - "wayland-scanner", -] - [[package]] name = "wayland-sys" version = "0.31.7" @@ -7160,110 +7375,260 @@ checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" [[package]] name = "wgpu" -version = "22.1.0" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" +checksum = "cbd7311dbd2abcfebaabf1841a2824ed7c8be443a0f29166e5d3c6a53a762c01" dependencies = [ "arrayvec", + "cfg-if", "cfg_aliases 0.1.1", - "document-features", "js-sys", "log", - "naga", - "parking_lot 0.12.4", + "naga 0.19.2", + "parking_lot 0.11.2", "profiling", - "raw-window-handle", + "raw-window-handle 0.6.2", "smallvec", "static_assertions", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core", - "wgpu-hal", - "wgpu-types", + "wgpu-core 0.19.4", + "wgpu-hal 0.19.5", + "wgpu-types 0.19.2", +] + +[[package]] +name = "wgpu" +version = "26.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70b6ff82bbf6e9206828e1a3178e851f8c20f1c9028e74dd3a8090741ccd5798" +dependencies = [ + "arrayvec", + "bitflags 2.9.2", + "cfg-if", + "cfg_aliases 0.2.1", + "document-features", + "hashbrown 0.15.5", + "js-sys", + "log", + "naga 26.0.0", + "parking_lot 0.12.4", + "portable-atomic", + "profiling", + "raw-window-handle 0.6.2", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core 26.0.1", + "wgpu-hal 26.0.4", + "wgpu-types 26.0.0", ] [[package]] name = "wgpu-core" -version = "22.1.0" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" +checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a" dependencies = [ "arrayvec", - "bit-vec", + "bit-vec 0.6.3", "bitflags 2.9.2", "cfg_aliases 0.1.1", - "document-features", - "indexmap 2.10.0", + "codespan-reporting 0.11.1", + "indexmap", "log", - "naga", + "naga 0.19.2", "once_cell", - "parking_lot 0.12.4", + "parking_lot 0.11.2", "profiling", - "raw-window-handle", + "raw-window-handle 0.6.2", "rustc-hash 1.1.0", "smallvec", "thiserror 1.0.69", - "wgpu-hal", - "wgpu-types", + "web-sys", + "wgpu-hal 0.19.5", + "wgpu-types 0.19.2", +] + +[[package]] +name = "wgpu-core" +version = "26.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f62f1053bd28c2268f42916f31588f81f64796e2ff91b81293515017ca8bd9" +dependencies = [ + "arrayvec", + "bit-set 0.8.0", + "bit-vec 0.8.0", + "bitflags 2.9.2", + "cfg_aliases 0.2.1", + "document-features", + "hashbrown 0.15.5", + "indexmap", + "log", + "naga 26.0.0", + "once_cell", + "parking_lot 0.12.4", + "portable-atomic", + "profiling", + "raw-window-handle 0.6.2", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 2.0.16", + "wgpu-core-deps-apple", + "wgpu-core-deps-emscripten", + "wgpu-core-deps-windows-linux-android", + "wgpu-hal 26.0.4", + "wgpu-types 26.0.0", +] + +[[package]] +name = "wgpu-core-deps-apple" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18ae5fbde6a4cbebae38358aa73fcd6e0f15c6144b67ef5dc91ded0db125dbdf" +dependencies = [ + "wgpu-hal 26.0.4", +] + +[[package]] +name = "wgpu-core-deps-emscripten" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7670e390f416006f746b4600fdd9136455e3627f5bd763abf9a65daa216dd2d" +dependencies = [ + "wgpu-hal 26.0.4", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "720a5cb9d12b3d337c15ff0e24d3e97ed11490ff3f7506e7f3d98c68fa5d6f14" +dependencies = [ + "wgpu-hal 26.0.4", ] [[package]] name = "wgpu-hal" -version = "22.0.0" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" +checksum = "bfabcfc55fd86611a855816326b2d54c3b2fd7972c27ce414291562650552703" dependencies = [ "android_system_properties", "arrayvec", - "ash", - "bit-set", + "ash 0.37.3+1.3.251", + "bit-set 0.5.3", "bitflags 2.9.2", "block", "cfg_aliases 0.1.1", - "core-graphics-types", + "core-graphics-types 0.1.3", "d3d12", - "glow", - "glutin_wgl_sys", + "glow 0.13.1", + "glutin_wgl_sys 0.5.0", "gpu-alloc", - "gpu-allocator", - "gpu-descriptor", + "gpu-allocator 0.25.0", + "gpu-descriptor 0.2.4", "hassle-rs", "js-sys", "khronos-egl", "libc", - "libloading", + "libloading 0.8.8", "log", - "metal", - "naga", + "metal 0.27.0", + "naga 0.19.2", "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", - "parking_lot 0.12.4", + "parking_lot 0.11.2", "profiling", "range-alloc", - "raw-window-handle", + "raw-window-handle 0.6.2", "renderdoc-sys", "rustc-hash 1.1.0", "smallvec", "thiserror 1.0.69", "wasm-bindgen", "web-sys", - "wgpu-types", + "wgpu-types 0.19.2", "winapi", ] [[package]] -name = "wgpu-types" -version = "22.0.0" +name = "wgpu-hal" +version = "26.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" +checksum = "7df2c64ac282a91ad7662c90bc4a77d4a2135bc0b2a2da5a4d4e267afc034b9e" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash 0.38.0+1.3.281", + "bit-set 0.8.0", + "bitflags 2.9.2", + "block", + "bytemuck", + "cfg-if", + "cfg_aliases 0.2.1", + "core-graphics-types 0.2.0", + "glow 0.16.0", + "glutin_wgl_sys 0.6.1", + "gpu-alloc", + "gpu-allocator 0.27.0", + "gpu-descriptor 0.3.2", + "hashbrown 0.15.5", + "js-sys", + "khronos-egl", + "libc", + "libloading 0.8.8", + "log", + "metal 0.32.0", + "naga 26.0.0", + "ndk-sys 0.6.0+11769913", + "objc", + "ordered-float", + "parking_lot 0.12.4", + "portable-atomic", + "portable-atomic-util", + "profiling", + "range-alloc", + "raw-window-handle 0.6.2", + "renderdoc-sys", + "smallvec", + "thiserror 2.0.16", + "wasm-bindgen", + "web-sys", + "wgpu-types 26.0.0", + "windows 0.58.0", + "windows-core 0.58.0", +] + +[[package]] +name = "wgpu-types" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805" dependencies = [ "bitflags 2.9.2", "js-sys", "web-sys", ] +[[package]] +name = "wgpu-types" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca7a8d8af57c18f57d393601a1fb159ace8b2328f1b6b5f80893f7d672c9ae2" +dependencies = [ + "bitflags 2.9.2", + "bytemuck", + "js-sys", + "log", + "thiserror 2.0.16", + "web-sys", +] + [[package]] name = "whoami" version = "1.6.1" @@ -7314,15 +7679,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d692d46038c433f9daee7ad8757e002a4248c20b0a3fbc991d99521d3bcb6d" dependencies = [ "clipboard-win", "clipboard_macos", "clipboard_wayland", "clipboard_x11", - "dnd", - "mime 0.1.0", - "raw-window-handle", + "raw-window-handle 0.6.2", "thiserror 1.0.69", ] @@ -7343,8 +7707,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ "windows-core 0.54.0", - "windows-implement 0.53.0", - "windows-interface 0.53.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", "windows-targets 0.52.6", ] @@ -7367,6 +7739,19 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-core" version = "0.61.2" @@ -7377,14 +7762,14 @@ dependencies = [ "windows-interface 0.59.1", "windows-link", "windows-result 0.3.4", - "windows-strings", + "windows-strings 0.4.2", ] [[package]] name = "windows-implement" -version = "0.53.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", @@ -7404,9 +7789,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.53.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", @@ -7439,6 +7824,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[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" @@ -7448,6 +7842,16 @@ dependencies = [ "windows-link", ] +[[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" @@ -7747,34 +8151,86 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winit" -version = "0.30.5" -source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13#1cc02bdab141072eaabad639d74b032fd0fcc62e" +version = "0.30.8" +source = "git+https://github.com/iced-rs/winit.git?rev=11414b6aa45699f038114e61b4ddf5102b2d3b4b#11414b6aa45699f038114e61b4ddf5102b2d3b4b" dependencies = [ - "ahash", + "ahash 0.8.12", "android-activity", "atomic-waker", "bitflags 2.9.2", - "block2 0.5.1", + "block2", "bytemuck", "calloop", "cfg_aliases 0.2.1", "concurrent-queue", - "core-foundation", - "core-graphics", + "core-foundation 0.9.4", + "core-graphics 0.23.2", "cursor-icon", - "dpi", + "dpi 0.1.1", "js-sys", "libc", - "memmap2 0.9.7", + "memmap2", "ndk 0.9.0", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", + "objc2", + "objc2-app-kit", + "objc2-foundation", "objc2-ui-kit", "orbclient", "percent-encoding", "pin-project", - "raw-window-handle", + "raw-window-handle 0.6.2", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winit" +version = "0.30.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" +dependencies = [ + "ahash 0.8.12", + "android-activity", + "atomic-waker", + "bitflags 2.9.2", + "block2", + "bytemuck", + "calloop", + "cfg_aliases 0.2.1", + "concurrent-queue", + "core-foundation 0.9.4", + "core-graphics 0.23.2", + "cursor-icon", + "dpi 0.1.2", + "js-sys", + "libc", + "memmap2", + "ndk 0.9.0", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle 0.6.2", "redox_syscall 0.4.1", "rustix 0.38.44", "sctk-adwaita", @@ -7814,6 +8270,25 @@ dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "wit-bindgen-rt" version = "0.39.0" @@ -7849,7 +8324,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "libloading", + "libloading 0.8.8", "once_cell", "rustix 0.38.44", "x11rb-protocol", @@ -7867,12 +8342,6 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" -[[package]] -name = "xdg" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" - [[package]] name = "xdg-home" version = "1.3.0" @@ -7883,17 +8352,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "xkbcommon" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13867d259930edc7091a6c41b4ce6eee464328c6ff9659b7e4c668ca20d4c91e" -dependencies = [ - "libc", - "memmap2 0.8.0", - "xkeysym", -] - [[package]] name = "xkbcommon-dl" version = "0.4.2" @@ -7912,9 +8370,6 @@ name = "xkeysym" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" -dependencies = [ - "bytemuck", -] [[package]] name = "xml-rs" @@ -7934,6 +8389,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yazi" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" + [[package]] name = "yazi" version = "0.2.1" @@ -7971,9 +8432,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" dependencies = [ "async-broadcast 0.5.1", + "async-executor", + "async-fs 1.6.0", + "async-io 1.13.0", + "async-lock 2.8.0", "async-process 1.8.1", "async-recursion", + "async-task", "async-trait", + "blocking", "byteorder", "derivative", "enumflags2", @@ -7985,12 +8452,11 @@ dependencies = [ "nix 0.26.4", "once_cell", "ordered-stream", - "rand 0.8.5", + "rand", "serde", "serde_repr", "sha1", "static_assertions", - "tokio", "tracing", "uds_windows", "winapi", @@ -8000,6 +8466,44 @@ dependencies = [ "zvariant 3.15.2", ] +[[package]] +name = "zbus" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" +dependencies = [ + "async-broadcast 0.7.2", + "async-executor", + "async-fs 2.1.3", + "async-io 2.5.0", + "async-lock 3.4.1", + "async-process 2.4.0", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener 5.4.1", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix 0.29.0", + "ordered-stream", + "rand", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "windows-sys 0.52.0", + "xdg-home", + "zbus_macros 4.4.0", + "zbus_names 3.0.0", + "zvariant 4.2.0", +] + [[package]] name = "zbus" version = "5.9.0" @@ -8024,7 +8528,6 @@ dependencies = [ "ordered-stream", "serde", "serde_repr", - "tokio", "tracing", "uds_windows", "windows-sys 0.59.0", @@ -8048,6 +8551,19 @@ dependencies = [ "zvariant_utils 1.0.1", ] +[[package]] +name = "zbus_macros" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" +dependencies = [ + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "syn 2.0.106", + "zvariant_utils 2.1.0", +] + [[package]] name = "zbus_macros" version = "5.9.0" @@ -8074,6 +8590,17 @@ dependencies = [ "zvariant 3.15.2", ] +[[package]] +name = "zbus_names" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +dependencies = [ + "serde", + "static_assertions", + "zvariant 4.2.0", +] + [[package]] name = "zbus_names" version = "4.2.0" @@ -8086,6 +8613,12 @@ dependencies = [ "zvariant 5.6.0", ] +[[package]] +name = "zeno" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" + [[package]] name = "zeno" version = "0.3.3" @@ -8178,6 +8711,15 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + [[package]] name = "zune-jpeg" version = "0.4.20" @@ -8198,9 +8740,23 @@ dependencies = [ "libc", "serde", "static_assertions", + "url", "zvariant_derive 3.15.2", ] +[[package]] +name = "zvariant" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "zvariant_derive 4.2.0", +] + [[package]] name = "zvariant" version = "5.6.0" @@ -8229,6 +8785,19 @@ dependencies = [ "zvariant_utils 1.0.1", ] +[[package]] +name = "zvariant_derive" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" +dependencies = [ + "proc-macro-crate 3.3.0", + "proc-macro2", + "quote", + "syn 2.0.106", + "zvariant_utils 2.1.0", +] + [[package]] name = "zvariant_derive" version = "5.6.0" @@ -8253,6 +8822,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "zvariant_utils" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "zvariant_utils" version = "3.2.0" diff --git a/Cargo.toml b/Cargo.toml index 4f5c510..7418e9b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ description = "A cli presentation system" [dependencies] clap = { version = "4.5.20", features = ["debug", "derive"] } -libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false, features = ["debug", "winit", "desktop", "winit_wgpu", "winit_tokio", "tokio", "rfd", "dbus-config", "a11y", "wgpu", "multi-window"] } +# libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false, features = ["debug", "winit", "desktop", "winit_wgpu", "winit_tokio", "tokio", "rfd", "dbus-config", "a11y", "wgpu", "multi-window"] } lexpr = "0.2.7" miette = { version = "7.2.0", features = ["fancy"] } pretty_assertions = "1.4.1" @@ -37,12 +37,17 @@ rayon = "1.11.0" # femtovg = { version = "0.16.0", features = ["wgpu"] } # wgpu = "26.0.1" # mupdf = "0.5.0" -# rfd = { version = "0.12.1", features = ["xdg-portal"], default-features = false } +rfd = { version = "0.12.1", features = ["xdg-portal"], default-features = false } + +[dependencies.iced] +git = "https://github.com/iced-rs/iced" +branch = "master" +features = ["wgpu", "image", "advanced", "svg", "canvas", "hot", "debug", "lazy", "tokio"] [dependencies.iced_video_player] -git = "https://github.com/jackpot51/iced_video_player.git" -branch = "cosmic" -features = ["wgpu"] +git = "https://github.com/jazzfool/iced_video_player.git" +branch = "master" +# branch = "cosmic" # [profile.dev] # opt-level = 3 diff --git a/src/core/model.rs b/src/core/model.rs index a0afcd0..3520dc0 100644 --- a/src/core/model.rs +++ b/src/core/model.rs @@ -1,6 +1,6 @@ use std::mem::replace; -use cosmic::iced::Executor; +use iced::iced::Executor; use miette::{miette, Result}; use sqlx::{Connection, SqliteConnection}; diff --git a/src/core/service_items.rs b/src/core/service_items.rs index 19c2301..2d885d0 100644 --- a/src/core/service_items.rs +++ b/src/core/service_items.rs @@ -3,8 +3,8 @@ use std::cmp::Ordering; use std::ops::Deref; use std::sync::Arc; -use cosmic::iced::clipboard::mime::{AllowedMimeTypes, AsMimeTypes}; use crisp::types::{Keyword, Symbol, Value}; +use iced::iced::clipboard::mime::{AllowedMimeTypes, AsMimeTypes}; use miette::Result; use tracing::{debug, error}; diff --git a/src/core/slide.rs b/src/core/slide.rs index a6cb45a..6400639 100644 --- a/src/core/slide.rs +++ b/src/core/slide.rs @@ -1,4 +1,4 @@ -// use cosmic::dialog::ashpd::url::Url; +// use iced::dialog::ashpd::url::Url; use crisp::types::{Keyword, Symbol, Value}; use iced_video_player::Video; use miette::{miette, Result}; diff --git a/src/core/songs.rs b/src/core/songs.rs index 20dbebb..988a51b 100644 --- a/src/core/songs.rs +++ b/src/core/songs.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, option::Option, path::PathBuf}; -use cosmic::iced::Executor; use crisp::types::{Keyword, Symbol, Value}; +use iced::iced::Executor; use miette::{miette, IntoDiagnostic, Result}; use serde::{Deserialize, Serialize}; use sqlx::{ diff --git a/src/core/videos.rs b/src/core/videos.rs index c0c1dfb..0a761a5 100644 --- a/src/core/videos.rs +++ b/src/core/videos.rs @@ -7,8 +7,8 @@ use super::{ service_items::ServiceTrait, slide::Slide, }; -use cosmic::iced::Executor; use crisp::types::{Keyword, Symbol, Value}; +use iced::iced::Executor; use miette::{IntoDiagnostic, Result}; use serde::{Deserialize, Serialize}; use sqlx::{ diff --git a/src/main.rs b/src/main.rs index 9d1cd41..27b43ca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,32 +2,25 @@ use clap::{command, Parser}; use core::service_items::ServiceItem; use core::slide::*; use core::songs::Song; -use cosmic::app::context_drawer::ContextDrawer; -use cosmic::app::{Core, Settings, Task}; -use cosmic::iced::keyboard::{Key, Modifiers}; -use cosmic::iced::window::{Mode, Position}; -use cosmic::iced::{self, event, window, Length, Padding, Point}; -use cosmic::iced_futures::Subscription; -use cosmic::iced_widget::{column, row}; -use cosmic::widget::dnd_destination::{ - dnd_destination, dnd_destination_for_data, -}; -use cosmic::widget::nav_bar::nav_bar_style; -use cosmic::widget::segmented_button::Entity; -use cosmic::widget::text; -use cosmic::widget::tooltip::Position as TPosition; -use cosmic::widget::{ - button, horizontal_space, nav_bar, search_input, tooltip, - vertical_space, Space, -}; -use cosmic::widget::{icon, slider}; -use cosmic::{executor, Application, ApplicationExt, Element}; -use cosmic::{prelude::*, theme}; -use cosmic::{widget::Container, Theme}; use crisp::types::Value; +use iced::keyboard::{Key, Modifiers}; +use iced::theme::{self, Palette}; +use iced::widget::tooltip::Position as TPosition; +use iced::widget::{ + button, horizontal_space, slider, text, tooltip, vertical_space, + Space, +}; +use iced::widget::{column, row}; +use iced::window::{Mode, Position}; +use iced::{self, event, window, Length, Padding, Point}; +use iced::{color, Subscription}; +use iced::{executor, Application, Element}; +use iced::{widget::Container, Theme}; +use iced::{Settings, Task}; use lisp::parse_lisp; use miette::{miette, Result}; use rayon::prelude::*; +use std::collections::BTreeMap; use std::fs::read_to_string; use std::path::PathBuf; use tracing::{debug, level_filters::LevelFilter}; @@ -86,20 +79,19 @@ fn main() -> Result<()> { .is_daemon(true); } - cosmic::app::run::(settings, args) + iced::daemon(move || App::init(args), App::update, App::view) + .settings(settings) + .subscription(App::subsrciption) + .theme(App::theme) + .title(App::title) + .run() .map_err(|e| miette!("Invalid things... {}", e)) } -fn theme(_state: &App) -> Theme { - Theme::dark() -} - struct App { - core: Core, - nav_model: nav_bar::Model, file: PathBuf, presenter: Presenter, - windows: Vec, + windows: BTreeMap, service: Vec, current_item: (usize, usize), presentation_open: bool, @@ -119,7 +111,7 @@ enum Message { Library(library::Message), SongEditor(song_editor::Message), File(PathBuf), - DndEnter(Entity, Vec), + DndEnter(Vec), DndDrop, OpenWindow, CloseWindow(Option), @@ -130,7 +122,7 @@ enum Message { Quit, Key(Key, Modifiers), None, - DndLeave(Entity), + DndLeave(), EditorToggle(bool), SearchFocus, ChangeServiceItem(usize), @@ -139,30 +131,42 @@ enum Message { AppendServiceItem(ServiceItem), } +#[derive(Debug)] +struct Window { + title: String, + scale_input: String, + current_scale: f64, + theme: Theme, +} + +impl Default for Window { + fn default() -> Self { + Self { + title: Default::default(), + scale_input: Default::default(), + current_scale: Default::default(), + theme: App::theme(), + } + } +} + const HEADER_SPACE: u16 = 6; -impl cosmic::Application for App { - type Executor = executor::Default; - type Flags = Cli; - type Message = Message; +impl App { const APP_ID: &'static str = "lumina"; - fn core(&self) -> &Core { - &self.core - } - fn core_mut(&mut self) -> &mut Core { - &mut self.core - } - fn init( - core: Core, - input: Self::Flags, - ) -> (Self, Task) { + fn init(input: Cli) -> (Self, Task) { debug!("init"); - let nav_model = nav_bar::Model::default(); - - let mut windows = vec![]; + let mut batch = vec![]; + let mut windows = BTreeMap::new(); if input.ui { - windows.push(core.main_window_id().unwrap()); + let settings = window::Settings { + ..Default::default() + }; + let (id, open) = window::open(settings); + batch.push(open); + + windows.insert(id, Window::default()); } let items = match read_to_string(input.file) { @@ -202,8 +206,6 @@ impl cosmic::Application for App { let mut app = App { presenter, - core, - nav_model, service: items, file: PathBuf::default(), windows, @@ -219,8 +221,6 @@ impl cosmic::Application for App { library_dragged_item: None, }; - let mut batch = vec![]; - if input.ui { debug!("main view"); batch.push(app.update_title()) @@ -235,39 +235,34 @@ impl cosmic::Application for App { (app, batch) } - /// Allows COSMIC to integrate with your application's [`nav_bar::Model`]. - fn nav_model(&self) -> Option<&nav_bar::Model> { - Some(&self.nav_model) - } - - fn nav_bar(&self) -> Option>> { + fn nav_bar(&self) -> Option> { if !self.core().nav_bar_active() { return None; } // let nav_model = self.nav_model()?; - // let mut nav = cosmic::widget::nav_bar(nav_model, |id| { - // cosmic::Action::Cosmic(cosmic::app::Action::NavBar(id)) + // let mut nav = iced::widget::nav_bar(nav_model, |id| { + // iced::Action::Iced(iced::app::Action::NavBar(id)) // }) // .on_dnd_drop::(|entity, data, action| { // debug!(?entity); // debug!(?data); // debug!(?action); - // cosmic::Action::App(Message::DndDrop) + // iced::Action::App(Message::DndDrop) // }) // .on_dnd_enter(|entity, data| { // debug!("entered"); - // cosmic::Action::App(Message::DndEnter(entity, data)) + // iced::Action::App(Message::DndEnter(entity, data)) // }) // .on_dnd_leave(|entity| { // debug!("left"); - // cosmic::Action::App(Message::DndLeave(entity)) + // iced::Action::App(Message::DndLeave(entity)) // }) // .drag_id(DragId::new()) // .on_context(|id| { - // cosmic::Action::Cosmic( - // cosmic::app::Action::NavBarContext(id), + // iced::Action::Iced( + // iced::app::Action::NavBarContext(id), // ) // }) // .context_menu(None) @@ -301,30 +296,30 @@ impl cosmic::Application for App { }, } }) - .class(cosmic::theme::style::Button::HeaderBar) + .class(iced::theme::style::Button::HeaderBar) .padding(5) .width(Length::Fill) - .on_press(cosmic::Action::App(Message::ChangeServiceItem(index))); + .on_press(iced::Action::App(Message::ChangeServiceItem(index))); let tooltip = tooltip(button, text::body(item.kind.to_string()), TPosition::Right); dnd_destination(tooltip, vec!["application/service-item".into()]) .data_received_for::( move |item| { if let Some(item) = item { - cosmic::Action::App(Message::AddServiceItem(index, item)) + iced::Action::App(Message::AddServiceItem(index, item)) } else { - cosmic::Action::None + iced::Action::None } }).on_drop(move |x, y| { debug!(x, y); - cosmic::Action::App(Message::AddServiceItemDrop(index)) + iced::Action::App(Message::AddServiceItemDrop(index)) }).on_finish(move |mime, data, action, x, y| { debug!(mime, ?data, ?action, x, y); let Ok(item) = ServiceItem::try_from((data, mime)) else { - return cosmic::Action::None; + return iced::Action::None; }; debug!(?item); - cosmic::Action::App(Message::AddServiceItem(index, item)) + iced::Action::App(Message::AddServiceItem(index, item)) }) .into() }); @@ -339,11 +334,11 @@ impl cosmic::Application for App { ) .data_received_for::(|item| { if let Some(item) = item { - cosmic::Action::App(Message::AppendServiceItem( + iced::Action::App(Message::AppendServiceItem( item, )) } else { - cosmic::Action::None + iced::Action::None } }) .on_finish( @@ -352,10 +347,10 @@ impl cosmic::Application for App { let Ok(item) = ServiceItem::try_from((data, mime)) else { - return cosmic::Action::None; + return iced::Action::None; }; debug!(?item); - cosmic::Action::App(Message::AddServiceItem( + iced::Action::App(Message::AddServiceItem( end_index, item, )) } @@ -375,16 +370,6 @@ impl cosmic::Application for App { Some(container.into()) } - /// Called when a navigation item is selected. - fn on_nav_select( - &mut self, - id: nav_bar::Id, - ) -> Task { - self.nav_model.activate(id); - // debug!(?id); - self.update_title() - } - fn header_start(&self) -> Vec> { vec![] } @@ -429,7 +414,7 @@ impl cosmic::Application for App { ) .spacing(5), ) - .class(cosmic::theme::style::Button::HeaderBar) + .class(iced::theme::style::Button::HeaderBar) .on_press(Message::EditorToggle( self.editor_mode.is_none(), )), @@ -454,7 +439,7 @@ impl cosmic::Application for App { ) .spacing(5), ) - .class(cosmic::theme::style::Button::HeaderBar) + .class(iced::theme::style::Button::HeaderBar) .on_press({ if self.presentation_open { Message::CloseWindow( @@ -483,7 +468,7 @@ impl cosmic::Application for App { ) .spacing(5), ) - .class(cosmic::theme::style::Button::HeaderBar) + .class(iced::theme::style::Button::HeaderBar) .on_press(Message::LibraryToggle), "Open Library", TPosition::Bottom, @@ -556,9 +541,8 @@ impl cosmic::Application for App { fn context_drawer( &self, - ) -> Option< - cosmic::app::context_drawer::ContextDrawer, - > { + ) -> Option> + { ContextDrawer { title: Some("Context".into()), header_actions: vec![], @@ -588,9 +572,7 @@ impl cosmic::Application for App { match self.song_editor.update(message) { song_editor::Action::Task(task) => { task.map(|m| { - cosmic::Action::App(Message::SongEditor( - m, - )) + iced::Action::App(Message::SongEditor(m)) }) } song_editor::Action::UpdateSong(song) => { @@ -615,7 +597,7 @@ impl cosmic::Application for App { match self.presenter.update(message) { presenter::Action::Task(task) => task.map(|m| { // debug!("Should run future"); - cosmic::Action::App(Message::Present(m)) + iced::Action::App(Message::Present(m)) }), presenter::Action::None => Task::none(), presenter::Action::NextSlide => { @@ -644,7 +626,7 @@ impl cosmic::Application for App { match action { presenter::Action::Task(task) => { tasks.push(task.map(|m| { - cosmic::Action::App( + iced::Action::App( Message::Present(m), ) })) @@ -665,16 +647,15 @@ impl cosmic::Application for App { match action { presenter::Action::Task( task, - ) => { - tasks - .push(task.map(|m| { - cosmic::Action::App( + ) => tasks.push(task.map( + |m| { + iced::Action::App( Message::Present( m, ), ) - })) - } + }, + )), _ => todo!(), } } @@ -703,7 +684,7 @@ impl cosmic::Application for App { match action { presenter::Action::Task(task) => { tasks.push(task.map(|m| { - cosmic::Action::App( + iced::Action::App( Message::Present(m), ) })) @@ -739,16 +720,15 @@ impl cosmic::Application for App { match action { presenter::Action::Task( task, - ) => { - tasks - .push(task.map(|m| { - cosmic::Action::App( + ) => tasks.push(task.map( + |m| { + iced::Action::App( Message::Present( m, ), ) - })) - } + }, + )), _ => todo!(), } } @@ -769,7 +749,7 @@ impl cosmic::Application for App { } library::Action::Task(task) => { return task.map(|message| { - cosmic::Action::App(Message::Library( + iced::Action::App(Message::Library( message, )) }); @@ -834,9 +814,7 @@ impl cosmic::Application for App { ); spawn_window.map(|id| { - cosmic::Action::App(Message::WindowOpened( - id, None, - )) + iced::Action::App(Message::WindowOpened(id, None)) }) } Message::CloseWindow(id) => { @@ -849,7 +827,7 @@ impl cosmic::Application for App { Message::WindowOpened(id, _) => { debug!(?id, "Window opened"); if self.cli_mode - || id > self.core.main_window_id().expect("Cosmic core seems to be missing a main window, was this started in cli mode?") + || id > self.core.main_window_id().expect("Iced core seems to be missing a main window, was this started in cli mode?") { self.presentation_open = true; if let Some(video) = &mut self.presenter.video { @@ -884,7 +862,7 @@ impl cosmic::Application for App { self.library_open = !self.library_open; Task::none() } - Message::Quit => cosmic::iced::exit(), + Message::Quit => iced::iced::exit(), Message::DndEnter(entity, data) => { debug!(?entity); debug!(?data); @@ -1106,7 +1084,7 @@ impl cosmic::Application for App { impl App where - Self: cosmic::Application, + Self: iced::Application, { fn active_page_title(&self) -> &str { let Some(label) = @@ -1135,13 +1113,13 @@ where self.windows.push(id); _ = self.set_window_title("Lumina Presenter".to_owned(), id); spawn_window.map(|id| { - cosmic::Action::App(Message::WindowOpened(id, None)) + iced::Action::App(Message::WindowOpened(id, None)) }) } fn add_library(&mut self) -> Task { Task::perform(async move { Library::new().await }, |x| { - cosmic::Action::App(Message::AddLibrary(x)) + iced::Action::App(Message::AddLibrary(x)) }) } @@ -1163,7 +1141,7 @@ where // |x| { // let len = x.len(); // debug!(len, "to append: "); - // cosmic::Action::App(Message::AppendService(x)) + // iced::Action::App(Message::AppendService(x)) // }, // ) // } @@ -1212,6 +1190,20 @@ where _ => Task::none(), } } + + fn theme() -> Theme { + Theme::custom( + "Snazzy", + Palette { + background: color!(0x282a36), + text: color!(0xe2e4e5), + primary: color!(0x57c7ff), + success: color!(0x5af78e), + warning: color!(0xff9f43), + danger: color!(0xff5c57), + }, + ) + } } #[cfg(test)] diff --git a/src/ui/double_ended_slider.rs b/src/ui/double_ended_slider.rs index c388fbd..5431fc5 100644 --- a/src/ui/double_ended_slider.rs +++ b/src/ui/double_ended_slider.rs @@ -1,6 +1,6 @@ use std::ops::RangeInclusive; -use cosmic::iced::Length; +use iced::Length; struct DoubleSlider<'a, T, Message> { range: RangeInclusive, diff --git a/src/ui/library.rs b/src/ui/library.rs index 56b47f6..2d172bf 100644 --- a/src/ui/library.rs +++ b/src/ui/library.rs @@ -1,17 +1,14 @@ -use cosmic::{ - iced::{ - alignment::Vertical, clipboard::dnd::DndAction, - futures::FutureExt, Background, Border, Color, Length, - }, - iced_core::widget::tree::State, - iced_widget::{column, row as rowm, text as textm}, +use iced::{ + advanced::widget::{tree::State, Widget}, + alignment::Vertical, + futures::FutureExt, theme, widget::{ - button, container, horizontal_space, icon, mouse_area, - responsive, row, scrollable, text, text_input, Container, - DndSource, Space, Widget, + button, container, horizontal_space, mouse_area, responsive, + row, scrollable, text, text_input, Container, Space, }, - Element, Task, + widget::{column, row as rowm, text as textm}, + Background, Border, Color, Element, Length, Task, }; use miette::{IntoDiagnostic, Result}; use sqlx::{pool::PoolConnection, Sqlite, SqlitePool}; @@ -332,19 +329,21 @@ impl<'a> Library { match self.library_hovered { Some(lib) => Background::Color( if lib == model.kind { - t.cosmic().button.hover.into() + t.iced().button.hover.into() } else { - t.cosmic().button.base.into() + t.iced().button.base.into() }, ), None => Background::Color( - t.cosmic().button.base.into(), + t.iced().button.base.into(), ), } }) - .border(Border::default().rounded( - t.cosmic().corner_radii.radius_s, - )) + .border( + Border::default().rounded( + t.iced().corner_radii.radius_s, + ), + ) }) .center_x(Length::Fill) .center_y(Length::Shrink); @@ -456,12 +455,9 @@ impl<'a> Library { .center_x(Length::Fill); let subtext = container(responsive(|size| { let color: Color = if item.background().is_some() { - theme::active().cosmic().accent_text_color().into() + theme::active().iced().accent_text_color().into() } else { - theme::active() - .cosmic() - .destructive_text_color() - .into() + theme::active().iced().destructive_text_color().into() }; text::body(elide_text(item.subtext(), size.width)) .center() @@ -490,9 +486,9 @@ impl<'a> Library { if model.kind == library && selected == index as i32 { - t.cosmic().accent.selected.into() + t.iced().accent.selected.into() } else { - t.cosmic().button.base.into() + t.iced().button.base.into() } } else if let Some((library, hovered)) = self.hovered_item @@ -500,17 +496,17 @@ impl<'a> Library { if model.kind == library && hovered == index as i32 { - t.cosmic().button.hover.into() + t.iced().button.hover.into() } else { - t.cosmic().button.base.into() + t.iced().button.base.into() } } else { - t.cosmic().button.base.into() + t.iced().button.base.into() }, )) .border( Border::default() - .rounded(t.cosmic().corner_radii.radius_m), + .rounded(t.iced().corner_radii.radius_m), ) }) .into() diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index 779e964..c0c8809 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -1,29 +1,25 @@ use miette::{IntoDiagnostic, Result}; use std::{fs::File, io::BufReader, path::PathBuf, sync::Arc}; -use cosmic::{ - iced::{ - alignment::Horizontal, - border, - font::{Family, Stretch, Style, Weight}, - Background, Border, Color, ContentFit, Font, Length, Shadow, - Vector, +use iced::{ + alignment::Horizontal, + border, + font::{Family, Stretch, Style, Weight}, + widget::{ + container, image, mouse_area, responsive, scrollable, text, + Column, Container, Row, Space, }, - iced_widget::{ + widget::{ rich_text, scrollable::{ scroll_to, AbsoluteOffset, Direction, Scrollbar, }, span, stack, vertical_rule, }, - prelude::*, - widget::{ - container, image, mouse_area, responsive, scrollable, text, - Column, Container, Id, Row, Space, - }, - Task, + Background, Border, Color, ContentFit, Font, Length, Shadow, + Task, Vector, }; -use iced_video_player::{gst_pbutils, Position, Video, VideoPlayer}; +use iced_video_player::{Position, Video, VideoPlayer}; use rodio::{Decoder, OutputStream, Sink}; use tracing::{debug, error, info, warn}; use url::Url; @@ -168,7 +164,7 @@ impl Presenter { ) }, scroll_id: Id::unique(), - current_font: cosmic::font::default(), + current_font: iced::font::default(), } } @@ -449,7 +445,7 @@ impl Presenter { .style(move |t| { let mut style = container::Style::default(); - let theme = t.cosmic(); + let theme = t.iced(); let hovered = self.hovered_slide == Some(( item_index, @@ -504,7 +500,7 @@ impl Presenter { .padding(10), ) .interaction( - cosmic::iced::mouse::Interaction::Pointer, + iced::iced::mouse::Interaction::Pointer, ) .on_move(move |_| { Message::HoveredSlide(Some(( @@ -578,7 +574,7 @@ impl Presenter { // Container::new(container) // .style(move |t| { // let mut style = container::Style::default(); - // let theme = t.cosmic(); + // let theme = t.iced(); // let hovered = self.hovered_slide == slide_id; // style.background = Some(Background::Color( // if is_current_slide { @@ -617,7 +613,7 @@ impl Presenter { // .height(100) // .padding(10), // ) - // .interaction(cosmic::iced::mouse::Interaction::Pointer) + // .interaction(iced::iced::mouse::Interaction::Pointer) // .on_move(move |_| Message::HoveredSlide(slide_id)) // .on_exit(Message::HoveredSlide(-1)) // .on_press(Message::SlideChange(slide.clone())); diff --git a/src/ui/slide_editor.rs b/src/ui/slide_editor.rs index 018e936..36dcddf 100644 --- a/src/ui/slide_editor.rs +++ b/src/ui/slide_editor.rs @@ -1,14 +1,12 @@ use std::{io, path::PathBuf}; -use cosmic::{ - iced::{Color, Font, Length, Size}, - prelude::*, +use iced::{ widget::{ self, canvas::{self, Program, Stroke}, container, Canvas, }, - Renderer, + Color, Font, Length, Renderer, Size, }; use tracing::debug; @@ -51,14 +49,14 @@ pub enum SlideError { #[derive(Debug, Default)] struct EditorProgram { - mouse_button_pressed: Option, + mouse_button_pressed: Option, } impl SlideEditor { pub fn view<'a>( &'a self, font: Font, - ) -> cosmic::Element<'a, SlideWidget> { + ) -> iced::Element<'a, SlideWidget> { container( widget::canvas(&self.program) .height(Length::Fill) @@ -68,9 +66,9 @@ impl SlideEditor { } } -/// Ensure to use the `cosmic::Theme and cosmic::Renderer` here +/// Ensure to use the `iced::Theme and iced::Renderer` here /// or else it will not compile -impl<'a> Program +impl<'a> Program for EditorProgram { type State = (); @@ -79,9 +77,9 @@ impl<'a> Program &self, state: &Self::State, renderer: &Renderer, - theme: &cosmic::Theme, - bounds: cosmic::iced::Rectangle, - cursor: cosmic::iced_core::mouse::Cursor, + theme: &iced::Theme, + bounds: iced::iced::Rectangle, + cursor: iced::iced_core::mouse::Cursor, ) -> Vec> { // We prepare a new `Frame` let mut frame = canvas::Frame::new(renderer, bounds.size()); @@ -90,7 +88,7 @@ impl<'a> Program // We create a `Path` representing a simple circle let circle = canvas::Path::circle(frame.center(), 50.0); let border = canvas::Path::rectangle( - cosmic::iced::Point { x: 10.0, y: 10.0 }, + iced::iced::Point { x: 10.0, y: 10.0 }, Size::new(frame_rect.width, frame_rect.height), ); @@ -117,18 +115,18 @@ impl<'a> Program &self, _state: &mut Self::State, event: canvas::Event, - bounds: cosmic::iced::Rectangle, - _cursor: cosmic::iced_core::mouse::Cursor, + bounds: iced::iced::Rectangle, + _cursor: iced::iced_core::mouse::Cursor, ) -> (canvas::event::Status, Option) { match event { canvas::Event::Mouse(event) => match event { - cosmic::iced::mouse::Event::CursorEntered => { + iced::iced::mouse::Event::CursorEntered => { debug!("cursor entered") } - cosmic::iced::mouse::Event::CursorLeft => { + iced::iced::mouse::Event::CursorLeft => { debug!("cursor left") } - cosmic::iced::mouse::Event::CursorMoved { + iced::iced::mouse::Event::CursorMoved { position, } => { if bounds.x < position.x @@ -139,16 +137,16 @@ impl<'a> Program debug!(?position, "cursor moved"); } } - cosmic::iced::mouse::Event::ButtonPressed(button) => { + iced::iced::mouse::Event::ButtonPressed(button) => { // self.mouse_button_pressed = Some(button); debug!(?button, "mouse button pressed") } - cosmic::iced::mouse::Event::ButtonReleased( - button, - ) => debug!(?button, "mouse button released"), - cosmic::iced::mouse::Event::WheelScrolled { - delta, - } => debug!(?delta, "scroll wheel"), + iced::iced::mouse::Event::ButtonReleased(button) => { + debug!(?button, "mouse button released") + } + iced::iced::mouse::Event::WheelScrolled { delta } => { + debug!(?delta, "scroll wheel") + } }, canvas::Event::Touch(event) => debug!("test"), canvas::Event::Keyboard(event) => debug!("test"), @@ -159,9 +157,9 @@ impl<'a> Program fn mouse_interaction( &self, _state: &Self::State, - _bounds: cosmic::iced::Rectangle, - _cursor: cosmic::iced_core::mouse::Cursor, - ) -> cosmic::iced_core::mouse::Interaction { - cosmic::iced_core::mouse::Interaction::default() + _bounds: iced::iced::Rectangle, + _cursor: iced::iced_core::mouse::Cursor, + ) -> iced::iced_core::mouse::Interaction { + iced::iced_core::mouse::Interaction::default() } } diff --git a/src/ui/song_editor.rs b/src/ui/song_editor.rs index 89ebf89..d9e64b5 100644 --- a/src/ui/song_editor.rs +++ b/src/ui/song_editor.rs @@ -1,21 +1,17 @@ use std::{io, path::PathBuf}; -use cosmic::{ - dialog::file_chooser::open::Dialog, - iced::{ - font::{Family, Stretch, Style, Weight}, - Font, Length, - }, - iced_wgpu::graphics::text::cosmic_text::fontdb, - iced_widget::row, +use dirs::font_dir; +use iced::{ + advanced::graphics::text::cosmic_text::fontdb, + font::{Family, Stretch, Style, Weight}, theme, + widget::row, widget::{ - button, column, combo_box, container, horizontal_space, icon, + button, column, combo_box, container, horizontal_space, scrollable, text, text_editor, text_input, }, - Element, Task, + Element, Font, Length, Task, }; -use dirs::font_dir; use iced_video_player::Video; use tracing::{debug, error}; @@ -133,7 +129,7 @@ impl SongEditor { audio: PathBuf::new(), background: None, video: None, - current_font: cosmic::font::default(), + current_font: iced::font::default(), ccli: "8".to_owned(), slide_state: SlideEditor::default(), } @@ -283,7 +279,7 @@ impl SongEditor { ] .into(), ]) - .spacing(theme::active().cosmic().space_l()); + .spacing(theme::active().iced().space_l()); column.into() } @@ -317,7 +313,7 @@ impl SongEditor { // .collect(); // scrollable( // column::with_children(slides) - // .spacing(theme::active().cosmic().space_l()), + // .spacing(theme::active().iced().space_l()), // ) // .height(Length::Fill) // .width(Length::Fill) @@ -401,7 +397,7 @@ order", ) }, ) - .width(theme::active().cosmic().space_xxl()); + .width(theme::active().iced().space_xxl()); let background_selector = button::icon( icon::from_name("folder-pictures-symbolic").scale(2), diff --git a/src/ui/text_svg.rs b/src/ui/text_svg.rs index cbfd280..728478e 100644 --- a/src/ui/text_svg.rs +++ b/src/ui/text_svg.rs @@ -4,13 +4,10 @@ use std::{ }; use colors_transform::Rgb; -use cosmic::{ - iced::{ - font::{Style, Weight}, - Length, Size, - }, - prelude::*, +use iced::{ + font::{Style, Weight}, widget::{container, svg::Handle, Svg}, + Length, Size, }; use tracing::error; @@ -46,11 +43,11 @@ pub struct Font { size: u8, } -impl From for Font { - fn from(value: cosmic::font::Font) -> Self { +impl From for Font { + fn from(value: iced::font::Font) -> Self { Self { name: match value.family { - cosmic::iced::font::Family::Name(name) => { + iced::iced::font::Family::Name(name) => { name.to_string() } _ => "Quicksand Bold".into(), diff --git a/src/ui/widgets/slide_text.rs b/src/ui/widgets/slide_text.rs index d393b44..64a202d 100644 --- a/src/ui/widgets/slide_text.rs +++ b/src/ui/widgets/slide_text.rs @@ -1,11 +1,11 @@ -use cosmic::iced::advanced::layout::{self, Layout}; -use cosmic::iced::advanced::renderer; -use cosmic::iced::advanced::widget::{self, Widget}; -use cosmic::iced::border; -use cosmic::iced::mouse; -use cosmic::iced::{Color, Element, Length, Rectangle, Size}; use femtovg::renderer::WGPURenderer; use femtovg::{Canvas, TextContext}; +use iced::iced::advanced::layout::{self, Layout}; +use iced::iced::advanced::renderer; +use iced::iced::advanced::widget::{self, Widget}; +use iced::iced::border; +use iced::iced::mouse; +use iced::iced::{Color, Element, Length, Rectangle, Size}; pub struct SlideText { text: String, @@ -23,7 +23,7 @@ impl SlideText { }); let surface = instance.create_surface(window.clone()).unwrap(); - let adapter = cosmic::iced::wgpu::util::initialize_adapter_from_env_or_default(&instance, Some(&surface)) + let adapter = iced::iced::wgpu::util::initialize_adapter_from_env_or_default(&instance, Some(&surface)) .await .expect("Failed to find an appropriate adapter"); let (device, queue) = adapter From 4ae6a9a9a76d95073e6ab49654f410247ea4b589 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 26 Aug 2025 09:47:35 -0500 Subject: [PATCH 02/15] ohh --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 27b43ca..e2d63fe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -276,7 +276,7 @@ impl App { .iter() .enumerate() .map(|(index, item)| { - let button = button::standard(item.title.clone()) + let button = button(item.title.clone() .leading_icon({ match item.kind { core::kinds::ServiceItemKind::Song(_) => { @@ -295,7 +295,7 @@ impl App { icon::from_name("x-office-presentation-symbolic") }, } - }) + })) .class(iced::theme::style::Button::HeaderBar) .padding(5) .width(Length::Fill) From 1861f357a8b94e647e7179619f902f76b1b04081 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 26 Aug 2025 15:25:04 -0500 Subject: [PATCH 03/15] well crap --- Cargo.lock | 98 +++++- Cargo.toml | 2 + src/core/model.rs | 1 - src/core/service_items.rs | 44 +-- src/core/songs.rs | 1 - src/core/videos.rs | 1 - src/main.rs | 550 +++++++++++++++------------------- src/ui/library.rs | 181 +++++------ src/ui/presenter.rs | 116 +++---- src/ui/slide_editor.rs | 51 ++-- src/ui/song_editor.rs | 69 +++-- src/ui/text_svg.rs | 6 +- src/ui/widgets/icon/handle.rs | 115 +++++++ src/ui/widgets/icon/mod.rs | 187 ++++++++++++ src/ui/widgets/icon/named.rs | 165 ++++++++++ src/ui/widgets/mod.rs | 1 + 16 files changed, 1026 insertions(+), 562 deletions(-) create mode 100644 src/ui/widgets/icon/handle.rs create mode 100644 src/ui/widgets/icon/mod.rs create mode 100644 src/ui/widgets/icon/named.rs diff --git a/Cargo.lock b/Cargo.lock index 4e2f6cd..91bd7bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1496,6 +1496,41 @@ dependencies = [ "winreg 0.52.0", ] +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.106", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.106", +] + [[package]] name = "dasp_sample" version = "0.11.0" @@ -1545,6 +1580,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_setters" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae5c625eda104c228c06ecaf988d1c60e542176bd7a490e60eeda3493244c0c9" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "detect-desktop-environment" version = "0.2.0" @@ -1969,6 +2016,12 @@ dependencies = [ "spin", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "foldhash" version = "0.1.5" @@ -2066,6 +2119,20 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "freedesktop-icons" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95f87364ea709292a3b3f74014ce3ee78412c89807eea75a358c8e029b000994" +dependencies = [ + "dirs 5.0.1", + "ini_core", + "once_cell", + "thiserror 1.0.69", + "tracing", + "xdg", +] + [[package]] name = "futures" version = "0.3.31" @@ -2440,7 +2507,7 @@ dependencies = [ "log", "presser", "thiserror 1.0.69", - "windows 0.54.0", + "windows 0.58.0", ] [[package]] @@ -3239,6 +3306,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.0.3" @@ -3333,6 +3406,15 @@ dependencies = [ "hashbrown 0.15.5", ] +[[package]] +name = "ini_core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a467a31a9f439b5262fa99c17084537bff57f24703d5a09a2b5c9657ec73a61" +dependencies = [ + "cfg-if", +] + [[package]] name = "instant" version = "0.1.13" @@ -3730,7 +3812,9 @@ dependencies = [ "clap", "colors-transform", "crisp", + "derive_setters", "dirs 5.0.1", + "freedesktop-icons", "gstreamer", "gstreamer-app", "iced 0.14.0-dev", @@ -7385,7 +7469,7 @@ dependencies = [ "js-sys", "log", "naga 0.19.2", - "parking_lot 0.11.2", + "parking_lot 0.12.4", "profiling", "raw-window-handle 0.6.2", "smallvec", @@ -7442,7 +7526,7 @@ dependencies = [ "log", "naga 0.19.2", "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.4", "profiling", "raw-window-handle 0.6.2", "rustc-hash 1.1.0", @@ -7542,7 +7626,7 @@ dependencies = [ "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.4", "profiling", "range-alloc", "raw-window-handle 0.6.2", @@ -8342,6 +8426,12 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" +[[package]] +name = "xdg" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" + [[package]] name = "xdg-home" version = "1.3.0" diff --git a/Cargo.toml b/Cargo.toml index 7418e9b..37a0430 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,8 @@ rayon = "1.11.0" # wgpu = "26.0.1" # mupdf = "0.5.0" rfd = { version = "0.12.1", features = ["xdg-portal"], default-features = false } +derive_setters = "0.1.8" +freedesktop-icons = "0.4.0" [dependencies.iced] git = "https://github.com/iced-rs/iced" diff --git a/src/core/model.rs b/src/core/model.rs index 3520dc0..8452cc1 100644 --- a/src/core/model.rs +++ b/src/core/model.rs @@ -1,6 +1,5 @@ use std::mem::replace; -use iced::iced::Executor; use miette::{miette, Result}; use sqlx::{Connection, SqliteConnection}; diff --git a/src/core/service_items.rs b/src/core/service_items.rs index 2d885d0..15673d0 100644 --- a/src/core/service_items.rs +++ b/src/core/service_items.rs @@ -4,7 +4,7 @@ use std::ops::Deref; use std::sync::Arc; use crisp::types::{Keyword, Symbol, Value}; -use iced::iced::clipboard::mime::{AllowedMimeTypes, AsMimeTypes}; +// use cosmic::iced::clipboard::mime::{AllowedMimeTypes, AsMimeTypes}; use miette::Result; use tracing::{debug, error}; @@ -56,29 +56,29 @@ impl TryFrom<(Vec, String)> for ServiceItem { } } -impl AllowedMimeTypes for ServiceItem { - fn allowed() -> Cow<'static, [String]> { - Cow::from(vec!["application/service-item".to_string()]) - } -} +// impl AllowedMimeTypes for ServiceItem { +// fn allowed() -> Cow<'static, [String]> { +// Cow::from(vec!["application/service-item".to_string()]) +// } +// } -impl AsMimeTypes for ServiceItem { - fn available(&self) -> Cow<'static, [String]> { - debug!(?self); - Cow::from(vec!["application/service-item".to_string()]) - } +// impl AsMimeTypes for ServiceItem { +// fn available(&self) -> Cow<'static, [String]> { +// debug!(?self); +// Cow::from(vec!["application/service-item".to_string()]) +// } - fn as_bytes( - &self, - mime_type: &str, - ) -> Option> { - debug!(?self); - debug!(mime_type); - let val = Value::from(self); - let val = String::from(val); - Some(Cow::from(val.into_bytes())) - } -} +// fn as_bytes( +// &self, +// mime_type: &str, +// ) -> Option> { +// debug!(?self); +// debug!(mime_type); +// let val = Value::from(self); +// let val = String::from(val); +// Some(Cow::from(val.into_bytes())) +// } +// } impl From<&ServiceItem> for Value { fn from(value: &ServiceItem) -> Self { diff --git a/src/core/songs.rs b/src/core/songs.rs index 988a51b..270bc00 100644 --- a/src/core/songs.rs +++ b/src/core/songs.rs @@ -1,7 +1,6 @@ use std::{collections::HashMap, option::Option, path::PathBuf}; use crisp::types::{Keyword, Symbol, Value}; -use iced::iced::Executor; use miette::{miette, IntoDiagnostic, Result}; use serde::{Deserialize, Serialize}; use sqlx::{ diff --git a/src/core/videos.rs b/src/core/videos.rs index 0a761a5..879c14a 100644 --- a/src/core/videos.rs +++ b/src/core/videos.rs @@ -8,7 +8,6 @@ use super::{ slide::Slide, }; use crisp::types::{Keyword, Symbol, Value}; -use iced::iced::Executor; use miette::{IntoDiagnostic, Result}; use serde::{Deserialize, Serialize}; use sqlx::{ diff --git a/src/main.rs b/src/main.rs index e2d63fe..6e85e37 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,8 +7,8 @@ use iced::keyboard::{Key, Modifiers}; use iced::theme::{self, Palette}; use iced::widget::tooltip::Position as TPosition; use iced::widget::{ - button, horizontal_space, slider, text, tooltip, vertical_space, - Space, + button, horizontal_space, mouse_area, slider, text, text_input, + tooltip, vertical_space, Space, }; use iced::widget::{column, row}; use iced::window::{Mode, Position}; @@ -31,6 +31,8 @@ use ui::presenter::{self, Presenter}; use ui::song_editor::{self, SongEditor}; use ui::EditorMode; +use crate::ui::widgets::icon; + pub mod core; pub mod lisp; pub mod ui; @@ -62,26 +64,24 @@ fn main() -> Result<()> { .with_timer(timer) .init(); - let args = Cli::parse(); + // let settings; + // if args.ui { + // debug!("main view"); + // settings = iced::daemon::Settings::default() + // .debug(false) + // .is_daemon(true) + // .transparent(true); + // } else { + // debug!("window view"); + // settings = Settings::default() + // .debug(false) + // .no_main_window(true) + // .is_daemon(true); + // } - let settings; - if args.ui { - debug!("main view"); - settings = Settings::default() - .debug(false) - .is_daemon(true) - .transparent(true); - } else { - debug!("window view"); - settings = Settings::default() - .debug(false) - .no_main_window(true) - .is_daemon(true); - } - - iced::daemon(move || App::init(args), App::update, App::view) - .settings(settings) - .subscription(App::subsrciption) + iced::daemon(App::init, App::update, App::view) + .settings(Settings::default()) + .subscription(App::subscription) .theme(App::theme) .title(App::title) .run() @@ -128,10 +128,10 @@ enum Message { ChangeServiceItem(usize), AddServiceItem(usize, ServiceItem), AddServiceItemDrop(usize), - AppendServiceItem(ServiceItem), + AppendServiceItem(Option), } -#[derive(Debug)] +#[derive(Debug, Clone)] struct Window { title: String, scale_input: String, @@ -145,31 +145,66 @@ impl Default for Window { title: Default::default(), scale_input: Default::default(), current_scale: Default::default(), - theme: App::theme(), + theme: Theme::custom( + "Snazzy", + Palette { + background: color!(0x282a36), + text: color!(0xe2e4e5), + primary: color!(0x57c7ff), + success: color!(0x5af78e), + warning: color!(0xff9f43), + danger: color!(0xff5c57), + }, + ), } } } -const HEADER_SPACE: u16 = 6; +const HEADER_SPACE: f32 = 6.0; impl App { const APP_ID: &'static str = "lumina"; - fn init(input: Cli) -> (Self, Task) { + fn title(&self, id: window::Id) -> String { + self.windows + .get(&id) + .map(|window| window.title.clone()) + .unwrap_or(String::from("Lumina")) + } + + fn init() -> (Self, Task) { debug!("init"); + let args = Cli::parse(); let mut batch = vec![]; let mut windows = BTreeMap::new(); - if input.ui { + if args.ui { let settings = window::Settings { ..Default::default() }; let (id, open) = window::open(settings); - batch.push(open); + batch + .push(open.map(|id| Message::WindowOpened(id, None))); + let window = Window { + title: "Lumina".into(), + scale_input: "".into(), + current_scale: 1.0, + theme: Theme::custom( + "Snazzy", + Palette { + background: color!(0x282a36), + text: color!(0xe2e4e5), + primary: color!(0x57c7ff), + success: color!(0x5af78e), + warning: color!(0xff9f43), + danger: color!(0xff5c57), + }, + ), + }; - windows.insert(id, Window::default()); + windows.insert(id, window); } - let items = match read_to_string(input.file) { + let items = match read_to_string(args.file) { Ok(lisp) => { let mut slide_vector = vec![]; let lisp = crisp::reader::read(&lisp); @@ -210,7 +245,7 @@ impl App { file: PathBuf::default(), windows, presentation_open: false, - cli_mode: !input.ui, + cli_mode: !args.ui, library: None, library_open: true, library_width: 60.0, @@ -221,9 +256,9 @@ impl App { library_dragged_item: None, }; - if input.ui { + if args.ui { debug!("main view"); - batch.push(app.update_title()) + // batch.push(app.update_title()) } else { debug!("window view"); batch.push(app.show_window()) @@ -236,9 +271,9 @@ impl App { } fn nav_bar(&self) -> Option> { - if !self.core().nav_bar_active() { - return None; - } + // if !self.core().nav_bar_active() { + // return None; + // } // let nav_model = self.nav_model()?; @@ -271,89 +306,52 @@ impl App { // .width(Length::Shrink) // .height(Length::Shrink); - let list = self - .service - .iter() - .enumerate() - .map(|(index, item)| { - let button = button(item.title.clone() - .leading_icon({ - match item.kind { - core::kinds::ServiceItemKind::Song(_) => { - icon::from_name("folder-music-symbolic") - }, - core::kinds::ServiceItemKind::Video(_) => { - icon::from_name("folder-videos-symbolic") - }, - core::kinds::ServiceItemKind::Image(_) => { - icon::from_name("folder-pictures-symbolic") - }, - core::kinds::ServiceItemKind::Presentation(_) => { - icon::from_name("x-office-presentation-symbolic") - }, - core::kinds::ServiceItemKind::Content(_) => { - icon::from_name("x-office-presentation-symbolic") - }, - } - })) - .class(iced::theme::style::Button::HeaderBar) - .padding(5) - .width(Length::Fill) - .on_press(iced::Action::App(Message::ChangeServiceItem(index))); - let tooltip = tooltip(button, - text::body(item.kind.to_string()), - TPosition::Right); - dnd_destination(tooltip, vec!["application/service-item".into()]) - .data_received_for::( move |item| { - if let Some(item) = item { - iced::Action::App(Message::AddServiceItem(index, item)) - } else { - iced::Action::None - } - }).on_drop(move |x, y| { - debug!(x, y); - iced::Action::App(Message::AddServiceItemDrop(index)) - }).on_finish(move |mime, data, action, x, y| { - debug!(mime, ?data, ?action, x, y); - let Ok(item) = ServiceItem::try_from((data, mime)) else { - return iced::Action::None; - }; - debug!(?item); - iced::Action::App(Message::AddServiceItem(index, item)) - }) + let list = + self.service.iter().enumerate().map(|(index, item)| { + let icon = match item.kind { + core::kinds::ServiceItemKind::Song(_) => { + icon::from_name("folder-music-symbolic") + } + core::kinds::ServiceItemKind::Video(_) => { + icon::from_name("folder-videos-symbolic") + } + core::kinds::ServiceItemKind::Image(_) => { + icon::from_name("folder-pictures-symbolic") + } + core::kinds::ServiceItemKind::Presentation(_) => { + icon::from_name( + "x-office-presentation-symbolic", + ) + } + core::kinds::ServiceItemKind::Content(_) => { + icon::from_name( + "x-office-presentation-symbolic", + ) + } + }; + let button = + button(row![text(item.title.clone()), icon]) + .padding(5) + .width(Length::Fill) + .on_press(Message::ChangeServiceItem(index)); + let tooltip = tooltip( + button, + text(item.kind.to_string()), + TPosition::Right, + ); + mouse_area(tooltip) + .on_release(Message::AddServiceItemDrop(index)) .into() }); let end_index = self.service.len(); let column = column![ - text::heading("Service List").center().width(280), + text("Service List").center().width(280), column(list).spacing(10), - dnd_destination( - vertical_space(), - vec!["application/service-item".into()] - ) - .data_received_for::(|item| { - if let Some(item) = item { - iced::Action::App(Message::AppendServiceItem( - item, - )) - } else { - iced::Action::None - } - }) - .on_finish( - move |mime, data, action, x, y| { - debug!(mime, ?data, ?action, x, y); - let Ok(item) = - ServiceItem::try_from((data, mime)) - else { - return iced::Action::None; - }; - debug!(?item); - iced::Action::App(Message::AddServiceItem( - end_index, item, - )) - } + mouse_area(vertical_space(),).on_release( + Message::AppendServiceItem( + self.library_dragged_item.clone() + ) ) ] .padding(10) @@ -361,52 +359,51 @@ impl App { let padding = Padding::new(0.0).top(20); let mut container = Container::new(column) // .height(Length::Fill) - .style(nav_bar_style) + // .style(nav_bar_style) .padding(padding); - if !self.core().is_condensed() { - container = container.max_width(280); - } + // if !self.core().is_condensed() { + // container = container.max_width(280); + // } Some(container.into()) } - fn header_start(&self) -> Vec> { + fn header_start(&self) -> Vec> { vec![] } - fn header_center(&self) -> Vec> { - vec![search_input("Search...", "") + fn header_center(&self) -> Vec> { + vec![text_input("Search...", "") .on_input(|_| Message::None) - .on_submit(|_| Message::None) - .on_focus(Message::SearchFocus) + .on_submit(Message::None) .width(1200) .into()] } - fn header_end(&self) -> Vec> { + fn header_end(&self) -> Vec> { // let editor_toggle = toggler(self.editor_mode.is_some()) // .label("Editor") // .spacing(10) // .width(Length::Shrink) // .on_toggle(Message::EditorToggle); - let presenter_window = self.windows.get(1); - let text = if self.presentation_open { - text::body("End Presentation") + let presenter_window = self.windows.len() > 1; + let presentation_button_text = if self.presentation_open { + text("End Presentation") } else { - text::body("Present") + text("Present") }; let row = row![ tooltip( - button::custom( + button( row!( Container::new( icon::from_name("document-edit-symbolic") .scale(3) ) .center_y(Length::Fill), - text::body(if self.editor_mode.is_some() { + text(if self.editor_mode.is_some() { "Present Mode" } else { "Edit Mode" @@ -414,7 +411,6 @@ impl App { ) .spacing(5), ) - .class(iced::theme::style::Button::HeaderBar) .on_press(Message::EditorToggle( self.editor_mode.is_none(), )), @@ -422,7 +418,7 @@ impl App { TPosition::Bottom, ), tooltip( - button::custom( + button( row!( Container::new( icon::from_name( @@ -435,16 +431,16 @@ impl App { .scale(3) ) .center_y(Length::Fill), - text + presentation_button_text ) .spacing(5), ) - .class(iced::theme::style::Button::HeaderBar) .on_press({ if self.presentation_open { - Message::CloseWindow( - presenter_window.copied(), - ) + // Message::CloseWindow( + // presenter_window.copied(), + // ) + Message::None } else { Message::OpenWindow } @@ -453,14 +449,14 @@ impl App { TPosition::Bottom, ), tooltip( - button::custom( + button( row!( Container::new( icon::from_name("view-list-symbolic") .scale(3) ) .center_y(Length::Fill), - text::body(if self.library_open { + text(if self.library_open { "Close Library" } else { "Open Library" @@ -468,7 +464,6 @@ impl App { ) .spacing(5), ) - .class(iced::theme::style::Button::HeaderBar) .on_press(Message::LibraryToggle), "Open Library", TPosition::Bottom, @@ -479,25 +474,23 @@ impl App { vec![row] } - fn footer(&self) -> Option> { + fn footer(&self) -> Option> { let total_items_text = format!("Total Service Items: {}", self.service.len()); let total_slides_text = format!("Total Slides: {}", self.presenter.total_slides); - let row = row![ - text::body(total_items_text), - text::body(total_slides_text) - ] - .spacing(10); + let row = + row![text(total_items_text), text(total_slides_text)] + .spacing(10); Some( Container::new(row) .align_right(Length::Fill) - .padding([5, 0, 0, 0]) + .padding([5, 0]) .into(), ) } - fn subscription(&self) -> Subscription { + fn subscription(&self) -> Subscription { event::listen_with(|event, _, id| { // debug!(?event); match event { @@ -530,31 +523,12 @@ impl App { } } iced::Event::Touch(_touch) => None, - iced::Event::A11y(_id, _action_request) => None, - iced::Event::Dnd(_dnd_event) => None, - iced::Event::PlatformSpecific(_platform_specific) => { - None - } + iced::Event::InputMethod(event) => todo!(), } }) } - fn context_drawer( - &self, - ) -> Option> - { - ContextDrawer { - title: Some("Context".into()), - header_actions: vec![], - header: Some("hi".into()), - content: "Sup".into(), - footer: Some("foot".into()), - on_close: Message::None, - }; - None - } - - fn dialog(&self) -> Option> { + fn dialog(&self) -> Option> { if self.searching { Some(text("hello").into()) } else { @@ -571,9 +545,7 @@ impl App { // debug!(?message); match self.song_editor.update(message) { song_editor::Action::Task(task) => { - task.map(|m| { - iced::Action::App(Message::SongEditor(m)) - }) + task.map(|m| Message::SongEditor(m)) } song_editor::Action::UpdateSong(song) => { if let Some(library) = &mut self.library { @@ -595,10 +567,9 @@ impl App { video.set_muted(false); } match self.presenter.update(message) { - presenter::Action::Task(task) => task.map(|m| { - // debug!("Should run future"); - iced::Action::App(Message::Present(m)) - }), + presenter::Action::Task(task) => { + task.map(|m| Message::Present(m)) + } presenter::Action::None => Task::none(), presenter::Action::NextSlide => { let slide_index = self.current_item.1; @@ -626,9 +597,7 @@ impl App { match action { presenter::Action::Task(task) => { tasks.push(task.map(|m| { - iced::Action::App( - Message::Present(m), - ) + Message::Present(m) })) } _ => todo!(), @@ -648,13 +617,7 @@ impl App { presenter::Action::Task( task, ) => tasks.push(task.map( - |m| { - iced::Action::App( - Message::Present( - m, - ), - ) - }, + |m| Message::Present(m), )), _ => todo!(), } @@ -684,9 +647,7 @@ impl App { match action { presenter::Action::Task(task) => { tasks.push(task.map(|m| { - iced::Action::App( - Message::Present(m), - ) + Message::Present(m) })) } _ => todo!(), @@ -721,13 +682,7 @@ impl App { presenter::Action::Task( task, ) => tasks.push(task.map( - |m| { - iced::Action::App( - Message::Present( - m, - ), - ) - }, + |m| Message::Present(m), )), _ => todo!(), } @@ -749,9 +704,7 @@ impl App { } library::Action::Task(task) => { return task.map(|message| { - iced::Action::App(Message::Library( - message, - )) + Message::Library(message) }); } library::Action::None => return Task::none(), @@ -796,27 +749,7 @@ impl App { self.file = file; Task::none() } - Message::OpenWindow => { - let count = self.windows.len() + 1; - - let (id, spawn_window) = - window::open(window::Settings { - position: Position::Centered, - exit_on_close_request: count % 2 == 0, - decorations: false, - ..Default::default() - }); - - self.windows.push(id); - _ = self.set_window_title( - format!("window_{}", count), - id, - ); - - spawn_window.map(|id| { - iced::Action::App(Message::WindowOpened(id, None)) - }) - } + Message::OpenWindow => self.show_window(), Message::CloseWindow(id) => { if let Some(id) = id { window::close(id) @@ -826,27 +759,21 @@ impl App { } Message::WindowOpened(id, _) => { debug!(?id, "Window opened"); - if self.cli_mode - || id > self.core.main_window_id().expect("Iced core seems to be missing a main window, was this started in cli mode?") - { - self.presentation_open = true; - if let Some(video) = &mut self.presenter.video { - video.set_muted(false); - } - window::change_mode(id, Mode::Fullscreen) - } else { - Task::none() - } + let main_id = + self.windows.first_key_value().unwrap().0; + if self.cli_mode || &id > main_id { + self.presentation_open = true; + if let Some(video) = &mut self.presenter.video { + video.set_muted(false); + } + window::set_mode(id, Mode::Fullscreen) + } else { + Task::none() + } } Message::WindowClosed(id) => { warn!("Closing window: {id}"); - let Some(window) = - self.windows.iter().position(|w| *w == id) - else { - error!("Nothing matches this window id: {id}"); - return Task::none(); - }; - self.windows.remove(window); + self.windows.remove(&id); // This closes the app if using the cli example if self.windows.is_empty() { self.update(Message::Quit) @@ -862,9 +789,8 @@ impl App { self.library_open = !self.library_open; Task::none() } - Message::Quit => iced::iced::exit(), - Message::DndEnter(entity, data) => { - debug!(?entity); + Message::Quit => iced::exit(), + Message::DndEnter(data) => { debug!(?data); Task::none() } @@ -884,10 +810,6 @@ impl App { // } let item = library.get_song(item).unwrap(); let item = ServiceItem::from(item); - self.nav_model - .insert() - .text(item.title.clone()) - .data(item); } Task::none() } @@ -896,7 +818,7 @@ impl App { Task::none() } Message::None => Task::none(), - Message::DndLeave(entity) => { + Message::DndLeave() => { // debug!(?entity); Task::none() } @@ -940,14 +862,24 @@ impl App { Task::none() } Message::AppendServiceItem(item) => { - self.service.push(item); + if let Some(item) = item { + self.service.push(item); + } Task::none() } } } // Main window view - fn view(&self) -> Element { + fn view(&self, window: window::Id) -> Element { + if window == *self.windows.first_key_value().unwrap().0 { + self.main_view() + } else { + self.view_presenter() + } + } + + fn main_view(&self) -> Element { let icon_left = icon::from_name("arrow-left"); let icon_right = icon::from_name("arrow-right"); @@ -956,25 +888,30 @@ impl App { |video| video.duration().as_secs_f32(), ); - let video_button_icon = - if let Some(video) = &self.presenter.video { - let (icon_name, tooltip) = if video.paused() { - ("media-play", "Play") - } else { - ("media-pause", "Pause") - }; - button::icon(icon::from_name(icon_name)) - .tooltip(tooltip) - .on_press(Message::Present( - presenter::Message::StartVideo, - )) + let video_button_icon = if let Some(video) = + &self.presenter.video + { + let (icon_name, tt) = if video.paused() { + ("media-play", "Play") } else { - button::icon(icon::from_name("media-play")) - .tooltip("Play") - .on_press(Message::Present( - presenter::Message::StartVideo, - )) + ("media-pause", "Pause") }; + tooltip( + button(icon::from_name(icon_name)).on_press( + Message::Present(presenter::Message::StartVideo), + ), + tt, + TPosition::FollowCursor, + ) + } else { + tooltip( + button(icon::from_name("media-play")).on_press( + Message::Present(presenter::Message::StartVideo), + ), + "Play", + TPosition::FollowCursor, + ) + }; let slide_preview = column![ Space::with_height(Length::Fill), @@ -999,7 +936,7 @@ impl App { .step(0.1) ) .center_x(Length::Fill) - .padding([7, 0, 0, 0]) + .padding([7, 0]) ] .padding(5) } else { @@ -1016,7 +953,7 @@ impl App { } else { Space::new(0, 0).into() }) - .style(nav_bar_style) + // .style(nav_bar_style) .center(Length::FillPortion(2)) } else { Container::new(horizontal_space().width(0)) @@ -1026,31 +963,25 @@ impl App { self.song_editor.view().map(Message::SongEditor); let row = row![ - Container::new( - button::icon(icon_left) - .icon_size(128) - .tooltip("Previous Slide") - .width(128) - .on_press(Message::Present( - presenter::Message::PrevSlide - )) - .class(theme::style::Button::Transparent) - ) + Container::new(tooltip( + button(icon_left.size(128)).width(128).on_press( + Message::Present(presenter::Message::PrevSlide) + ), + "Previous Slide", + TPosition::FollowCursor + )) .center_y(Length::Fill) .align_right(Length::FillPortion(1)), Container::new(slide_preview) .center_y(Length::Fill) .width(Length::FillPortion(3)), - Container::new( - button::icon(icon_right) - .icon_size(128) - .tooltip("Next Slide") - .width(128) - .on_press(Message::Present( - presenter::Message::NextSlide - )) - .class(theme::style::Button::Transparent) - ) + Container::new(tooltip( + button(icon_right.size(128)).width(128).on_press( + Message::Present(presenter::Message::NextSlide) + ), + "Next Slide", + TPosition::FollowCursor + )) .center_y(Length::Fill) .align_left(Length::FillPortion(1)), library @@ -1077,49 +1008,38 @@ impl App { } // View for presentation - fn view_window(&self, _id: window::Id) -> Element { + fn view_presenter(&self) -> Element { self.presenter.view().map(Message::Present) } -} -impl App -where - Self: iced::Application, -{ - fn active_page_title(&self) -> &str { - let Some(label) = - self.nav_model.text(self.nav_model.active()) - else { - return "Lumina"; - }; - label - } - - fn update_title(&mut self) -> Task { - let header_title = self.active_page_title().to_owned(); - let window_title = format!("{header_title} — Lumina"); - self.core.main_window_id().map_or_else(Task::none, |id| { - self.set_window_title(window_title, id) - }) - } + // fn update_title(&mut self) -> Task { + // let window_title = "Lumina"; + // self.windows.first_key_value().unwrap().1.title = + // window_title.to_string(); + // Task::none() + // } fn show_window(&mut self) -> Task { let (id, spawn_window) = window::open(window::Settings { position: Position::Centered, exit_on_close_request: true, decorations: false, + fullscreen: true, ..Default::default() }); - self.windows.push(id); - _ = self.set_window_title("Lumina Presenter".to_owned(), id); - spawn_window.map(|id| { - iced::Action::App(Message::WindowOpened(id, None)) - }) + let window = Window { + title: "Presentation".into(), + scale_input: "".into(), + current_scale: 1.0, + theme: self.theme(id), + }; + self.windows.insert(id, window); + spawn_window.map(|id| Message::WindowOpened(id, None)) } fn add_library(&mut self) -> Task { Task::perform(async move { Library::new().await }, |x| { - iced::Action::App(Message::AddLibrary(x)) + Message::AddLibrary(x) }) } @@ -1191,7 +1111,7 @@ where } } - fn theme() -> Theme { + fn theme(&self, _window: window::Id) -> Theme { Theme::custom( "Snazzy", Palette { diff --git a/src/ui/library.rs b/src/ui/library.rs index 2d172bf..12e092b 100644 --- a/src/ui/library.rs +++ b/src/ui/library.rs @@ -4,24 +4,27 @@ use iced::{ futures::FutureExt, theme, widget::{ - button, container, horizontal_space, mouse_area, responsive, - row, scrollable, text, text_input, Container, Space, + button, column, container, horizontal_space, mouse_area, + responsive, row, scrollable, text, text_input, Container, + Space, }, - widget::{column, row as rowm, text as textm}, Background, Border, Color, Element, Length, Task, }; use miette::{IntoDiagnostic, Result}; use sqlx::{pool::PoolConnection, Sqlite, SqlitePool}; use tracing::{debug, error, warn}; -use crate::core::{ - content::Content, - images::{update_image_in_db, Image}, - model::{LibraryKind, Model}, - presentations::{update_presentation_in_db, Presentation}, - service_items::ServiceItem, - songs::{update_song_in_db, Song}, - videos::{update_video_in_db, Video}, +use crate::{ + core::{ + content::Content, + images::{update_image_in_db, Image}, + model::{LibraryKind, Model}, + presentations::{update_presentation_in_db, Presentation}, + service_items::ServiceItem, + songs::{update_song_in_db, Song}, + videos::{update_video_in_db, Video}, + }, + ui::widgets::icon, }; #[derive(Debug, Clone)] @@ -276,40 +279,40 @@ impl<'a> Library { where T: Content, { - let mut row = row::().spacing(5); + let mut row = row![].spacing(5); match &model.kind { LibraryKind::Song => { row = row .push(icon::from_name("folder-music-symbolic")); - row = row - .push(textm!("Songs").align_y(Vertical::Center)); + row = + row.push(text("Songs").align_y(Vertical::Center)); } LibraryKind::Video => { row = row .push(icon::from_name("folder-videos-symbolic")); row = row - .push(textm!("Videos").align_y(Vertical::Center)); + .push(text("Videos").align_y(Vertical::Center)); } LibraryKind::Image => { row = row.push(icon::from_name( "folder-pictures-symbolic", )); row = row - .push(textm!("Images").align_y(Vertical::Center)); + .push(text("Images").align_y(Vertical::Center)); } LibraryKind::Presentation => { row = row.push(icon::from_name( "x-office-presentation-symbolic", )); row = row.push( - textm!("Presentations").align_y(Vertical::Center), + text("Presentations").align_y(Vertical::Center), ); } }; let item_count = model.items.len(); row = row.push(horizontal_space()); row = row - .push(textm!("{}", item_count).align_y(Vertical::Center)); + .push(text!("{}", item_count).align_y(Vertical::Center)); row = row.push( icon::from_name({ if self.library_open == Some(model.kind) { @@ -329,21 +332,26 @@ impl<'a> Library { match self.library_hovered { Some(lib) => Background::Color( if lib == model.kind { - t.iced().button.hover.into() + t.extended_palette() + .primary + .strong + .color } else { - t.iced().button.base.into() + t.extended_palette() + .background + .base + .color }, ), None => Background::Color( - t.iced().button.base.into(), + t.extended_palette() + .background + .base + .color, ), } }) - .border( - Border::default().rounded( - t.iced().corner_radii.radius_s, - ), - ) + .border(Border::default().rounded(5)) }) .center_x(Length::Fill) .center_y(Length::Shrink); @@ -366,65 +374,34 @@ impl<'a> Library { let visual_item = self .single_item(index, item, model) .map(|_| Message::None); - DndSource::::new( - mouse_area(visual_item) - .on_drag(Message::DragItem(service_item.clone())) - .on_enter(Message::HoverItem( - Some(( - model.kind, - index as i32, - )), - )) - .on_double_click( - Message::OpenItem(Some(( - model.kind, - index as i32, - ))), - ) - .on_exit(Message::HoverItem(None)) - .on_press(Message::SelectItem( - Some(( - model.kind, - index as i32, - )), - )), - ) - .action(DndAction::Copy) - .drag_icon({ - let model = model.kind; - move |i| { - let state = State::None; - let icon = match model { - LibraryKind::Song => icon::from_name( - "folder-music-symbolic", - ).symbolic(true) - , - LibraryKind::Video => icon::from_name("folder-videos-symbolic"), - LibraryKind::Image => icon::from_name("folder-pictures-symbolic"), - LibraryKind::Presentation => icon::from_name("x-office-presentation-symbolic"), - }; - ( - icon.into(), - state, - i, - ) - }}) - .drag_content(move || { - service_item.to_owned() - }) - .into() + mouse_area(visual_item) + // .on_drag(Message::DragItem( + // service_item.clone(), + // )) + .on_enter(Message::HoverItem(Some(( + model.kind, + index as i32, + )))) + .on_double_click(Message::OpenItem( + Some((model.kind, index as i32)), + )) + .on_exit(Message::HoverItem(None)) + .on_press(Message::SelectItem(Some( + (model.kind, index as i32), + ))) + .into() }, ) }) - .spacing(2) - .width(Length::Fill), + .spacing(2) + .width(Length::Fill), ) - .spacing(5) - .height(Length::Fill); + .spacing(5) + .height(Length::Fill); - let library_toolbar = rowm!( + let library_toolbar = row!( text_input("Search...", ""), - button::icon(icon::from_name("add")) + button(icon::from_name("add")) ); let library_column = column![library_toolbar, items].spacing(3); @@ -445,33 +422,36 @@ impl<'a> Library { where T: Content, { - let text = Container::new(responsive(|size| { - text::heading(elide_text(item.title(), size.width)) + let item_text = Container::new(responsive(|size| { + text(elide_text(item.title(), size.width)) .center() - .wrapping(textm::Wrapping::None) + .wrapping(text::Wrapping::None) .into() })) .center_y(20) .center_x(Length::Fill); let subtext = container(responsive(|size| { - let color: Color = if item.background().is_some() { - theme::active().iced().accent_text_color().into() + if item.background().is_some() { + text(elide_text(item.subtext(), size.width)) + .style(text::primary) + .center() + .wrapping(text::Wrapping::None) + .into() } else { - theme::active().iced().destructive_text_color().into() - }; - text::body(elide_text(item.subtext(), size.width)) - .center() - .wrapping(textm::Wrapping::None) - .class(color) - .into() + text(elide_text(item.subtext(), size.width)) + .style(text::primary) + .center() + .wrapping(text::Wrapping::None) + .into() + } })) .center_y(20) .center_x(Length::Fill); - let texts = column([text.into(), subtext.into()]); + let texts = column([item_text.into(), subtext.into()]); Container::new( - rowm![horizontal_space().width(0), texts] + row![horizontal_space().width(0), texts] .spacing(10) .align_y(Vertical::Center), ) @@ -486,9 +466,9 @@ impl<'a> Library { if model.kind == library && selected == index as i32 { - t.iced().accent.selected.into() + t.extended_palette().primary.strong.color } else { - t.iced().button.base.into() + t.extended_palette().primary.base.color } } else if let Some((library, hovered)) = self.hovered_item @@ -496,18 +476,15 @@ impl<'a> Library { if model.kind == library && hovered == index as i32 { - t.iced().button.hover.into() + t.extended_palette().primary.strong.color } else { - t.iced().button.base.into() + t.extended_palette().primary.base.color } } else { - t.iced().button.base.into() + t.extended_palette().background.strong.color }, )) - .border( - Border::default() - .rounded(t.iced().corner_radii.radius_m), - ) + .border(Border::default().rounded(10)) }) .into() } diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index c0c8809..5f0333d 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -6,18 +6,15 @@ use iced::{ border, font::{Family, Stretch, Style, Weight}, widget::{ - container, image, mouse_area, responsive, scrollable, text, - Column, Container, Row, Space, - }, - widget::{ - rich_text, + container, image, mouse_area, responsive, rich_text, scrollable::{ - scroll_to, AbsoluteOffset, Direction, Scrollbar, + self, scroll_to, AbsoluteOffset, Direction, Id, Scrollbar, }, - span, stack, vertical_rule, + span, stack, text, vertical_rule, Column, Container, Row, + Space, }, - Background, Border, Color, ContentFit, Font, Length, Shadow, - Task, Vector, + Background, Border, Color, ContentFit, Element, Font, Length, + Shadow, Task, Vector, }; use iced_video_player::{Position, Video, VideoPlayer}; use rodio::{Decoder, OutputStream, Sink}; @@ -164,7 +161,7 @@ impl Presenter { ) }, scroll_id: Id::unique(), - current_font: iced::font::default(), + current_font: iced::font::Font::DEFAULT, } } @@ -340,27 +337,27 @@ impl Presenter { return Action::Task(Task::perform( async move { tokio::task::spawn_blocking(move || { - match gst_pbutils::MissingPluginMessage::parse(&element) { - Ok(missing_plugin) => { - let mut install_ctx = gst_pbutils::InstallPluginsContext::new(); - install_ctx - .set_desktop_id(&format!("{}.desktop", "org.chriscochrun.lumina")); - let install_detail = missing_plugin.installer_detail(); - println!("installing plugins: {}", install_detail); - let status = gst_pbutils::missing_plugins::install_plugins_sync( - &[&install_detail], - Some(&install_ctx), - ); - info!("plugin install status: {}", status); - info!( - "gstreamer registry update: {:?}", - gstreamer::Registry::update() - ); - } - Err(err) => { - warn!("failed to parse missing plugin message: {err}"); - } - } + // match gst_pbutils::MissingPluginMessage::parse(&element) { + // Ok(missing_plugin) => { + // let mut install_ctx = gst_pbutils::InstallPluginsContext::new(); + // install_ctx + // .set_desktop_id(&format!("{}.desktop", "org.chriscochrun.lumina")); + // let install_detail = missing_plugin.installer_detail(); + // println!("installing plugins: {}", install_detail); + // let status = gst_pbutils::missing_plugins::install_plugins_sync( + // &[&install_detail], + // Some(&install_ctx), + // ); + // info!("plugin install status: {}", status); + // info!( + // "gstreamer registry update: {:?}", + // gstreamer::Registry::update() + // ); + // } + // Err(err) => { + // warn!("failed to parse missing plugin message: {err}"); + // } + // } Message::None }) .await @@ -445,7 +442,7 @@ impl Presenter { .style(move |t| { let mut style = container::Style::default(); - let theme = t.iced(); + let theme = t; let hovered = self.hovered_slide == Some(( item_index, @@ -455,19 +452,25 @@ impl Presenter { Some(Background::Color( if is_current_slide { theme - .accent - .base - .into() + .extended_palette( + ) + .secondary + .strong + .color } else if hovered { theme - .accent - .hover - .into() + .extended_palette( + ) + .secondary + .strong + .color } else { theme - .palette - .neutral_3 - .into() + .extended_palette( + ) + .background + .neutral + .color }, )); style.border = Border::default() @@ -500,7 +503,7 @@ impl Presenter { .padding(10), ) .interaction( - iced::iced::mouse::Interaction::Pointer, + iced::mouse::Interaction::Pointer, ) .on_move(move |_| { Message::HoveredSlide(Some(( @@ -518,11 +521,11 @@ impl Presenter { let row = Row::from_vec(slides) .spacing(10) .padding([20, 15]); - let label = text::body(item.title.clone()); + let label = text(item.title.clone()); let label_container = container(label) .align_top(Length::Fill) .align_left(Length::Fill) - .padding([0, 0, 0, 35]); + .padding([0, 35]); let divider = vertical_rule(2); items.push( container(stack!(row, label_container)) @@ -532,15 +535,16 @@ impl Presenter { items.push(divider.into()); }, ); - let row = - scrollable(container(Row::from_vec(items)).style(|t| { + let row = scrollable::Scrollable::new( + container(Row::from_vec(items)).style(|t| { let style = container::Style::default(); style.border(Border::default().width(2)) - })) - .direction(Direction::Horizontal(Scrollbar::new())) - .height(Length::Fill) - .width(Length::Fill) - .id(self.scroll_id.clone()); + }), + ) + .direction(Direction::Horizontal(Scrollbar::new())) + .height(Length::Fill) + .width(Length::Fill) + .id(self.scroll_id.clone()); row.into() } @@ -819,15 +823,15 @@ pub(crate) fn slide_view( } else if let Some(video) = &video { Container::new( VideoPlayer::new(video) - .mouse_hidden(hide_mouse) + // .mouse_hidden(hide_mouse) .width(width) .height(size.height) .on_end_of_stream(Message::EndVideo) .on_new_frame(Message::VideoFrame) - .on_missing_plugin(Message::MissingPlugin) - .on_warning(|w| { - Message::Error(w.to_string()) - }) + // .on_missing_plugin(Message::MissingPlugin) + // .on_warning(|w| { + // Message::Error(w.to_string()) + // }) .on_error(|e| { Message::Error(e.to_string()) }) diff --git a/src/ui/slide_editor.rs b/src/ui/slide_editor.rs index 36dcddf..94fc282 100644 --- a/src/ui/slide_editor.rs +++ b/src/ui/slide_editor.rs @@ -49,7 +49,7 @@ pub enum SlideError { #[derive(Debug, Default)] struct EditorProgram { - mouse_button_pressed: Option, + mouse_button_pressed: Option, } impl SlideEditor { @@ -78,8 +78,8 @@ impl<'a> Program state: &Self::State, renderer: &Renderer, theme: &iced::Theme, - bounds: iced::iced::Rectangle, - cursor: iced::iced_core::mouse::Cursor, + bounds: iced::Rectangle, + cursor: iced::mouse::Cursor, ) -> Vec> { // We prepare a new `Frame` let mut frame = canvas::Frame::new(renderer, bounds.size()); @@ -88,7 +88,7 @@ impl<'a> Program // We create a `Path` representing a simple circle let circle = canvas::Path::circle(frame.center(), 50.0); let border = canvas::Path::rectangle( - iced::iced::Point { x: 10.0, y: 10.0 }, + iced::Point { x: 10.0, y: 10.0 }, Size::new(frame_rect.width, frame_rect.height), ); @@ -114,21 +114,19 @@ impl<'a> Program fn update( &self, _state: &mut Self::State, - event: canvas::Event, - bounds: iced::iced::Rectangle, - _cursor: iced::iced_core::mouse::Cursor, - ) -> (canvas::event::Status, Option) { + event: &iced::Event, + bounds: iced::Rectangle, + _cursor: iced::mouse::Cursor, + ) -> std::option::Option> { match event { - canvas::Event::Mouse(event) => match event { - iced::iced::mouse::Event::CursorEntered => { + iced::Event::Mouse(event) => match event { + iced::mouse::Event::CursorEntered => { debug!("cursor entered") } - iced::iced::mouse::Event::CursorLeft => { + iced::mouse::Event::CursorLeft => { debug!("cursor left") } - iced::iced::mouse::Event::CursorMoved { - position, - } => { + iced::mouse::Event::CursorMoved { position } => { if bounds.x < position.x && bounds.y < position.y && (bounds.width + bounds.x) > position.x @@ -137,29 +135,34 @@ impl<'a> Program debug!(?position, "cursor moved"); } } - iced::iced::mouse::Event::ButtonPressed(button) => { + iced::mouse::Event::ButtonPressed(button) => { // self.mouse_button_pressed = Some(button); debug!(?button, "mouse button pressed") } - iced::iced::mouse::Event::ButtonReleased(button) => { + iced::mouse::Event::ButtonReleased(button) => { debug!(?button, "mouse button released") } - iced::iced::mouse::Event::WheelScrolled { delta } => { + iced::mouse::Event::WheelScrolled { delta } => { debug!(?delta, "scroll wheel") } }, - canvas::Event::Touch(event) => debug!("test"), - canvas::Event::Keyboard(event) => debug!("test"), + iced::Event::Touch(event) => debug!("test"), + iced::Event::Keyboard(event) => debug!("test"), + iced::Event::Keyboard(event) => todo!(), + iced::Event::Mouse(event) => todo!(), + iced::Event::Window(event) => todo!(), + iced::Event::Touch(event) => todo!(), + iced::Event::InputMethod(event) => todo!(), } - (canvas::event::Status::Ignored, None) + None } fn mouse_interaction( &self, _state: &Self::State, - _bounds: iced::iced::Rectangle, - _cursor: iced::iced_core::mouse::Cursor, - ) -> iced::iced_core::mouse::Interaction { - iced::iced_core::mouse::Interaction::default() + _bounds: iced::Rectangle, + _cursor: iced::mouse::Cursor, + ) -> iced::mouse::Interaction { + iced::mouse::Interaction::default() } } diff --git a/src/ui/song_editor.rs b/src/ui/song_editor.rs index d9e64b5..21e0cdb 100644 --- a/src/ui/song_editor.rs +++ b/src/ui/song_editor.rs @@ -5,19 +5,22 @@ use iced::{ advanced::graphics::text::cosmic_text::fontdb, font::{Family, Stretch, Style, Weight}, theme, - widget::row, widget::{ - button, column, combo_box, container, horizontal_space, - scrollable, text, text_editor, text_input, + button, column, combo_box, container, horizontal_space, row, + scrollable, text, text_editor, text_input, tooltip, }, Element, Font, Length, Task, }; use iced_video_player::Video; +use rfd::AsyncFileDialog; use tracing::{debug, error}; use crate::{ core::{service_items::ServiceTrait, songs::Song}, - ui::slide_editor::{self, SlideEditor}, + ui::{ + slide_editor::{self, SlideEditor}, + widgets::icon, + }, Background, BackgroundKind, }; @@ -129,7 +132,7 @@ impl SongEditor { audio: PathBuf::new(), background: None, video: None, - current_font: iced::font::default(), + current_font: iced::font::Font::DEFAULT, ccli: "8".to_owned(), slide_state: SlideEditor::default(), } @@ -269,7 +272,7 @@ impl SongEditor { let slide_preview = container(self.slide_preview()) .width(Length::FillPortion(2)); - let column = column::with_children(vec![ + let column = column![ self.toolbar(), row![ container(self.left_column()) @@ -278,8 +281,8 @@ impl SongEditor { .center_x(Length::FillPortion(3)) ] .into(), - ]) - .spacing(theme::active().iced().space_l()); + ] + .spacing(15); column.into() } @@ -332,37 +335,34 @@ impl SongEditor { fn left_column(&self) -> Element { let title_input = text_input("song", &self.title) - .on_input(Message::ChangeTitle) - .label("Song Title"); + .on_input(Message::ChangeTitle); let author_input = text_input("author", &self.author) - .on_input(Message::ChangeAuthor) - .label("Song Author"); + .on_input(Message::ChangeAuthor); let verse_input = text_input( "Verse order", &self.verse_order, ) - .label("Verse Order") .on_input(Message::ChangeVerseOrder); let lyric_title = text("Lyrics"); - let lyric_input = column::with_children(vec![ + let lyric_input = column![ lyric_title.into(), text_editor(&self.lyrics) .on_action(Message::ChangeLyrics) .height(Length::Fill) .into(), - ]) + ] .spacing(5); - column::with_children(vec![ + column![ title_input.into(), author_input.into(), verse_input.into(), lyric_input.into(), - ]) + ] .spacing(25) .width(Length::FillPortion(2)) .into() @@ -397,16 +397,20 @@ order", ) }, ) - .width(theme::active().iced().space_xxl()); + .width(200); - let background_selector = button::icon( + let background_selector = button(row!( icon::from_name("folder-pictures-symbolic").scale(2), - ) - .label("Background") - .tooltip("Select an image or video background") + "Background" + )) .on_press(Message::PickBackground) .padding(10); + let background_selector = tooltip( + background_selector, + "Select an image or video background", + tooltip::Position::FollowCursor, + ); row![ font_selector, font_size, @@ -448,18 +452,19 @@ impl Default for SongEditor { } async fn pick_background() -> Result { - let dialog = Dialog::new().title("Choose a background..."); - dialog - .open_file() - .await - .map_err(|_| SongError::DialogClosed) - .map(|file| file.url().to_file_path().unwrap()) - // rfd::AsyncFileDialog::new() - // .set_title("Choose a background...") + // let dialog = + // AsyncFileDialog::new().set_title("Choose a background..."); + // dialog // .pick_file() // .await - // .ok_or(SongError::DialogClosed) - // .map(|file| file.path().to_owned()) + // .map_err(|_| SongError::DialogClosed) + // .map(|file| file.url().to_file_path().unwrap()) + rfd::AsyncFileDialog::new() + .set_title("Choose a background...") + .pick_file() + .await + .ok_or(SongError::DialogClosed) + .map(|file| file.path().to_owned()) } #[derive(Debug, Clone)] diff --git a/src/ui/text_svg.rs b/src/ui/text_svg.rs index 728478e..d420123 100644 --- a/src/ui/text_svg.rs +++ b/src/ui/text_svg.rs @@ -7,7 +7,7 @@ use colors_transform::Rgb; use iced::{ font::{Style, Weight}, widget::{container, svg::Handle, Svg}, - Length, Size, + Element, Length, Size, }; use tracing::error; @@ -47,9 +47,7 @@ impl From for Font { fn from(value: iced::font::Font) -> Self { Self { name: match value.family { - iced::iced::font::Family::Name(name) => { - name.to_string() - } + iced::font::Family::Name(name) => name.to_string(), _ => "Quicksand Bold".into(), }, size: 20, diff --git a/src/ui/widgets/icon/handle.rs b/src/ui/widgets/icon/handle.rs new file mode 100644 index 0000000..efceb0a --- /dev/null +++ b/src/ui/widgets/icon/handle.rs @@ -0,0 +1,115 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: MPL-2.0 + +use super::{Icon, Named}; +use iced::widget::{image, svg}; +use std::borrow::Cow; +use std::ffi::OsStr; +use std::hash::Hash; +use std::path::PathBuf; + +#[must_use] +#[derive(Clone, Debug, derive_setters::Setters)] +pub struct Handle { + pub symbolic: bool, + #[setters(skip)] + pub data: Data, +} + +impl Handle { + #[inline] + pub fn icon(self) -> Icon { + super::icon(self) + } +} + +#[must_use] +#[derive(Clone, Debug)] +pub enum Data { + Name(Named), + Image(image::Handle), + Svg(svg::Handle), +} + +/// Create an icon handle from its path. +pub fn from_path(path: PathBuf) -> Handle { + Handle { + symbolic: path + .file_stem() + .and_then(OsStr::to_str) + .is_some_and(|name| name.ends_with("-symbolic")), + data: if path + .extension() + .is_some_and(|ext| ext == OsStr::new("svg")) + { + Data::Svg(svg::Handle::from_path(path)) + } else { + Data::Image(image::Handle::from_path(path)) + }, + } +} + +/// Create an image handle from memory. +pub fn from_raster_bytes( + bytes: impl Into> + + std::convert::AsRef<[u8]> + + std::marker::Send + + std::marker::Sync + + 'static, +) -> Handle { + fn inner(bytes: Cow<'static, [u8]>) -> Handle { + Handle { + symbolic: false, + data: match bytes { + Cow::Owned(b) => { + Data::Image(image::Handle::from_bytes(b)) + } + Cow::Borrowed(b) => { + Data::Image(image::Handle::from_bytes(b)) + } + }, + } + } + + inner(bytes.into()) +} + +/// Create an image handle from RGBA data, where you must define the width and height. +pub fn from_raster_pixels( + width: u32, + height: u32, + pixels: impl Into> + + std::convert::AsRef<[u8]> + + std::marker::Send + + std::marker::Sync, +) -> Handle { + fn inner( + width: u32, + height: u32, + pixels: Cow<'static, [u8]>, + ) -> Handle { + Handle { + symbolic: false, + data: match pixels { + Cow::Owned(pixels) => Data::Image( + image::Handle::from_rgba(width, height, pixels), + ), + Cow::Borrowed(pixels) => Data::Image( + image::Handle::from_rgba(width, height, pixels), + ), + }, + } + } + + inner(width, height, pixels.into()) +} + +/// Create a SVG handle from memory. +pub fn from_svg_bytes( + bytes: impl Into>, +) -> Handle { + Handle { + symbolic: false, + data: Data::Svg(svg::Handle::from_memory(bytes)), + } +} diff --git a/src/ui/widgets/icon/mod.rs b/src/ui/widgets/icon/mod.rs new file mode 100644 index 0000000..ac6fba3 --- /dev/null +++ b/src/ui/widgets/icon/mod.rs @@ -0,0 +1,187 @@ +// Copyright 2022 System76 +// SPDX-License-Identifier: MPL-2.0 + +//! Lazily-generated SVG icon widget for Iced. + +mod named; +use std::ffi::OsStr; +use std::sync::Arc; + +pub use named::{IconFallback, Named}; + +mod handle; +pub use handle::{ + from_path, from_raster_bytes, from_raster_pixels, from_svg_bytes, + Data, Handle, +}; + +use derive_setters::Setters; +use iced::advanced::{image, svg}; +use iced::widget::{Image, Svg}; +use iced::Element; +use iced::Rotation; +use iced::{ContentFit, Length, Rectangle}; + +/// Create an [`Icon`] from a pre-existing [`Handle`] +pub fn icon(handle: Handle) -> Icon { + Icon { + content_fit: ContentFit::Fill, + handle, + height: None, + size: 16, + rotation: None, + width: None, + } +} + +/// Create an icon handle from its XDG icon name. +pub fn from_name(name: impl Into>) -> Named { + Named::new(name) +} + +/// An image which may be an SVG or PNG. +#[must_use] +#[derive(Clone, Setters)] +pub struct Icon { + #[setters(skip)] + handle: Handle, + pub(super) size: u16, + content_fit: ContentFit, + #[setters(strip_option)] + width: Option, + #[setters(strip_option)] + height: Option, + #[setters(strip_option)] + rotation: Option, +} + +impl Icon { + #[must_use] + pub fn into_svg_handle( + self, + ) -> Option { + match self.handle.data { + Data::Name(named) => { + if let Some(path) = named.path() { + if path + .extension() + .is_some_and(|ext| ext == OsStr::new("svg")) + { + return Some( + iced::advanced::svg::Handle::from_path( + path, + ), + ); + } + } + } + + Data::Image(_) => (), + Data::Svg(handle) => return Some(handle), + } + + None + } + + #[must_use] + fn view<'a, Message: 'a>(self) -> Element<'a, Message> { + let from_image = |handle| { + Image::new(handle) + .width(self.width.unwrap_or_else(|| { + Length::Fixed(f32::from(self.size)) + })) + .height(self.height.unwrap_or_else(|| { + Length::Fixed(f32::from(self.size)) + })) + .rotation(self.rotation.unwrap_or_default()) + .content_fit(self.content_fit) + .into() + }; + + let from_svg = |handle| { + Svg::::new(handle) + .width(self.width.unwrap_or_else(|| { + Length::Fixed(f32::from(self.size)) + })) + .height(self.height.unwrap_or_else(|| { + Length::Fixed(f32::from(self.size)) + })) + .rotation(self.rotation.unwrap_or_default()) + .content_fit(self.content_fit) + .into() + }; + + match self.handle.data { + Data::Name(named) => { + if let Some(path) = named.path() { + if path + .extension() + .is_some_and(|ext| ext == OsStr::new("svg")) + { + from_svg(svg::Handle::from_path(path)) + } else { + from_image(image::Handle::from_path(path)) + } + } else { + let bytes: &'static [u8] = &[]; + from_svg(svg::Handle::from_memory(bytes)) + } + } + + Data::Image(handle) => from_image(handle), + Data::Svg(handle) => from_svg(handle), + } + } +} + +impl<'a, Message: 'a> From for Element<'a, Message> { + fn from(icon: Icon) -> Self { + icon.view::() + } +} + +/// Draw an icon in the given bounds via the runtime's renderer. +pub fn draw( + renderer: &mut iced::Renderer, + handle: &Handle, + icon_bounds: Rectangle, +) { + enum IcedHandle { + Svg(svg::Handle), + Image(image::Handle), + } + + let iced_handle = match handle.clone().data { + Data::Name(named) => named.path().map(|path| { + if path + .extension() + .is_some_and(|ext| ext == OsStr::new("svg")) + { + IcedHandle::Svg(svg::Handle::from_path(path)) + } else { + IcedHandle::Image(image::Handle::from_path(path)) + } + }), + + Data::Image(handle) => Some(IcedHandle::Image(handle)), + Data::Svg(handle) => Some(IcedHandle::Svg(handle)), + }; + + match iced_handle { + Some(IcedHandle::Svg(handle)) => svg::Renderer::draw_svg( + renderer, + svg::Svg::new(handle), + icon_bounds, + ), + + Some(IcedHandle::Image(handle)) => { + image::Renderer::draw_image( + renderer, + (&handle).into(), + icon_bounds, + ); + } + + None => {} + } +} diff --git a/src/ui/widgets/icon/named.rs b/src/ui/widgets/icon/named.rs new file mode 100644 index 0000000..54ee390 --- /dev/null +++ b/src/ui/widgets/icon/named.rs @@ -0,0 +1,165 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: MPL-2.0 + +use super::{Handle, Icon}; +use std::{borrow::Cow, path::PathBuf, sync::Arc}; + +#[derive(Debug, Clone, Default, Hash)] +/// Fallback icon to use if the icon was not found. +pub enum IconFallback { + #[default] + /// Default fallback using the icon name. + Default, + /// Fallback to specific icon names. + Names(Vec>), +} + +#[must_use] +#[derive(derive_setters::Setters, Clone, Debug, Hash)] +pub struct Named { + /// Name of icon to locate in an XDG icon path. + pub(super) name: Arc, + + /// Checks for a fallback if the icon was not found. + pub fallback: Option, + + /// Restrict the lookup to a given scale. + #[setters(strip_option)] + pub scale: Option, + + /// Restrict the lookup to a given size. + #[setters(strip_option)] + pub size: Option, + + /// Whether the icon is symbolic or not. + pub symbolic: bool, + + /// Prioritizes SVG over PNG + pub prefer_svg: bool, +} + +impl Named { + pub fn new(name: impl Into>) -> Self { + let name = name.into(); + Self { + symbolic: name.ends_with("-symbolic"), + name, + fallback: Some(IconFallback::Default), + size: None, + scale: None, + prefer_svg: false, + } + } + + #[cfg(not(windows))] + #[must_use] + pub fn path(self) -> Option { + let name = &*self.name; + let fallback = &self.fallback; + let locate = |theme: &str, name| { + let mut lookup = freedesktop_icons::lookup(name) + .with_theme(theme.as_ref()) + .with_cache(); + + if let Some(scale) = self.scale { + lookup = lookup.with_scale(scale); + } + + if let Some(size) = self.size { + lookup = lookup.with_size(size); + } + + if self.prefer_svg { + lookup = lookup.force_svg(); + } + lookup.find() + }; + + let theme = "Papirus-Dark"; + let themes = if theme.as_ref() == "Cosmic" { + vec![theme.as_ref()] + } else { + vec![theme.as_ref(), "Cosmic"] + }; + + let mut result = themes.iter().find_map(|t| locate(t, name)); + + // On failure, attempt to locate fallback icon. + if result.is_none() { + if matches!(fallback, Some(IconFallback::Default)) { + for new_name in name + .rmatch_indices('-') + .map(|(pos, _)| &name[..pos]) + { + result = themes + .iter() + .find_map(|t| locate(t, new_name)); + if result.is_some() { + break; + } + } + } else if let Some(IconFallback::Names(fallbacks)) = + fallback + { + for fallback in fallbacks { + result = themes + .iter() + .find_map(|t| locate(t, fallback)); + if result.is_some() { + break; + } + } + } + } + + result + } + + #[cfg(windows)] + #[must_use] + pub fn path(self) -> Option { + //TODO: implement icon lookup for Windows + None + } + + #[inline] + pub fn handle(self) -> Handle { + Handle { + symbolic: self.symbolic, + data: super::Data::Name(self), + } + } + + #[inline] + pub fn icon(self) -> Icon { + let size = self.size; + + let icon = super::icon(self.handle()); + + match size { + Some(size) => icon.size(size), + None => icon, + } + } +} + +impl From for Handle { + #[inline] + fn from(builder: Named) -> Self { + builder.handle() + } +} + +impl From for Icon { + #[inline] + fn from(builder: Named) -> Self { + builder.icon() + } +} + +impl From for crate::Element<'_, Message> { + #[inline] + fn from(builder: Named) -> Self { + builder.icon().into() + } +} diff --git a/src/ui/widgets/mod.rs b/src/ui/widgets/mod.rs index d786591..f88ea38 100644 --- a/src/ui/widgets/mod.rs +++ b/src/ui/widgets/mod.rs @@ -1 +1,2 @@ // pub mod slide_text; +pub mod icon; From 80a9b48ae9576da9f2d16bca40f658de43c35468 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 27 Aug 2025 09:02:46 -0500 Subject: [PATCH 04/15] my fork of iced_video_player --- Cargo.lock | 1234 ++++------------------------------------- Cargo.toml | 2 +- src/ui/presenter.rs | 8 +- src/ui/song_editor.rs | 97 ++-- 4 files changed, 151 insertions(+), 1190 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91bd7bb..4e60530 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,17 +33,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom 0.2.16", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.12" @@ -207,15 +196,6 @@ version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - [[package]] name = "arbitrary" version = "1.4.2" @@ -251,22 +231,13 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" -[[package]] -name = "ash" -version = "0.37.3+1.3.251" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" -dependencies = [ - "libloading 0.7.4", -] - [[package]] name = "ash" version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "libloading 0.8.8", + "libloading", ] [[package]] @@ -718,30 +689,15 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec 0.6.3", -] - [[package]] name = "bit-set" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec 0.8.0", + "bit-vec", ] -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bit-vec" version = "0.8.0" @@ -824,12 +780,6 @@ version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" -[[package]] -name = "by_address" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" - [[package]] name = "bytemuck" version = "1.23.2" @@ -989,7 +939,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading 0.8.8", + "libloading", ] [[package]] @@ -1078,16 +1028,6 @@ dependencies = [ "x11rb", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width 0.1.14", -] - [[package]] name = "codespan-reporting" version = "0.12.0" @@ -1117,37 +1057,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9226dbc05df4fb986f48d730b001532580883c4c06c5d1c213f4b34c1c157178" -[[package]] -name = "com" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" -dependencies = [ - "com_macros", -] - -[[package]] -name = "com_macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" -dependencies = [ - "com_macros_support", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "com_macros_support" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "combine" version = "4.6.7" @@ -1267,29 +1176,6 @@ dependencies = [ "bindgen", ] -[[package]] -name = "cosmic-text" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2" -dependencies = [ - "bitflags 2.9.2", - "fontdb 0.16.2", - "log", - "rangemap", - "rayon", - "rustc-hash 1.1.0", - "rustybuzz", - "self_cell", - "swash 0.1.19", - "sys-locale", - "ttf-parser 0.21.1", - "unicode-bidi", - "unicode-linebreak", - "unicode-script", - "unicode-segmentation", -] - [[package]] name = "cosmic-text" version = "0.14.2" @@ -1304,7 +1190,7 @@ dependencies = [ "rustybuzz", "self_cell", "smol_str", - "swash 0.2.5", + "swash", "sys-locale", "ttf-parser 0.21.1", "unicode-bidi", @@ -1426,11 +1312,11 @@ name = "cryoglyph" version = "0.1.0" source = "git+https://github.com/iced-rs/cryoglyph.git?rev=453cedec0d2ec563bd7fa87e84a2319bcebb1ba3#453cedec0d2ec563bd7fa87e84a2319bcebb1ba3" dependencies = [ - "cosmic-text 0.14.2", + "cosmic-text", "etagere", - "lru 0.16.0", + "lru", "rustc-hash 2.1.1", - "wgpu 26.0.1", + "wgpu", ] [[package]] @@ -1455,33 +1341,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" -[[package]] -name = "d3d12" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307" -dependencies = [ - "bitflags 2.9.2", - "libloading 0.8.8", - "winapi", -] - -[[package]] -name = "dark-light" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a76fa97167fa740dcdbfe18e8895601e1bc36525f09b044e00916e717c03a3c" -dependencies = [ - "dconf_rs", - "detect-desktop-environment", - "dirs 4.0.0", - "objc", - "rust-ini", - "web-sys", - "winreg 0.10.1", - "zbus 4.4.0", -] - [[package]] name = "dark-light" version = "2.0.0" @@ -1493,7 +1352,7 @@ dependencies = [ "objc2", "objc2-foundation", "web-sys", - "winreg 0.52.0", + "winreg", ] [[package]] @@ -1543,12 +1402,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" -[[package]] -name = "dconf_rs" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7046468a81e6a002061c01e6a7c83139daf91b11c30e66795b13217c2d885c8b" - [[package]] name = "der" version = "0.7.10" @@ -1592,12 +1445,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "detect-desktop-environment" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d8ad60dd5b13a4ee6bd8fa2d5d88965c597c67bce32b5fc49c94f55cb50810" - [[package]] name = "diff" version = "0.1.13" @@ -1616,33 +1463,13 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys 0.3.7", -] - [[package]] name = "dirs" version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys 0.4.1", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", + "dirs-sys", ] [[package]] @@ -1680,15 +1507,9 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.8", + "libloading", ] -[[package]] -name = "dlv-list" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" - [[package]] name = "document-features" version = "0.2.11" @@ -1715,12 +1536,6 @@ name = "dpi" version = "0.1.1" source = "git+https://github.com/iced-rs/winit.git?rev=11414b6aa45699f038114e61b4ddf5102b2d3b4b#11414b6aa45699f038114e61b4ddf5102b2d3b4b" -[[package]] -name = "dpi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" - [[package]] name = "drm" version = "0.12.0" @@ -1942,12 +1757,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af9673d8203fcb076b19dfd17e38b3d4ae9f44959416ea532ce72415a6020365" -[[package]] -name = "fast-srgb8" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" - [[package]] name = "fastrand" version = "1.9.0" @@ -2028,15 +1837,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" -[[package]] -name = "font-types" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3971f9a5ca983419cdc386941ba3b9e1feba01a0ab888adf78739feb2798492" -dependencies = [ - "bytemuck", -] - [[package]] name = "font-types" version = "0.9.0" @@ -2125,7 +1925,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95f87364ea709292a3b3f74014ce3ee78412c89807eea75a358c8e029b000994" dependencies = [ - "dirs 5.0.1", + "dirs", "ini_core", "once_cell", "thiserror 1.0.69", @@ -2184,7 +1984,7 @@ checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", - "parking_lot 0.12.4", + "parking_lot", ] [[package]] @@ -2413,18 +2213,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "glow" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "glow" version = "0.16.0" @@ -2437,15 +2225,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "glutin_wgl_sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" -dependencies = [ - "gl_generator", -] - [[package]] name = "glutin_wgl_sys" version = "0.6.1" @@ -2485,19 +2264,6 @@ dependencies = [ "bitflags 2.9.2", ] -[[package]] -name = "gpu-allocator" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" -dependencies = [ - "log", - "presser", - "thiserror 1.0.69", - "winapi", - "windows 0.52.0", -] - [[package]] name = "gpu-allocator" version = "0.27.0" @@ -2510,17 +2276,6 @@ dependencies = [ "windows 0.58.0", ] -[[package]] -name = "gpu-descriptor" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" -dependencies = [ - "bitflags 2.9.2", - "gpu-descriptor-types 0.1.2", - "hashbrown 0.14.5", -] - [[package]] name = "gpu-descriptor" version = "0.3.2" @@ -2528,17 +2283,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ "bitflags 2.9.2", - "gpu-descriptor-types 0.2.0", - "hashbrown 0.15.5", -] - -[[package]] -name = "gpu-descriptor-types" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" -dependencies = [ - "bitflags 2.9.2", + "gpu-descriptor-types", + "hashbrown", ] [[package]] @@ -2663,25 +2409,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash 0.8.12", - "allocator-api2", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -2699,22 +2426,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.15.5", -] - -[[package]] -name = "hassle-rs" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" -dependencies = [ - "bitflags 2.9.2", - "com", - "libc", - "libloading 0.8.8", - "thiserror 1.0.69", - "widestring", - "winapi", + "hashbrown", ] [[package]] @@ -2810,35 +2522,20 @@ dependencies = [ "cc", ] -[[package]] -name = "iced" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88acfabc84ec077eaf9ede3457ffa3a104626d79022a9bf7f296093b1d60c73f" -dependencies = [ - "iced_core 0.13.2", - "iced_futures 0.13.2", - "iced_renderer 0.13.0", - "iced_widget 0.13.4", - "iced_winit 0.13.0", - "image 0.24.9", - "thiserror 1.0.69", -] - [[package]] name = "iced" version = "0.14.0-dev" source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ - "iced_core 0.14.0-dev", + "iced_core", "iced_debug", "iced_devtools", - "iced_futures 0.14.0-dev", - "iced_renderer 0.14.0-dev", - "iced_runtime 0.14.0-dev", - "iced_widget 0.14.0-dev", - "iced_winit 0.14.0-dev", - "image 0.25.6", + "iced_futures", + "iced_renderer", + "iced_runtime", + "iced_widget", + "iced_winit", + "image", "thiserror 1.0.69", ] @@ -2849,7 +2546,7 @@ source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47 dependencies = [ "bincode 1.3.3", "futures", - "iced_core 0.14.0-dev", + "iced_core", "log", "semver", "serde", @@ -2857,26 +2554,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "iced_core" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0013a238275494641bf8f1732a23a808196540dc67b22ff97099c044ae4c8a1c" -dependencies = [ - "bitflags 2.9.2", - "bytes", - "dark-light 1.1.1", - "glam", - "log", - "num-traits", - "once_cell", - "palette", - "rustc-hash 2.1.1", - "smol_str", - "thiserror 1.0.69", - "web-time", -] - [[package]] name = "iced_core" version = "0.14.0-dev" @@ -2884,7 +2561,7 @@ source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47 dependencies = [ "bitflags 2.9.2", "bytes", - "dark-light 2.0.0", + "dark-light", "glam", "lilt", "log", @@ -2903,8 +2580,8 @@ source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47 dependencies = [ "cargo-hot-protocol", "iced_beacon", - "iced_core 0.14.0-dev", - "iced_futures 0.14.0-dev", + "iced_core", + "iced_futures", "log", ] @@ -2915,31 +2592,17 @@ source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47 dependencies = [ "iced_debug", "iced_program", - "iced_widget 0.14.0-dev", + "iced_widget", "log", ] -[[package]] -name = "iced_futures" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c04a6745ba2e80f32cf01e034fd00d853aa4f4cd8b91888099cb7aaee0d5d7c" -dependencies = [ - "futures", - "iced_core 0.13.2", - "log", - "rustc-hash 2.1.1", - "wasm-bindgen-futures", - "wasm-timer", -] - [[package]] name = "iced_futures" version = "0.14.0-dev" source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ "futures", - "iced_core 0.14.0-dev", + "iced_core", "log", "rustc-hash 2.1.1", "tokio", @@ -2947,41 +2610,6 @@ dependencies = [ "wasmtimer", ] -[[package]] -name = "iced_glyphon" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c3bb56f1820ca252bc1d0994ece33d233a55657c0c263ea7cb16895adbde82" -dependencies = [ - "cosmic-text 0.12.1", - "etagere", - "lru 0.12.5", - "rustc-hash 2.1.1", - "wgpu 0.19.4", -] - -[[package]] -name = "iced_graphics" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba25a18cfa6d5cc160aca7e1b34f73ccdff21680fa8702168c09739767b6c66f" -dependencies = [ - "bitflags 2.9.2", - "bytemuck", - "cosmic-text 0.12.1", - "half", - "iced_core 0.13.2", - "iced_futures 0.13.2", - "image 0.24.9", - "kamadak-exif", - "log", - "once_cell", - "raw-window-handle 0.6.2", - "rustc-hash 2.1.1", - "thiserror 1.0.69", - "unicode-segmentation", -] - [[package]] name = "iced_graphics" version = "0.14.0-dev" @@ -2989,11 +2617,11 @@ source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47 dependencies = [ "bitflags 2.9.2", "bytemuck", - "cosmic-text 0.14.2", + "cosmic-text", "half", - "iced_core 0.14.0-dev", - "iced_futures 0.14.0-dev", - "image 0.25.6", + "iced_core", + "iced_futures", + "image", "kamadak-exif", "log", "lyon_path", @@ -3008,21 +2636,8 @@ name = "iced_program" version = "0.14.0-dev" source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ - "iced_graphics 0.14.0-dev", - "iced_runtime 0.14.0-dev", -] - -[[package]] -name = "iced_renderer" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73558208059f9e622df2bf434e044ee2f838ce75201a023cf0ca3e1244f46c2a" -dependencies = [ - "iced_graphics 0.13.0", - "iced_tiny_skia 0.13.0", - "iced_wgpu 0.13.5", - "log", - "thiserror 1.0.69", + "iced_graphics", + "iced_runtime", ] [[package]] @@ -3030,64 +2645,35 @@ name = "iced_renderer" version = "0.14.0-dev" source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ - "iced_graphics 0.14.0-dev", - "iced_tiny_skia 0.14.0-dev", - "iced_wgpu 0.14.0-dev", + "iced_graphics", + "iced_tiny_skia", + "iced_wgpu", "log", "thiserror 1.0.69", ] -[[package]] -name = "iced_runtime" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348b5b2c61c934d88ca3b0ed1ed913291e923d086a66fa288ce9669da9ef62b5" -dependencies = [ - "bytes", - "iced_core 0.13.2", - "iced_futures 0.13.2", - "raw-window-handle 0.6.2", - "thiserror 1.0.69", -] - [[package]] name = "iced_runtime" version = "0.14.0-dev" source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ "bytes", - "iced_core 0.14.0-dev", + "iced_core", "iced_debug", - "iced_futures 0.14.0-dev", + "iced_futures", "raw-window-handle 0.6.2", "thiserror 1.0.69", ] -[[package]] -name = "iced_tiny_skia" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c625d368284fcc43b0b36b176f76eff1abebe7959dd58bd8ce6897d641962a50" -dependencies = [ - "bytemuck", - "cosmic-text 0.12.1", - "iced_graphics 0.13.0", - "kurbo 0.10.4", - "log", - "rustc-hash 2.1.1", - "softbuffer", - "tiny-skia", -] - [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ "bytemuck", - "cosmic-text 0.14.2", + "cosmic-text", "iced_debug", - "iced_graphics 0.14.0-dev", + "iced_graphics", "kurbo 0.10.4", "log", "resvg", @@ -3099,39 +2685,19 @@ dependencies = [ [[package]] name = "iced_video_player" version = "0.6.0" -source = "git+https://github.com/jazzfool/iced_video_player.git?branch=master#a8656e8021f7a6c316760fffc84664b92e5abc61" +source = "git+https://git.tfcconnection.org/chris/iced_video_player?branch=master#3e99427f5e430a81ac57dd448463eb59e3740276" dependencies = [ "glib", "gstreamer", "gstreamer-app", "gstreamer-base", - "iced 0.13.1", - "iced_wgpu 0.13.5", + "iced", + "iced_wgpu", "log", "thiserror 1.0.69", "url", ] -[[package]] -name = "iced_wgpu" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15708887133671d2bcc6c1d01d1f176f43a64d6cdc3b2bf893396c3ee498295f" -dependencies = [ - "bitflags 2.9.2", - "bytemuck", - "futures", - "glam", - "guillotiere", - "iced_glyphon", - "iced_graphics 0.13.0", - "log", - "once_cell", - "rustc-hash 2.1.1", - "thiserror 1.0.69", - "wgpu 0.19.4", -] - [[package]] name = "iced_wgpu" version = "0.14.0-dev" @@ -3144,28 +2710,13 @@ dependencies = [ "glam", "guillotiere", "iced_debug", - "iced_graphics 0.14.0-dev", + "iced_graphics", "log", "lyon", "resvg", "rustc-hash 2.1.1", "thiserror 1.0.69", - "wgpu 26.0.1", -] - -[[package]] -name = "iced_widget" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81429e1b950b0e4bca65be4c4278fea6678ea782030a411778f26fa9f8983e1d" -dependencies = [ - "iced_renderer 0.13.0", - "iced_runtime 0.13.2", - "num-traits", - "once_cell", - "rustc-hash 2.1.1", - "thiserror 1.0.69", - "unicode-segmentation", + "wgpu", ] [[package]] @@ -3173,8 +2724,8 @@ name = "iced_widget" version = "0.14.0-dev" source = "git+https://github.com/iced-rs/iced?branch=master#f9a6a3051d0a5e1c9f47ebe4071daf5621f8d9c1" dependencies = [ - "iced_renderer 0.14.0-dev", - "iced_runtime 0.14.0-dev", + "iced_renderer", + "iced_runtime", "log", "num-traits", "ouroboros", @@ -3183,26 +2734,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "iced_winit" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44cd4e1c594b6334f409282937bf972ba14d31fedf03c23aa595d982a2fda28" -dependencies = [ - "iced_futures 0.13.2", - "iced_graphics 0.13.0", - "iced_runtime 0.13.2", - "log", - "rustc-hash 2.1.1", - "thiserror 1.0.69", - "tracing", - "wasm-bindgen-futures", - "web-sys", - "winapi", - "window_clipboard", - "winit 0.30.12", -] - [[package]] name = "iced_winit" version = "0.14.0-dev" @@ -3217,7 +2748,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "window_clipboard", - "winit 0.30.8", + "winit", ] [[package]] @@ -3333,24 +2864,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "image" -version = "0.24.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "exr", - "gif", - "jpeg-decoder", - "num-traits", - "png", - "qoi", - "tiff", -] - [[package]] name = "image" version = "0.25.6" @@ -3403,7 +2916,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.5", + "hashbrown", ] [[package]] @@ -3539,9 +3052,6 @@ name = "jpeg-decoder" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" -dependencies = [ - "rayon", -] [[package]] name = "js-sys" @@ -3569,7 +3079,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading 0.8.8", + "libloading", "pkg-config", ] @@ -3672,16 +3182,6 @@ dependencies = [ "cc", ] -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - [[package]] name = "libloading" version = "0.8.8" @@ -3793,12 +3293,6 @@ dependencies = [ "imgref", ] -[[package]] -name = "lru" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" - [[package]] name = "lru" version = "0.16.0" @@ -3813,11 +3307,11 @@ dependencies = [ "colors-transform", "crisp", "derive_setters", - "dirs 5.0.1", + "dirs", "freedesktop-icons", "gstreamer", "gstreamer-app", - "iced 0.14.0-dev", + "iced", "iced_video_player", "lexpr", "miette", @@ -3979,21 +3473,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "metal" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" -dependencies = [ - "bitflags 2.9.2", - "block", - "core-graphics-types 0.1.3", - "foreign-types", - "log", - "objc", - "paste", -] - [[package]] name = "metal" version = "0.32.0" @@ -4078,26 +3557,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" -[[package]] -name = "naga" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843" -dependencies = [ - "bit-set 0.5.3", - "bitflags 2.9.2", - "codespan-reporting 0.11.1", - "hexf-parse", - "indexmap", - "log", - "num-traits", - "rustc-hash 1.1.0", - "spirv", - "termcolor", - "thiserror 1.0.69", - "unicode-xid", -] - [[package]] name = "naga" version = "26.0.0" @@ -4105,13 +3564,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "916cbc7cb27db60be930a4e2da243cf4bc39569195f22fd8ee419cd31d5b662c" dependencies = [ "arrayvec", - "bit-set 0.8.0", + "bit-set", "bitflags 2.9.2", "cfg-if", "cfg_aliases 0.2.1", - "codespan-reporting 0.12.0", + "codespan-reporting", "half", - "hashbrown 0.15.5", + "hashbrown", "hexf-parse", "indexmap", "libm", @@ -4216,19 +3675,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nix" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" -dependencies = [ - "bitflags 2.9.2", - "cfg-if", - "cfg_aliases 0.2.1", - "libc", - "memoffset 0.9.1", -] - [[package]] name = "nix" version = "0.30.1" @@ -4401,7 +3847,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", - "objc_exception", ] [[package]] @@ -4618,15 +4063,6 @@ dependencies = [ "objc2-foundation", ] -[[package]] -name = "objc_exception" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", -] - [[package]] name = "objc_id" version = "0.1.1" @@ -4722,16 +4158,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "ordered-multimap" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" -dependencies = [ - "dlv-list", - "hashbrown 0.12.3", -] - [[package]] name = "ordered-stream" version = "0.2.0" @@ -4787,47 +4213,12 @@ version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48dd4f4a2c8405440fd0462561f0e5806bd0f77e86f51c761481bdd4018b545e" -[[package]] -name = "palette" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" -dependencies = [ - "approx", - "fast-srgb8", - "palette_derive", - "phf", -] - -[[package]] -name = "palette_derive" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" -dependencies = [ - "by_address", - "proc-macro2", - "quote", - "syn 2.0.106", -] - [[package]] name = "parking" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.4" @@ -4835,21 +4226,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", - "parking_lot_core 0.9.11", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -4886,48 +4263,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_macros", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" -dependencies = [ - "phf_shared", - "rand", -] - -[[package]] -name = "phf_macros" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", - "syn 2.0.106", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", -] - [[package]] name = "pico-args" version = "0.5.0" @@ -5341,16 +4676,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "read-fonts" -version = "0.22.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69aacb76b5c29acfb7f90155d39759a29496aebb49395830e928a9703d2eec2f" -dependencies = [ - "bytemuck", - "font-types 0.7.3", -] - [[package]] name = "read-fonts" version = "0.29.3" @@ -5358,16 +4683,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04ca636dac446b5664bd16c069c00a9621806895b8bb02c2dc68542b23b8f25d" dependencies = [ "bytemuck", - "font-types 0.9.0", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", + "font-types", ] [[package]] @@ -5551,16 +4867,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rust-ini" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" -dependencies = [ - "cfg-if", - "ordered-multimap", -] - [[package]] name = "rustc-demangle" version = "0.1.26" @@ -5879,16 +5185,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" -[[package]] -name = "skrifa" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1c44ad1f6c5bdd4eefed8326711b7dbda9ea45dfd36068c427d332aa382cbe" -dependencies = [ - "bytemuck", - "read-fonts 0.22.7", -] - [[package]] name = "skrifa" version = "0.31.3" @@ -5896,7 +5192,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbeb4ca4399663735553a09dd17ce7e49a0a0203f03b706b39628c4d913a8607" dependencies = [ "bytemuck", - "read-fonts 0.29.3", + "read-fonts", ] [[package]] @@ -6077,7 +5373,7 @@ dependencies = [ "futures-intrusive", "futures-io", "futures-util", - "hashbrown 0.15.5", + "hashbrown", "hashlink", "indexmap", "log", @@ -6301,7 +5597,7 @@ checksum = "b14ed4d86ab065ffbfdb994fd3e44daf5244b02cb643bd52949d74b703f36605" dependencies = [ "js-sys", "libc", - "libloading 0.8.8", + "libloading", "memfd", "memmap2", "serde", @@ -6364,26 +5660,15 @@ dependencies = [ "siphasher", ] -[[package]] -name = "swash" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd59f3f359ddd2c95af4758c18270eddd9c730dde98598023cdabff472c2ca2" -dependencies = [ - "skrifa 0.22.3", - "yazi 0.1.6", - "zeno 0.2.3", -] - [[package]] name = "swash" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f745de914febc7c9ab4388dfaf94bbc87e69f57bb41133a9b0c84d4be49856f3" dependencies = [ - "skrifa 0.31.3", - "yazi 0.2.1", - "zeno 0.3.3", + "skrifa", + "yazi", + "zeno", ] [[package]] @@ -6780,7 +6065,7 @@ checksum = "0324504befd01cab6e0c994f34b2ffa257849ee019d3fb3b64fb2c858887d89e" dependencies = [ "as-raw-xcb-connection", "ctor-lite", - "libloading 0.8.8", + "libloading", "pkg-config", "tracing", ] @@ -7069,12 +6354,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - [[package]] name = "unty" version = "0.0.4" @@ -7293,21 +6572,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasmtimer" version = "0.4.2" @@ -7316,7 +6580,7 @@ checksum = "d8d49b5d6c64e8558d9b1b065014426f35c18de636895d24893dbbd329743446" dependencies = [ "futures", "js-sys", - "parking_lot 0.12.4", + "parking_lot", "pin-utils", "slab", "wasm-bindgen", @@ -7457,31 +6721,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" -[[package]] -name = "wgpu" -version = "0.19.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd7311dbd2abcfebaabf1841a2824ed7c8be443a0f29166e5d3c6a53a762c01" -dependencies = [ - "arrayvec", - "cfg-if", - "cfg_aliases 0.1.1", - "js-sys", - "log", - "naga 0.19.2", - "parking_lot 0.12.4", - "profiling", - "raw-window-handle 0.6.2", - "smallvec", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu-core 0.19.4", - "wgpu-hal 0.19.5", - "wgpu-types 0.19.2", -] - [[package]] name = "wgpu" version = "26.0.1" @@ -7493,11 +6732,11 @@ dependencies = [ "cfg-if", "cfg_aliases 0.2.1", "document-features", - "hashbrown 0.15.5", + "hashbrown", "js-sys", "log", - "naga 26.0.0", - "parking_lot 0.12.4", + "naga", + "parking_lot", "portable-atomic", "profiling", "raw-window-handle 0.6.2", @@ -7506,35 +6745,9 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core 26.0.1", - "wgpu-hal 26.0.4", - "wgpu-types 26.0.0", -] - -[[package]] -name = "wgpu-core" -version = "0.19.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a" -dependencies = [ - "arrayvec", - "bit-vec 0.6.3", - "bitflags 2.9.2", - "cfg_aliases 0.1.1", - "codespan-reporting 0.11.1", - "indexmap", - "log", - "naga 0.19.2", - "once_cell", - "parking_lot 0.12.4", - "profiling", - "raw-window-handle 0.6.2", - "rustc-hash 1.1.0", - "smallvec", - "thiserror 1.0.69", - "web-sys", - "wgpu-hal 0.19.5", - "wgpu-types 0.19.2", + "wgpu-core", + "wgpu-hal", + "wgpu-types", ] [[package]] @@ -7544,17 +6757,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f62f1053bd28c2268f42916f31588f81f64796e2ff91b81293515017ca8bd9" dependencies = [ "arrayvec", - "bit-set 0.8.0", - "bit-vec 0.8.0", + "bit-set", + "bit-vec", "bitflags 2.9.2", "cfg_aliases 0.2.1", "document-features", - "hashbrown 0.15.5", + "hashbrown", "indexmap", "log", - "naga 26.0.0", + "naga", "once_cell", - "parking_lot 0.12.4", + "parking_lot", "portable-atomic", "profiling", "raw-window-handle 0.6.2", @@ -7564,8 +6777,8 @@ dependencies = [ "wgpu-core-deps-apple", "wgpu-core-deps-emscripten", "wgpu-core-deps-windows-linux-android", - "wgpu-hal 26.0.4", - "wgpu-types 26.0.0", + "wgpu-hal", + "wgpu-types", ] [[package]] @@ -7574,7 +6787,7 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18ae5fbde6a4cbebae38358aa73fcd6e0f15c6144b67ef5dc91ded0db125dbdf" dependencies = [ - "wgpu-hal 26.0.4", + "wgpu-hal", ] [[package]] @@ -7583,7 +6796,7 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7670e390f416006f746b4600fdd9136455e3627f5bd763abf9a65daa216dd2d" dependencies = [ - "wgpu-hal 26.0.4", + "wgpu-hal", ] [[package]] @@ -7592,52 +6805,7 @@ version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "720a5cb9d12b3d337c15ff0e24d3e97ed11490ff3f7506e7f3d98c68fa5d6f14" dependencies = [ - "wgpu-hal 26.0.4", -] - -[[package]] -name = "wgpu-hal" -version = "0.19.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfabcfc55fd86611a855816326b2d54c3b2fd7972c27ce414291562650552703" -dependencies = [ - "android_system_properties", - "arrayvec", - "ash 0.37.3+1.3.251", - "bit-set 0.5.3", - "bitflags 2.9.2", - "block", - "cfg_aliases 0.1.1", - "core-graphics-types 0.1.3", - "d3d12", - "glow 0.13.1", - "glutin_wgl_sys 0.5.0", - "gpu-alloc", - "gpu-allocator 0.25.0", - "gpu-descriptor 0.2.4", - "hassle-rs", - "js-sys", - "khronos-egl", - "libc", - "libloading 0.8.8", - "log", - "metal 0.27.0", - "naga 0.19.2", - "ndk-sys 0.5.0+25.2.9519653", - "objc", - "once_cell", - "parking_lot 0.12.4", - "profiling", - "range-alloc", - "raw-window-handle 0.6.2", - "renderdoc-sys", - "rustc-hash 1.1.0", - "smallvec", - "thiserror 1.0.69", - "wasm-bindgen", - "web-sys", - "wgpu-types 0.19.2", - "winapi", + "wgpu-hal", ] [[package]] @@ -7648,31 +6816,31 @@ checksum = "7df2c64ac282a91ad7662c90bc4a77d4a2135bc0b2a2da5a4d4e267afc034b9e" dependencies = [ "android_system_properties", "arrayvec", - "ash 0.38.0+1.3.281", - "bit-set 0.8.0", + "ash", + "bit-set", "bitflags 2.9.2", "block", "bytemuck", "cfg-if", "cfg_aliases 0.2.1", "core-graphics-types 0.2.0", - "glow 0.16.0", - "glutin_wgl_sys 0.6.1", + "glow", + "glutin_wgl_sys", "gpu-alloc", - "gpu-allocator 0.27.0", - "gpu-descriptor 0.3.2", - "hashbrown 0.15.5", + "gpu-allocator", + "gpu-descriptor", + "hashbrown", "js-sys", "khronos-egl", "libc", - "libloading 0.8.8", + "libloading", "log", - "metal 0.32.0", - "naga 26.0.0", + "metal", + "naga", "ndk-sys 0.6.0+11769913", "objc", "ordered-float", - "parking_lot 0.12.4", + "parking_lot", "portable-atomic", "portable-atomic-util", "profiling", @@ -7683,22 +6851,11 @@ dependencies = [ "thiserror 2.0.16", "wasm-bindgen", "web-sys", - "wgpu-types 26.0.0", + "wgpu-types", "windows 0.58.0", "windows-core 0.58.0", ] -[[package]] -name = "wgpu-types" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805" -dependencies = [ - "bitflags 2.9.2", - "js-sys", - "web-sys", -] - [[package]] name = "wgpu-types" version = "26.0.0" @@ -7723,12 +6880,6 @@ dependencies = [ "wasite", ] -[[package]] -name = "widestring" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" - [[package]] name = "winapi" version = "0.3.9" @@ -7774,16 +6925,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "windows" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" -dependencies = [ - "windows-core 0.52.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.54.0" @@ -7804,15 +6945,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.54.0" @@ -8238,7 +7370,7 @@ name = "winit" version = "0.30.8" source = "git+https://github.com/iced-rs/winit.git?rev=11414b6aa45699f038114e61b4ddf5102b2d3b4b#11414b6aa45699f038114e61b4ddf5102b2d3b4b" dependencies = [ - "ahash 0.8.12", + "ahash", "android-activity", "atomic-waker", "bitflags 2.9.2", @@ -8250,59 +7382,7 @@ dependencies = [ "core-foundation 0.9.4", "core-graphics 0.23.2", "cursor-icon", - "dpi 0.1.1", - "js-sys", - "libc", - "memmap2", - "ndk 0.9.0", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "objc2-ui-kit", - "orbclient", - "percent-encoding", - "pin-project", - "raw-window-handle 0.6.2", - "redox_syscall 0.4.1", - "rustix 0.38.44", - "sctk-adwaita", - "smithay-client-toolkit", - "smol_str", - "tracing", - "unicode-segmentation", - "wasm-bindgen", - "wasm-bindgen-futures", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-plasma", - "web-sys", - "web-time", - "windows-sys 0.52.0", - "x11-dl", - "x11rb", - "xkbcommon-dl", -] - -[[package]] -name = "winit" -version = "0.30.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" -dependencies = [ - "ahash 0.8.12", - "android-activity", - "atomic-waker", - "bitflags 2.9.2", - "block2", - "bytemuck", - "calloop", - "cfg_aliases 0.2.1", - "concurrent-queue", - "core-foundation 0.9.4", - "core-graphics 0.23.2", - "cursor-icon", - "dpi 0.1.2", + "dpi", "js-sys", "libc", "memmap2", @@ -8354,15 +7434,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.52.0" @@ -8408,7 +7479,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "libloading 0.8.8", + "libloading", "once_cell", "rustix 0.38.44", "x11rb-protocol", @@ -8479,12 +7550,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" -[[package]] -name = "yazi" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" - [[package]] name = "yazi" version = "0.2.1" @@ -8556,44 +7621,6 @@ dependencies = [ "zvariant 3.15.2", ] -[[package]] -name = "zbus" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" -dependencies = [ - "async-broadcast 0.7.2", - "async-executor", - "async-fs 2.1.3", - "async-io 2.5.0", - "async-lock 3.4.1", - "async-process 2.4.0", - "async-recursion", - "async-task", - "async-trait", - "blocking", - "enumflags2", - "event-listener 5.4.1", - "futures-core", - "futures-sink", - "futures-util", - "hex", - "nix 0.29.0", - "ordered-stream", - "rand", - "serde", - "serde_repr", - "sha1", - "static_assertions", - "tracing", - "uds_windows", - "windows-sys 0.52.0", - "xdg-home", - "zbus_macros 4.4.0", - "zbus_names 3.0.0", - "zvariant 4.2.0", -] - [[package]] name = "zbus" version = "5.9.0" @@ -8641,19 +7668,6 @@ dependencies = [ "zvariant_utils 1.0.1", ] -[[package]] -name = "zbus_macros" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" -dependencies = [ - "proc-macro-crate 3.3.0", - "proc-macro2", - "quote", - "syn 2.0.106", - "zvariant_utils 2.1.0", -] - [[package]] name = "zbus_macros" version = "5.9.0" @@ -8680,17 +7694,6 @@ dependencies = [ "zvariant 3.15.2", ] -[[package]] -name = "zbus_names" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" -dependencies = [ - "serde", - "static_assertions", - "zvariant 4.2.0", -] - [[package]] name = "zbus_names" version = "4.2.0" @@ -8703,12 +7706,6 @@ dependencies = [ "zvariant 5.6.0", ] -[[package]] -name = "zeno" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" - [[package]] name = "zeno" version = "0.3.3" @@ -8834,19 +7831,6 @@ dependencies = [ "zvariant_derive 3.15.2", ] -[[package]] -name = "zvariant" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" -dependencies = [ - "endi", - "enumflags2", - "serde", - "static_assertions", - "zvariant_derive 4.2.0", -] - [[package]] name = "zvariant" version = "5.6.0" @@ -8875,19 +7859,6 @@ dependencies = [ "zvariant_utils 1.0.1", ] -[[package]] -name = "zvariant_derive" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" -dependencies = [ - "proc-macro-crate 3.3.0", - "proc-macro2", - "quote", - "syn 2.0.106", - "zvariant_utils 2.1.0", -] - [[package]] name = "zvariant_derive" version = "5.6.0" @@ -8912,17 +7883,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "zvariant_utils" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.106", -] - [[package]] name = "zvariant_utils" version = "3.2.0" diff --git a/Cargo.toml b/Cargo.toml index 37a0430..943bbd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ branch = "master" features = ["wgpu", "image", "advanced", "svg", "canvas", "hot", "debug", "lazy", "tokio"] [dependencies.iced_video_player] -git = "https://github.com/jazzfool/iced_video_player.git" +git = "https://git.tfcconnection.org/chris/iced_video_player" branch = "master" # branch = "cosmic" diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index 5f0333d..03d81ce 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -709,7 +709,13 @@ pub(crate) fn slide_view( let lines = slide_text.lines(); let text: Vec> = lines .map(|t| { - rich_text([span(format!("{}\n", t)) + rich_text::< + '_, + &str, + Message, + iced::Theme, + iced::Renderer, + >([span(format!("{}\n", t)) .background( Background::Color(Color::BLACK) .scale_alpha(0.4), diff --git a/src/ui/song_editor.rs b/src/ui/song_editor.rs index 21e0cdb..5ed479f 100644 --- a/src/ui/song_editor.rs +++ b/src/ui/song_editor.rs @@ -4,15 +4,14 @@ use dirs::font_dir; use iced::{ advanced::graphics::text::cosmic_text::fontdb, font::{Family, Stretch, Style, Weight}, - theme, widget::{ button, column, combo_box, container, horizontal_space, row, scrollable, text, text_editor, text_input, tooltip, + TextInput, }, Element, Font, Length, Task, }; use iced_video_player::Video; -use rfd::AsyncFileDialog; use tracing::{debug, error}; use crate::{ @@ -279,66 +278,62 @@ impl SongEditor { .center_x(Length::FillPortion(2)), container(slide_preview) .center_x(Length::FillPortion(3)) - ] - .into(), + ], ] .spacing(15); column.into() } fn slide_preview(&self) -> Element { - // if let Some(song) = &self.song { - // if let Ok(slides) = song.to_slides() { - // let slides = slides - // .iter() - // .enumerate() - // .map(|(index, slide)| { - // container( - // slide_view( - // slide.clone(), - // if index == 0 { - // &self.video - // } else { - // &None - // }, - // self.current_font, - // false, - // false, - // ) - // .map(|_| Message::None), - // ) - // .height(250) - // .center_x(Length::Fill) - // .padding([0, 20]) - // .clip(true) - // .into() - // }) - // .collect(); - // scrollable( - // column::with_children(slides) - // .spacing(theme::active().iced().space_l()), - // ) - // .height(Length::Fill) - // .width(Length::Fill) - // .into() - // } else { - // horizontal_space().into() - // } - // } else { - // horizontal_space().into() - // } - self.slide_state - .view(Font::with_name("Quicksand Bold")) - .map(|_s| Message::None) - .into() + if let Some(song) = &self.song { + if let Ok(slides) = song.to_slides() { + let slides = slides + .iter() + .enumerate() + .map(|(index, slide)| { + container( + slide_view( + slide.clone(), + if index == 0 { + &self.video + } else { + &None + }, + self.current_font, + false, + false, + ) + .map(|_| Message::None), + ) + .height(250) + .center_x(Length::Fill) + .padding([0, 20]) + .clip(true) + .into() + }) + .collect(); + scrollable(column(slides).spacing(20)) + .height(Length::Fill) + .width(Length::Fill) + .into() + } else { + horizontal_space().into() + } + } else { + horizontal_space().into() + } + // self.slide_state + // .view(Font::with_name("Quicksand Bold")) + // .map(|_s| Message::None) + // .into() } fn left_column(&self) -> Element { - let title_input = text_input("song", &self.title) - .on_input(Message::ChangeTitle); + let title_input = text_input("song", self.title.as_ref()) + .on_input(|_| Message::ChangeTitle); let author_input = text_input("author", &self.author) - .on_input(Message::ChangeAuthor); + .on_input(|_| Message::ChangeAuthor); let verse_input = text_input( "Verse From 213e47bf6dee7c09bbdf7dddd8e2a49de17854d0 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 27 Aug 2025 09:45:00 -0500 Subject: [PATCH 05/15] rearrange libcosmic dep for clarity --- Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4f5c510..fd26207 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,6 @@ description = "A cli presentation system" [dependencies] clap = { version = "4.5.20", features = ["debug", "derive"] } -libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false, features = ["debug", "winit", "desktop", "winit_wgpu", "winit_tokio", "tokio", "rfd", "dbus-config", "a11y", "wgpu", "multi-window"] } lexpr = "0.2.7" miette = { version = "7.2.0", features = ["fancy"] } pretty_assertions = "1.4.1" @@ -39,6 +38,11 @@ rayon = "1.11.0" # mupdf = "0.5.0" # rfd = { version = "0.12.1", features = ["xdg-portal"], default-features = false } +[dependencies.libcosmic] +git = "https://github.com/pop-os/libcosmic" +default-features = false +features = ["debug", "winit", "desktop", "winit_wgpu", "winit_tokio", "tokio", "rfd", "dbus-config", "a11y", "wgpu", "multi-window"] + [dependencies.iced_video_player] git = "https://github.com/jackpot51/iced_video_player.git" branch = "cosmic" From aa5e7420f172c9e4dcc6de05f18df32e3d5eb109 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 27 Aug 2025 09:45:16 -0500 Subject: [PATCH 06/15] moving service_list out of nav_bar --- src/main.rs | 381 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 240 insertions(+), 141 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9d1cd41..dfa0858 100644 --- a/src/main.rs +++ b/src/main.rs @@ -235,155 +235,155 @@ impl cosmic::Application for App { (app, batch) } - /// Allows COSMIC to integrate with your application's [`nav_bar::Model`]. - fn nav_model(&self) -> Option<&nav_bar::Model> { - Some(&self.nav_model) - } + // /// Allows COSMIC to integrate with your application's [`nav_bar::Model`]. + // fn nav_model(&self) -> Option<&nav_bar::Model> { + // Some(&self.nav_model) + // } - fn nav_bar(&self) -> Option>> { - if !self.core().nav_bar_active() { - return None; - } + // fn nav_bar(&self) -> Option>> { + // if !self.core().nav_bar_active() { + // return None; + // } - // let nav_model = self.nav_model()?; + // // let nav_model = self.nav_model()?; - // let mut nav = cosmic::widget::nav_bar(nav_model, |id| { - // cosmic::Action::Cosmic(cosmic::app::Action::NavBar(id)) - // }) - // .on_dnd_drop::(|entity, data, action| { - // debug!(?entity); - // debug!(?data); - // debug!(?action); - // cosmic::Action::App(Message::DndDrop) - // }) - // .on_dnd_enter(|entity, data| { - // debug!("entered"); - // cosmic::Action::App(Message::DndEnter(entity, data)) - // }) - // .on_dnd_leave(|entity| { - // debug!("left"); - // cosmic::Action::App(Message::DndLeave(entity)) - // }) - // .drag_id(DragId::new()) - // .on_context(|id| { - // cosmic::Action::Cosmic( - // cosmic::app::Action::NavBarContext(id), - // ) - // }) - // .context_menu(None) - // .into_container() - // // XXX both must be shrink to avoid flex layout from ignoring it - // .width(Length::Shrink) - // .height(Length::Shrink); + // // let mut nav = cosmic::widget::nav_bar(nav_model, |id| { + // // cosmic::Action::Cosmic(cosmic::app::Action::NavBar(id)) + // // }) + // // .on_dnd_drop::(|entity, data, action| { + // // debug!(?entity); + // // debug!(?data); + // // debug!(?action); + // // cosmic::Action::App(Message::DndDrop) + // // }) + // // .on_dnd_enter(|entity, data| { + // // debug!("entered"); + // // cosmic::Action::App(Message::DndEnter(entity, data)) + // // }) + // // .on_dnd_leave(|entity| { + // // debug!("left"); + // // cosmic::Action::App(Message::DndLeave(entity)) + // // }) + // // .drag_id(DragId::new()) + // // .on_context(|id| { + // // cosmic::Action::Cosmic( + // // cosmic::app::Action::NavBarContext(id), + // // ) + // // }) + // // .context_menu(None) + // // .into_container() + // // // XXX both must be shrink to avoid flex layout from ignoring it + // // .width(Length::Shrink) + // // .height(Length::Shrink); - let list = self - .service - .iter() - .enumerate() - .map(|(index, item)| { - let button = button::standard(item.title.clone()) - .leading_icon({ - match item.kind { - core::kinds::ServiceItemKind::Song(_) => { - icon::from_name("folder-music-symbolic") - }, - core::kinds::ServiceItemKind::Video(_) => { - icon::from_name("folder-videos-symbolic") - }, - core::kinds::ServiceItemKind::Image(_) => { - icon::from_name("folder-pictures-symbolic") - }, - core::kinds::ServiceItemKind::Presentation(_) => { - icon::from_name("x-office-presentation-symbolic") - }, - core::kinds::ServiceItemKind::Content(_) => { - icon::from_name("x-office-presentation-symbolic") - }, - } - }) - .class(cosmic::theme::style::Button::HeaderBar) - .padding(5) - .width(Length::Fill) - .on_press(cosmic::Action::App(Message::ChangeServiceItem(index))); - let tooltip = tooltip(button, - text::body(item.kind.to_string()), - TPosition::Right); - dnd_destination(tooltip, vec!["application/service-item".into()]) - .data_received_for::( move |item| { - if let Some(item) = item { - cosmic::Action::App(Message::AddServiceItem(index, item)) - } else { - cosmic::Action::None - } - }).on_drop(move |x, y| { - debug!(x, y); - cosmic::Action::App(Message::AddServiceItemDrop(index)) - }).on_finish(move |mime, data, action, x, y| { - debug!(mime, ?data, ?action, x, y); - let Ok(item) = ServiceItem::try_from((data, mime)) else { - return cosmic::Action::None; - }; - debug!(?item); - cosmic::Action::App(Message::AddServiceItem(index, item)) - }) - .into() - }); + // let list = self + // .service + // .iter() + // .enumerate() + // .map(|(index, item)| { + // let button = button::standard(item.title.clone()) + // .leading_icon({ + // match item.kind { + // core::kinds::ServiceItemKind::Song(_) => { + // icon::from_name("folder-music-symbolic") + // }, + // core::kinds::ServiceItemKind::Video(_) => { + // icon::from_name("folder-videos-symbolic") + // }, + // core::kinds::ServiceItemKind::Image(_) => { + // icon::from_name("folder-pictures-symbolic") + // }, + // core::kinds::ServiceItemKind::Presentation(_) => { + // icon::from_name("x-office-presentation-symbolic") + // }, + // core::kinds::ServiceItemKind::Content(_) => { + // icon::from_name("x-office-presentation-symbolic") + // }, + // } + // }) + // .class(cosmic::theme::style::Button::HeaderBar) + // .padding(5) + // .width(Length::Fill) + // .on_press(cosmic::Action::App(Message::ChangeServiceItem(index))); + // let tooltip = tooltip(button, + // text::body(item.kind.to_string()), + // TPosition::Right); + // dnd_destination(tooltip, vec!["application/service-item".into()]) + // .data_received_for::( move |item| { + // if let Some(item) = item { + // cosmic::Action::App(Message::AddServiceItem(index, item)) + // } else { + // cosmic::Action::None + // } + // }).on_drop(move |x, y| { + // debug!(x, y); + // cosmic::Action::App(Message::AddServiceItemDrop(index)) + // }).on_finish(move |mime, data, action, x, y| { + // debug!(mime, ?data, ?action, x, y); + // let Ok(item) = ServiceItem::try_from((data, mime)) else { + // return cosmic::Action::None; + // }; + // debug!(?item); + // cosmic::Action::App(Message::AddServiceItem(index, item)) + // }) + // .into() + // }); - let end_index = self.service.len(); - let column = column![ - text::heading("Service List").center().width(280), - column(list).spacing(10), - dnd_destination( - vertical_space(), - vec!["application/service-item".into()] - ) - .data_received_for::(|item| { - if let Some(item) = item { - cosmic::Action::App(Message::AppendServiceItem( - item, - )) - } else { - cosmic::Action::None - } - }) - .on_finish( - move |mime, data, action, x, y| { - debug!(mime, ?data, ?action, x, y); - let Ok(item) = - ServiceItem::try_from((data, mime)) - else { - return cosmic::Action::None; - }; - debug!(?item); - cosmic::Action::App(Message::AddServiceItem( - end_index, item, - )) - } - ) - ] - .padding(10) - .spacing(10); - let padding = Padding::new(0.0).top(20); - let mut container = Container::new(column) - // .height(Length::Fill) - .style(nav_bar_style) - .padding(padding); + // let end_index = self.service.len(); + // let column = column![ + // text::heading("Service List").center().width(280), + // column(list).spacing(10), + // dnd_destination( + // vertical_space(), + // vec!["application/service-item".into()] + // ) + // .data_received_for::(|item| { + // if let Some(item) = item { + // cosmic::Action::App(Message::AppendServiceItem( + // item, + // )) + // } else { + // cosmic::Action::None + // } + // }) + // .on_finish( + // move |mime, data, action, x, y| { + // debug!(mime, ?data, ?action, x, y); + // let Ok(item) = + // ServiceItem::try_from((data, mime)) + // else { + // return cosmic::Action::None; + // }; + // debug!(?item); + // cosmic::Action::App(Message::AddServiceItem( + // end_index, item, + // )) + // } + // ) + // ] + // .padding(10) + // .spacing(10); + // let padding = Padding::new(0.0).top(20); + // let mut container = Container::new(column) + // // .height(Length::Fill) + // .style(nav_bar_style) + // .padding(padding); - if !self.core().is_condensed() { - container = container.max_width(280); - } - Some(container.into()) - } + // if !self.core().is_condensed() { + // container = container.max_width(280); + // } + // Some(container.into()) + // } /// Called when a navigation item is selected. - fn on_nav_select( - &mut self, - id: nav_bar::Id, - ) -> Task { - self.nav_model.activate(id); - // debug!(?id); - self.update_title() - } + // fn on_nav_select( + // &mut self, + // id: nav_bar::Id, + // ) -> Task { + // self.nav_model.activate(id); + // // debug!(?id); + // self.update_title() + // } fn header_start(&self) -> Vec> { vec![] @@ -998,6 +998,9 @@ impl cosmic::Application for App { )) }; + let service_list = + Container::new(self.service_list()).padding(5); + let slide_preview = column![ Space::with_height(Length::Fill), Container::new( @@ -1048,6 +1051,7 @@ impl cosmic::Application for App { self.song_editor.view().map(Message::SongEditor); let row = row![ + service_list, Container::new( button::icon(icon_left) .icon_size(128) @@ -1212,6 +1216,101 @@ where _ => Task::none(), } } + + fn service_list(&self) -> Element { + let list = self + .service + .iter() + .enumerate() + .map(|(index, item)| { + let button = button::standard(item.title.clone()) + .leading_icon({ + match item.kind { + core::kinds::ServiceItemKind::Song(_) => { + icon::from_name("folder-music-symbolic") + }, + core::kinds::ServiceItemKind::Video(_) => { + icon::from_name("folder-videos-symbolic") + }, + core::kinds::ServiceItemKind::Image(_) => { + icon::from_name("folder-pictures-symbolic") + }, + core::kinds::ServiceItemKind::Presentation(_) => { + icon::from_name("x-office-presentation-symbolic") + }, + core::kinds::ServiceItemKind::Content(_) => { + icon::from_name("x-office-presentation-symbolic") + }, + } + }) + .class(cosmic::theme::style::Button::HeaderBar) + .padding(5) + .width(Length::Fill) + .on_press(Message::ChangeServiceItem(index)); + let tooltip = tooltip(button, + text::body(item.kind.to_string()), + TPosition::Right); + dnd_destination(tooltip, vec!["application/service-item".into()]) + .data_received_for::( move |item| { + if let Some(item) = item { + Message::AddServiceItem(index, item) + } else { + Message::None + } + }).on_drop(move |x, y| { + debug!(x, y); + Message::AddServiceItemDrop(index) + }).on_finish(move |mime, data, action, x, y| { + debug!(mime, ?data, ?action, x, y); + let Ok(item) = ServiceItem::try_from((data, mime)) else { + return Message::None; + }; + debug!(?item); + Message::AddServiceItem(index, item) + }) + .into() + }); + + let end_index = self.service.len(); + let column = column![ + text::heading("Service List").center().width(280), + iced::widget::horizontal_rule(1), + column(list).spacing(10), + dnd_destination( + vertical_space(), + vec!["application/service-item".into()] + ) + .data_received_for::(|item| { + if let Some(item) = item { + Message::AppendServiceItem(item) + } else { + Message::None + } + }) + .on_finish( + move |mime, data, action, x, y| { + debug!(mime, ?data, ?action, x, y); + let Ok(item) = + ServiceItem::try_from((data, mime)) + else { + return Message::None; + }; + debug!(?item); + Message::AddServiceItem(end_index, item) + } + ) + ] + .padding(10) + .spacing(10); + let mut container = Container::new(column) + // .height(Length::Fill) + .style(nav_bar_style); + + if !self.core().is_condensed() { + container = container.max_width(280); + } + container.into() + } } #[cfg(test)] From 5f3d867ad754f55574ebcfa7ec34b927659acf49 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 27 Aug 2025 13:06:20 -0500 Subject: [PATCH 07/15] move the library to the left --- src/main.rs | 37 +++++++++++++++++++++---------------- src/ui/library.rs | 10 ++++++++-- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/main.rs b/src/main.rs index dfa0858..1a9eb64 100644 --- a/src/main.rs +++ b/src/main.rs @@ -998,9 +998,6 @@ impl cosmic::Application for App { )) }; - let service_list = - Container::new(self.service_list()).padding(5); - let slide_preview = column![ Space::with_height(Length::Fill), Container::new( @@ -1035,14 +1032,23 @@ impl cosmic::Application for App { ] .spacing(3); + let service_list = Container::new(self.service_list()) + .padding(5) + .width(Length::FillPortion(2)); + let library = if self.library_open { - Container::new(if let Some(library) = &self.library { - library.view().map(Message::Library) - } else { - Space::new(0, 0).into() - }) - .style(nav_bar_style) - .center(Length::FillPortion(2)) + Container::new( + Container::new( + if let Some(library) = &self.library { + library.view().map(Message::Library) + } else { + Space::new(0, 0).into() + }, + ) + .style(nav_bar_style), + ) + .padding(5) + .width(Length::FillPortion(2)) } else { Container::new(horizontal_space().width(0)) }; @@ -1051,6 +1057,7 @@ impl cosmic::Application for App { self.song_editor.view().map(Message::SongEditor); let row = row![ + library, service_list, Container::new( button::icon(icon_left) @@ -1079,7 +1086,6 @@ impl cosmic::Application for App { ) .center_y(Length::Fill) .align_left(Length::FillPortion(1)), - library ] .width(Length::Fill) .height(Length::Fill) @@ -1273,7 +1279,9 @@ where let end_index = self.service.len(); let column = column![ - text::heading("Service List").center().width(280), + text::heading("Service List") + .center() + .width(Length::Fill), iced::widget::horizontal_rule(1), column(list).spacing(10), dnd_destination( @@ -1306,10 +1314,7 @@ where // .height(Length::Fill) .style(nav_bar_style); - if !self.core().is_condensed() { - container = container.max_width(280); - } - container.into() + container.center(Length::FillPortion(2)).into() } } diff --git a/src/ui/library.rs b/src/ui/library.rs index 56b47f6..c83760d 100644 --- a/src/ui/library.rs +++ b/src/ui/library.rs @@ -264,12 +264,18 @@ impl<'a> Library { let presentation_library = self.library_item(&self.presentation_library); let column = column![ + text::heading("Library").center().width(Length::Fill), + cosmic::iced::widget::horizontal_rule(1), song_library, image_library, video_library, presentation_library, - ]; - column.height(Length::Fill).spacing(5).into() + ] + .height(Length::Fill) + .padding(10) + .spacing(10) + .into(); + column } pub fn library_item( From 1446e35c58181531af0b80d8b8672d0cb0943199 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 27 Aug 2025 15:33:27 -0500 Subject: [PATCH 08/15] trying to figure out a more performant way to do svgs --- Cargo.lock | 113 +++++++++++++++++++++++++++++++++++--- Cargo.toml | 2 +- src/core/service_items.rs | 3 +- src/core/slide.rs | 70 +++++++++++------------ src/ui/text_svg.rs | 98 +++++++++++++++++++++------------ 5 files changed, 208 insertions(+), 78 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9de55f7..7de30a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1276,7 +1276,7 @@ dependencies = [ "log", "rangemap", "rustc-hash 1.1.0", - "rustybuzz", + "rustybuzz 0.14.1", "self_cell", "smol_str", "swash", @@ -2943,7 +2943,7 @@ dependencies = [ "iced_graphics", "kurbo 0.10.4", "log", - "resvg", + "resvg 0.42.0", "rustc-hash 2.1.1", "softbuffer", "tiny-skia", @@ -2984,7 +2984,7 @@ dependencies = [ "lyon", "once_cell", "raw-window-handle", - "resvg", + "resvg 0.42.0", "rustc-hash 2.1.1", "rustix 0.38.44", "thiserror 1.0.69", @@ -3166,12 +3166,28 @@ dependencies = [ "zune-jpeg", ] +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", +] + [[package]] name = "imagesize" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" +[[package]] +name = "imagesize" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" + [[package]] name = "immutable-chunkmap" version = "2.0.6" @@ -3643,6 +3659,7 @@ dependencies = [ "miette", "pretty_assertions", "rayon", + "resvg 0.45.1", "rodio", "ron 0.8.1", "serde", @@ -4927,6 +4944,12 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quick-xml" version = "0.37.5" @@ -5200,7 +5223,24 @@ dependencies = [ "rgb", "svgtypes", "tiny-skia", - "usvg", + "usvg 0.42.0", +] + +[[package]] +name = "resvg" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43" +dependencies = [ + "gif", + "image-webp", + "log", + "pico-args", + "rgb", + "svgtypes", + "tiny-skia", + "usvg 0.45.1", + "zune-jpeg", ] [[package]] @@ -5376,8 +5416,26 @@ dependencies = [ "libm", "smallvec", "ttf-parser 0.21.1", - "unicode-bidi-mirroring", - "unicode-ccc", + "unicode-bidi-mirroring 0.2.0", + "unicode-ccc 0.2.0", + "unicode-properties", + "unicode-script", +] + +[[package]] +name = "rustybuzz" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" +dependencies = [ + "bitflags 2.9.2", + "bytemuck", + "core_maths", + "log", + "smallvec", + "ttf-parser 0.25.1", + "unicode-bidi-mirroring 0.4.0", + "unicode-ccc 0.4.0", "unicode-properties", "unicode-script", ] @@ -6729,12 +6787,24 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" +[[package]] +name = "unicode-bidi-mirroring" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe" + [[package]] name = "unicode-ccc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" +[[package]] +name = "unicode-ccc" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" + [[package]] name = "unicode-ident" version = "1.0.18" @@ -6826,12 +6896,39 @@ dependencies = [ "data-url", "flate2", "fontdb 0.18.0", - "imagesize", + "imagesize 0.12.0", "kurbo 0.11.3", "log", "pico-args", "roxmltree", - "rustybuzz", + "rustybuzz 0.14.1", + "simplecss", + "siphasher", + "strict-num", + "svgtypes", + "tiny-skia-path", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", +] + +[[package]] +name = "usvg" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef" +dependencies = [ + "base64 0.22.1", + "data-url", + "flate2", + "fontdb 0.23.0", + "imagesize 0.13.0", + "kurbo 0.11.3", + "log", + "pico-args", + "roxmltree", + "rustybuzz 0.20.1", "simplecss", "siphasher", "strict-num", diff --git a/Cargo.toml b/Cargo.toml index fd26207..acda2ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ gstreamer-app = "0.23" url = "2" colors-transform = "0.2.11" rayon = "1.11.0" -# resvg = "0.45.1" +resvg = "0.45.1" # femtovg = { version = "0.16.0", features = ["wgpu"] } # wgpu = "26.0.1" # mupdf = "0.5.0" diff --git a/src/core/service_items.rs b/src/core/service_items.rs index 19c2301..2ee9893 100644 --- a/src/core/service_items.rs +++ b/src/core/service_items.rs @@ -6,6 +6,7 @@ use std::sync::Arc; use cosmic::iced::clipboard::mime::{AllowedMimeTypes, AsMimeTypes}; use crisp::types::{Keyword, Symbol, Value}; use miette::Result; +use resvg::usvg::fontdb; use tracing::{debug, error}; use crate::Slide; @@ -17,7 +18,7 @@ use super::videos::Video; use super::kinds::ServiceItemKind; -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct ServiceItem { pub id: i32, pub title: String, diff --git a/src/core/slide.rs b/src/core/slide.rs index a6cb45a..f54df80 100644 --- a/src/core/slide.rs +++ b/src/core/slide.rs @@ -2,10 +2,12 @@ use crisp::types::{Keyword, Symbol, Value}; use iced_video_player::Video; use miette::{miette, Result}; +use resvg::usvg::fontdb; use serde::{Deserialize, Serialize}; use std::{ fmt::Display, path::{Path, PathBuf}, + sync::Arc, }; use tracing::error; @@ -13,6 +15,40 @@ use crate::ui::text_svg::{self, TextSvg}; use super::songs::Song; +#[derive( + Clone, Debug, Default, PartialEq, Serialize, Deserialize, +)] +pub struct Slide { + id: i32, + background: Background, + text: String, + font: String, + font_size: i32, + text_alignment: TextAlignment, + audio: Option, + video_loop: bool, + video_start_time: f32, + video_end_time: f32, + #[serde(skip)] + pub text_svg: TextSvg, +} + +#[derive( + Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize, +)] +pub enum BackgroundKind { + #[default] + Image, + Video, +} + +#[derive(Debug, Clone, Default)] +struct Image { + pub source: String, + pub fit: String, + pub children: Vec, +} + #[derive( Clone, Copy, @@ -203,15 +239,6 @@ impl Display for ParseError { } } -#[derive( - Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize, -)] -pub enum BackgroundKind { - #[default] - Image, - Video, -} - impl From for BackgroundKind { fn from(value: String) -> Self { if value == "image" { @@ -222,24 +249,6 @@ impl From for BackgroundKind { } } -#[derive( - Clone, Debug, Default, PartialEq, Serialize, Deserialize, -)] -pub struct Slide { - id: i32, - background: Background, - text: String, - font: String, - font_size: i32, - text_alignment: TextAlignment, - audio: Option, - video_loop: bool, - video_start_time: f32, - video_end_time: f32, - #[serde(skip)] - pub text_svg: TextSvg, -} - impl From<&Slide> for Value { fn from(value: &Slide) -> Self { Self::List(vec![Self::Symbol(Symbol("slide".into()))]) @@ -656,13 +665,6 @@ impl SlideBuilder { } } -#[derive(Debug, Clone, Default)] -struct Image { - pub source: String, - pub fit: String, - pub children: Vec, -} - impl Image { fn new() -> Self { Self { diff --git a/src/ui/text_svg.rs b/src/ui/text_svg.rs index cbfd280..b04ec4c 100644 --- a/src/ui/text_svg.rs +++ b/src/ui/text_svg.rs @@ -1,22 +1,28 @@ use std::{ fmt::Display, hash::{Hash, Hasher}, + io::Read, + sync::Arc, }; use colors_transform::Rgb; use cosmic::{ iced::{ font::{Style, Weight}, - Length, Size, + ContentFit, Length, Size, }, prelude::*, - widget::{container, svg::Handle, Svg}, + widget::{container, image::Handle, Image}, }; -use tracing::error; +use resvg::{ + tiny_skia::{self, Pixmap}, + usvg::Tree, +}; +use tracing::{debug, error}; use crate::TextAlignment; -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default)] pub struct TextSvg { text: String, font: Font, @@ -25,6 +31,19 @@ pub struct TextSvg { fill: Color, alignment: TextAlignment, handle: Option, + fontdb: Arc, +} + +impl PartialEq for TextSvg { + fn eq(&self, other: &Self) -> bool { + self.text == other.text + && self.font == other.font + && self.shadow == other.shadow + && self.stroke == other.stroke + && self.fill == other.fill + && self.alignment == other.alignment + && self.handle == other.handle + } } impl Hash for TextSvg { @@ -46,6 +65,27 @@ pub struct Font { size: u8, } +#[derive(Clone, Debug, Default, PartialEq, Hash)] +pub struct Shadow { + pub offset_x: i16, + pub offset_y: i16, + pub spread: u16, + pub color: Color, +} + +#[derive(Clone, Debug, Default, PartialEq, Hash)] +pub struct Stroke { + size: u16, + color: Color, +} + +pub enum Message { + None, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct Color(Rgb); + impl From for Font { fn from(value: cosmic::font::Font) -> Self { Self { @@ -113,9 +153,6 @@ impl Font { } } -#[derive(Clone, Debug, PartialEq)] -pub struct Color(Rgb); - impl Hash for Color { fn hash(&self, state: &mut H) { self.0.to_css_hex_string().hash(state); @@ -158,24 +195,6 @@ impl Display for Color { } } -#[derive(Clone, Debug, Default, PartialEq, Hash)] -pub struct Shadow { - pub offset_x: i16, - pub offset_y: i16, - pub spread: u16, - pub color: Color, -} - -#[derive(Clone, Debug, Default, PartialEq, Hash)] -pub struct Stroke { - size: u16, - color: Color, -} - -pub enum Message { - None, -} - impl TextSvg { pub fn new(text: impl Into) -> Self { Self { @@ -234,7 +253,7 @@ impl TextSvg { } else { "".into() }; - let size = Size::new(640.0, 360.0); + let size = Size::new(1920.0, 1080.0); let total_lines = self.text.lines().count(); let half_lines = (total_lines / 2) as f32; let middle_position = size.height / 2.0; @@ -266,20 +285,31 @@ impl TextSvg { self.font.name, self.font.size, self.fill, stroke, text); - let handle = Handle::from_memory( - Box::leak( - ::clone(&final_svg) - .into_boxed_str(), - ) - .as_bytes(), - ); + debug!(?final_svg); + let resvg_tree = Tree::from_str( + &final_svg, + &resvg::usvg::Options { + fontdb: Arc::clone(&self.fontdb), + ..Default::default() + }, + ) + .expect("Woops mama"); + // debug!(?resvg_tree); + let transform = tiny_skia::Transform::default(); + let mut pixmap = + Pixmap::new(size.width as u32, size.height as u32) + .expect("opops"); + resvg::render(&resvg_tree, transform, &mut pixmap.as_mut()); + // debug!(?pixmap); + let handle = Handle::from_bytes(pixmap.data().to_owned()); self.handle = Some(handle); self } pub fn view<'a>(&self) -> Element<'a, Message> { container( - Svg::new(self.handle.clone().unwrap()) + Image::new(self.handle.clone().unwrap()) + .content_fit(ContentFit::Contain) .width(Length::Fill) .height(Length::Fill), ) From 4ccb186189b45bc5b6f9bb8f3233e689a5aeea81 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 29 Aug 2025 16:41:24 -0500 Subject: [PATCH 09/15] closer to using these text_svgs --- src/core/service_items.rs | 8 ++--- src/core/slide.rs | 63 ++++++++++++++------------------------- src/main.rs | 48 ++++++++++++++++++++++------- src/ui/presenter.rs | 11 +++++-- src/ui/song_editor.rs | 12 ++++---- src/ui/text_svg.rs | 45 ++++++++++++++++++++-------- 6 files changed, 112 insertions(+), 75 deletions(-) diff --git a/src/core/service_items.rs b/src/core/service_items.rs index 2ee9893..76e99cc 100644 --- a/src/core/service_items.rs +++ b/src/core/service_items.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use std::cmp::Ordering; use std::ops::Deref; -use std::sync::Arc; +use std::sync::{Arc, Mutex}; use cosmic::iced::clipboard::mime::{AllowedMimeTypes, AsMimeTypes}; use crisp::types::{Keyword, Symbol, Value}; @@ -24,7 +24,7 @@ pub struct ServiceItem { pub title: String, pub database_id: i32, pub kind: ServiceItemKind, - pub slides: Arc<[Slide]>, + pub slides: Vec, // pub item: Box, } @@ -122,7 +122,7 @@ impl Default for ServiceItem { title: String::default(), database_id: 0, kind: ServiceItemKind::Content(Slide::default()), - slides: Arc::new([]), + slides: vec![], // item: Box::new(Image::default()), } } @@ -172,7 +172,7 @@ impl From<&Value> for ServiceItem { kind: ServiceItemKind::Content( slide.clone(), ), - slides: Arc::new([slide]), + slides: vec![slide], } } else if let Some(background) = list.get(background_pos) diff --git a/src/core/slide.rs b/src/core/slide.rs index f54df80..d1ef8b6 100644 --- a/src/core/slide.rs +++ b/src/core/slide.rs @@ -30,7 +30,7 @@ pub struct Slide { video_start_time: f32, video_end_time: f32, #[serde(skip)] - pub text_svg: TextSvg, + pub text_svg: Option, } #[derive( @@ -261,6 +261,11 @@ impl Slide { self } + pub fn with_text_svg(mut self, text_svg: TextSvg) -> Self { + self.text_svg = Some(text_svg); + self + } + pub fn set_font(mut self, font: impl AsRef) -> Self { self.font = font.as_ref().into(); self @@ -284,6 +289,10 @@ impl Slide { self.text.clone() } + pub fn text_alignment(&self) -> TextAlignment { + self.text_alignment.clone() + } + pub fn font_size(&self) -> i32 { self.font_size } @@ -623,45 +632,19 @@ impl SlideBuilder { let Some(video_end_time) = self.video_end_time else { return Err(miette!("No video_end_time")); }; - if let Some(text_svg) = self.text_svg { - Ok(Slide { - background, - text, - font, - font_size, - text_alignment, - audio: self.audio, - video_loop, - video_start_time, - video_end_time, - text_svg, - ..Default::default() - }) - } else { - let text_svg = TextSvg::new(text.clone()) - .alignment(text_alignment) - .fill("#fff") - .shadow(text_svg::shadow(2, 2, 5, "#000000")) - .stroke(text_svg::stroke(3, "#000")) - .font( - text_svg::Font::from(font.clone()) - .size(font_size.try_into().unwrap()), - ) - .build(); - Ok(Slide { - background, - text, - font, - font_size, - text_alignment, - audio: self.audio, - video_loop, - video_start_time, - video_end_time, - text_svg, - ..Default::default() - }) - } + Ok(Slide { + background, + text, + font, + font_size, + text_alignment, + audio: self.audio, + video_loop, + video_start_time, + video_end_time, + text_svg: self.text_svg, + ..Default::default() + }) } } diff --git a/src/main.rs b/src/main.rs index 1a9eb64..202205c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,8 +28,10 @@ use crisp::types::Value; use lisp::parse_lisp; use miette::{miette, Result}; use rayon::prelude::*; +use resvg::usvg::fontdb; use std::fs::read_to_string; use std::path::PathBuf; +use std::sync::Arc; use tracing::{debug, level_filters::LevelFilter}; use tracing::{error, warn}; use tracing_subscriber::EnvFilter; @@ -38,6 +40,8 @@ use ui::presenter::{self, Presenter}; use ui::song_editor::{self, SongEditor}; use ui::EditorMode; +use crate::ui::text_svg; + pub mod core; pub mod lisp; pub mod ui; @@ -111,6 +115,7 @@ struct App { song_editor: SongEditor, searching: bool, library_dragged_item: Option, + fontdb: Arc, } #[derive(Debug, Clone)] @@ -159,15 +164,19 @@ impl cosmic::Application for App { debug!("init"); let nav_model = nav_bar::Model::default(); + let mut fontdb = fontdb::Database::new(); + fontdb.load_system_fonts(); + let fontdb = Arc::new(fontdb); + let mut windows = vec![]; if input.ui { windows.push(core.main_window_id().unwrap()); } - let items = match read_to_string(input.file) { + let mut items = match read_to_string(input.file) { Ok(lisp) => { - let mut slide_vector = vec![]; + let mut service_items = vec![]; let lisp = crisp::reader::read(&lisp); match lisp { Value::List(vec) => { @@ -178,12 +187,12 @@ impl cosmic::Application for App { // slide_vector.append(items); for value in vec { let mut inner_vector = parse_lisp(value); - slide_vector.append(&mut inner_vector); + service_items.append(&mut inner_vector); } } _ => todo!(), } - slide_vector + service_items } Err(e) => { warn!("Missing file or could not read: {e}"); @@ -191,15 +200,32 @@ impl cosmic::Application for App { } }; + let items: Vec = items + .into_par_iter() + .map(|mut item| { + item.slides = item + .slides + .into_par_iter() + .map(|mut slide| { + text_svg::text_svg_generator( + &mut slide, + Arc::clone(&fontdb), + ); + slide + }) + .collect(); + item + }) + .collect(); + let presenter = Presenter::with_items(items.clone()); - let song_editor = SongEditor::new(); + let song_editor = SongEditor::new(Arc::clone(&fontdb)); // for item in items.iter() { // nav_model.insert().text(item.title()).data(item.clone()); // } // nav_model.activate_position(0); - let mut app = App { presenter, core, @@ -217,6 +243,7 @@ impl cosmic::Application for App { searching: false, current_item: (0, 0), library_dragged_item: None, + fontdb, }; let mut batch = vec![]; @@ -1289,11 +1316,10 @@ where vec!["application/service-item".into()] ) .data_received_for::(|item| { - if let Some(item) = item { - Message::AppendServiceItem(item) - } else { - Message::None - } + item.map_or_else( + || Message::None, + |item| Message::AppendServiceItem(item), + ) }) .on_finish( move |mime, data, action, x, y| { diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index 779e964..565cead 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -1,4 +1,5 @@ use miette::{IntoDiagnostic, Result}; +use resvg::usvg::fontdb; use std::{fs::File, io::BufReader, path::PathBuf, sync::Arc}; use cosmic::{ @@ -30,7 +31,7 @@ use url::Url; use crate::{ core::{service_items::ServiceItem, slide::Slide}, - // ui::widgets::slide_text, + ui::text_svg, BackgroundKind, }; @@ -148,6 +149,7 @@ impl Presenter { }; let total_slides: usize = items.iter().fold(0, |a, item| a + item.slides.len()); + Self { current_slide: items[0].slides[0].clone(), current_item: 0, @@ -741,7 +743,12 @@ pub(crate) fn slide_view( .align_x(Horizontal::Left) } else { // SVG based - let text = slide.text_svg.view().map(|m| Message::None); + let text: Element = + if let Some(text) = &slide.text_svg { + text.view().map(|_| Message::None).into() + } else { + Space::with_width(0).into() + }; Container::new(text) .center(Length::Fill) .align_x(Horizontal::Left) diff --git a/src/ui/song_editor.rs b/src/ui/song_editor.rs index 89ebf89..943379c 100644 --- a/src/ui/song_editor.rs +++ b/src/ui/song_editor.rs @@ -1,4 +1,4 @@ -use std::{io, path::PathBuf}; +use std::{io, path::PathBuf, sync::Arc}; use cosmic::{ dialog::file_chooser::open::Dialog, @@ -31,7 +31,7 @@ use super::presenter::slide_view; pub struct SongEditor { pub song: Option, title: String, - font_db: fontdb::Database, + font_db: Arc, fonts: Vec<(fontdb::ID, String)>, fonts_combo: combo_box::State, font_sizes: combo_box::State, @@ -72,11 +72,9 @@ pub enum Message { } impl SongEditor { - pub fn new() -> Self { + pub fn new(font_db: Arc) -> Self { let fonts = font_dir(); debug!(?fonts); - let mut font_db = fontdb::Database::new(); - font_db.load_system_fonts(); let mut fonts: Vec<(fontdb::ID, String)> = font_db .faces() .map(|f| { @@ -447,7 +445,9 @@ order", impl Default for SongEditor { fn default() -> Self { - Self::new() + let mut fontdb = fontdb::Database::new(); + fontdb.load_system_fonts(); + Self::new(Arc::new(fontdb)) } } diff --git a/src/ui/text_svg.rs b/src/ui/text_svg.rs index b04ec4c..e8e185a 100644 --- a/src/ui/text_svg.rs +++ b/src/ui/text_svg.rs @@ -16,7 +16,7 @@ use cosmic::{ }; use resvg::{ tiny_skia::{self, Pixmap}, - usvg::Tree, + usvg::{fontdb, Tree}, }; use tracing::{debug, error}; @@ -230,6 +230,11 @@ impl TextSvg { self } + pub fn fontdb(mut self, fontdb: Arc) -> Self { + self.fontdb = fontdb; + self + } + pub fn alignment(mut self, alignment: TextAlignment) -> Self { self.alignment = alignment; self @@ -285,7 +290,7 @@ impl TextSvg { self.font.name, self.font.size, self.fill, stroke, text); - debug!(?final_svg); + // debug!(?final_svg); let resvg_tree = Tree::from_str( &final_svg, &resvg::usvg::Options { @@ -301,21 +306,17 @@ impl TextSvg { .expect("opops"); resvg::render(&resvg_tree, transform, &mut pixmap.as_mut()); // debug!(?pixmap); - let handle = Handle::from_bytes(pixmap.data().to_owned()); + let handle = Handle::from_bytes(pixmap.take()); self.handle = Some(handle); self } pub fn view<'a>(&self) -> Element<'a, Message> { - container( - Image::new(self.handle.clone().unwrap()) - .content_fit(ContentFit::Contain) - .width(Length::Fill) - .height(Length::Fill), - ) - .width(Length::Fill) - .height(Length::Fill) - .into() + Image::new(self.handle.clone().unwrap()) + .content_fit(ContentFit::Contain) + .width(Length::Fill) + .height(Length::Fill) + .into() } fn text_spans(&self) -> Vec { @@ -352,6 +353,26 @@ pub fn color(color: impl AsRef) -> Color { Color::from_hex_str(color) } +pub fn text_svg_generator( + slide: &mut crate::core::slide::Slide, + fontdb: Arc, +) { + if slide.text().len() > 0 { + let text_svg = TextSvg::new(slide.text()) + .alignment(slide.text_alignment()) + .fill("#fff") + .shadow(shadow(2, 2, 5, "#000000")) + .stroke(stroke(3, "#000")) + .font( + Font::from(slide.font().clone()) + .size(slide.font_size().try_into().unwrap()), + ) + .fontdb(Arc::clone(&fontdb)) + .build(); + slide.text_svg = Some(text_svg); + } +} + #[cfg(test)] mod test { use pretty_assertions::assert_eq; From 23cd34388b11dc081c9ba5888e053bf55102cdb9 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 2 Sep 2025 09:19:10 -0500 Subject: [PATCH 10/15] update todo --- todo.org | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/todo.org b/todo.org index 005086d..427d985 100644 --- a/todo.org +++ b/todo.org @@ -16,6 +16,10 @@ Actually, what if we just made the svg at load/creation time and stored it in th ** SVG performs badly Since SVG's apparently run poorly in iced, instead I'll need to see about either creating a new text element, or teaching Iced to render strokes and shadows on text. +** Fork Cryoglyph +This fork will render text 3 times. Once for the text, once for the stroke, once for the shadow. This will only be used in the slides and therefore should not be much of a performance hit since we will only be render 3 copies of the given text. This should not be bad performance since it's not a large amount of text. + +This also means in our custom widget with our custom fork, we can animate each individually perhaps. * TODO [#C] Make the presenter more modular so things are easier to change. From 4792304d8b75af1e159324d44c66be14a3c06fe3 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 2 Sep 2025 09:19:17 -0500 Subject: [PATCH 11/15] remove unused use statements --- src/ui/presenter.rs | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index 565cead..5a604b5 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -1,38 +1,37 @@ use miette::{IntoDiagnostic, Result}; -use resvg::usvg::fontdb; use std::{fs::File, io::BufReader, path::PathBuf, sync::Arc}; use cosmic::{ + Task, iced::{ + Background, Border, Color, ContentFit, Font, Length, Shadow, + Vector, alignment::Horizontal, border, font::{Family, Stretch, Style, Weight}, - Background, Border, Color, ContentFit, Font, Length, Shadow, - Vector, }, iced_widget::{ rich_text, scrollable::{ - scroll_to, AbsoluteOffset, Direction, Scrollbar, + AbsoluteOffset, Direction, Scrollbar, scroll_to, }, span, stack, vertical_rule, }, prelude::*, widget::{ - container, image, mouse_area, responsive, scrollable, text, - Column, Container, Id, Row, Space, + Column, Container, Id, Row, Space, container, image, + mouse_area, responsive, scrollable, text, }, - Task, }; -use iced_video_player::{gst_pbutils, Position, Video, VideoPlayer}; +use iced_video_player::{Position, Video, VideoPlayer, gst_pbutils}; use rodio::{Decoder, OutputStream, Sink}; use tracing::{debug, error, info, warn}; use url::Url; use crate::{ + BackgroundKind, core::{service_items::ServiceItem, slide::Slide}, ui::text_svg, - BackgroundKind, }; const REFERENCE_WIDTH: f32 = 1920.0; @@ -133,7 +132,9 @@ impl Presenter { Some(v) } Err(e) => { - error!("Had an error creating the video object: {e}, likely the first slide isn't a video"); + error!( + "Had an error creating the video object: {e}, likely the first slide isn't a video" + ); None } } @@ -379,7 +380,7 @@ impl Presenter { self.hovered_slide = slide; } Message::StartAudio => { - return Action::Task(self.start_audio()) + return Action::Task(self.start_audio()); } Message::EndAudio => { self.sink.1.stop(); @@ -642,7 +643,9 @@ impl Presenter { self.video = Some(v) } Err(e) => { - error!("Had an error creating the video object: {e}"); + error!( + "Had an error creating the video object: {e}" + ); self.video = None; } } From d6b4cc6297bb1ec721e400722a006d785751c24f Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 2 Sep 2025 15:27:38 -0500 Subject: [PATCH 12/15] some ui tweaks --- src/ui/library.rs | 58 +++++++++++++++++++++++++++++++++++++++------ src/ui/presenter.rs | 16 ++++++------- src/ui/text_svg.rs | 6 +++-- 3 files changed, 63 insertions(+), 17 deletions(-) diff --git a/src/ui/library.rs b/src/ui/library.rs index c83760d..5c67fa5 100644 --- a/src/ui/library.rs +++ b/src/ui/library.rs @@ -460,14 +460,45 @@ impl<'a> Library { })) .center_y(20) .center_x(Length::Fill); - let subtext = container(responsive(|size| { + let subtext = container(responsive(move |size| { let color: Color = if item.background().is_some() { - theme::active().cosmic().accent_text_color().into() + if let Some((library, selected)) = self.selected_item + { + if model.kind == library + && selected == index as i32 + { + theme::active().cosmic().control_0().into() + } else { + theme::active() + .cosmic() + .accent_text_color() + .into() + } + } else { + theme::active() + .cosmic() + .accent_text_color() + .into() + } } else { - theme::active() - .cosmic() - .destructive_text_color() - .into() + if let Some((library, selected)) = self.selected_item + { + if model.kind == library + && selected == index as i32 + { + theme::active().cosmic().control_0().into() + } else { + theme::active() + .cosmic() + .destructive_text_color() + .into() + } + } else { + theme::active() + .cosmic() + .destructive_text_color() + .into() + } }; text::body(elide_text(item.subtext(), size.width)) .center() @@ -498,7 +529,19 @@ impl<'a> Library { { t.cosmic().accent.selected.into() } else { - t.cosmic().button.base.into() + if let Some((library, hovered)) = + self.hovered_item + { + if model.kind == library + && hovered == index as i32 + { + t.cosmic().button.hover.into() + } else { + t.cosmic().button.base.into() + } + } else { + t.cosmic().button.base.into() + } } } else if let Some((library, hovered)) = self.hovered_item @@ -519,6 +562,7 @@ impl<'a> Library { .rounded(t.cosmic().corner_radii.radius_m), ) }) + .padding([3, 0]) .into() } diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index 5a604b5..5880d8a 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -2,36 +2,36 @@ use miette::{IntoDiagnostic, Result}; use std::{fs::File, io::BufReader, path::PathBuf, sync::Arc}; use cosmic::{ - Task, iced::{ - Background, Border, Color, ContentFit, Font, Length, Shadow, - Vector, alignment::Horizontal, border, font::{Family, Stretch, Style, Weight}, + Background, Border, Color, ContentFit, Font, Length, Shadow, + Vector, }, iced_widget::{ rich_text, scrollable::{ - AbsoluteOffset, Direction, Scrollbar, scroll_to, + scroll_to, AbsoluteOffset, Direction, Scrollbar, }, span, stack, vertical_rule, }, prelude::*, widget::{ - Column, Container, Id, Row, Space, container, image, - mouse_area, responsive, scrollable, text, + container, image, mouse_area, responsive, scrollable, text, + Column, Container, Id, Row, Space, }, + Task, }; -use iced_video_player::{Position, Video, VideoPlayer, gst_pbutils}; +use iced_video_player::{gst_pbutils, Position, Video, VideoPlayer}; use rodio::{Decoder, OutputStream, Sink}; use tracing::{debug, error, info, warn}; use url::Url; use crate::{ - BackgroundKind, core::{service_items::ServiceItem, slide::Slide}, ui::text_svg, + BackgroundKind, }; const REFERENCE_WIDTH: f32 = 1920.0; diff --git a/src/ui/text_svg.rs b/src/ui/text_svg.rs index e8e185a..a2e844a 100644 --- a/src/ui/text_svg.rs +++ b/src/ui/text_svg.rs @@ -290,7 +290,7 @@ impl TextSvg { self.font.name, self.font.size, self.fill, stroke, text); - // debug!(?final_svg); + debug!("starting..."); let resvg_tree = Tree::from_str( &final_svg, &resvg::usvg::Options { @@ -299,15 +299,17 @@ impl TextSvg { }, ) .expect("Woops mama"); - // debug!(?resvg_tree); + debug!("parsed"); let transform = tiny_skia::Transform::default(); let mut pixmap = Pixmap::new(size.width as u32, size.height as u32) .expect("opops"); resvg::render(&resvg_tree, transform, &mut pixmap.as_mut()); // debug!(?pixmap); + debug!("rendered"); let handle = Handle::from_bytes(pixmap.take()); self.handle = Some(handle); + debug!("stored"); self } From 6c8cb6c5b24fce05191342fb77356e34061889b1 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 3 Sep 2025 15:49:35 -0500 Subject: [PATCH 13/15] hey we are rasterizing right, just not loading into handle --- src/ui/presenter.rs | 206 ++++++++++++++++++++++++-------------------- src/ui/text_svg.rs | 19 ++-- 2 files changed, 128 insertions(+), 97 deletions(-) diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index 5880d8a..183208d 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -19,7 +19,7 @@ use cosmic::{ prelude::*, widget::{ container, image, mouse_area, responsive, scrollable, text, - Column, Container, Id, Row, Space, + Column, Container, Id, Image, Row, Space, }, Task, }; @@ -707,91 +707,100 @@ pub(crate) fn slide_view( let slide_text = slide.text(); // let font = SvgFont::from(font).size(font_size.floor() as u8); - let text_container = if delegate { - // text widget based - let font_size = - scale_font(slide.font_size() as f32, width); - let lines = slide_text.lines(); - let text: Vec> = lines - .map(|t| { - rich_text([span(format!("{}\n", t)) - .background( - Background::Color(Color::BLACK) - .scale_alpha(0.4), - ) - .border(border::rounded(10)) - .padding(10)]) - .size(font_size) - .font(font) - .center() - .into() - // let chars: Vec = t - // .chars() - // .map(|c| -> Span { - // let character: String = format!("{}/n", c); - // span(character) - // .size(font_size) - // .font(font) - // .background( - // Background::Color(Color::BLACK) - // .scale_alpha(0.4), - // ) - // .border(border::rounded(10)) - // .padding(10) - }) - .collect(); - let text = Column::with_children(text).spacing(26); - Container::new(text) - .center(Length::Fill) - .align_x(Horizontal::Left) - } else { - // SVG based - let text: Element = - if let Some(text) = &slide.text_svg { - text.view().map(|_| Message::None).into() - } else { - Space::with_width(0).into() - }; - Container::new(text) - .center(Length::Fill) - .align_x(Horizontal::Left) - // text widget based - // let font_size = - // scale_font(slide.font_size() as f32, width); - // let lines = slide_text.lines(); - // let text: Vec> = lines - // .map(|t| { - // rich_text([span(format!("{}\n", t)) - // .background( - // Background::Color(Color::BLACK) - // .scale_alpha(0.4), - // ) - // .border(border::rounded(10)) - // .padding(10)]) - // .size(font_size) - // .font(font) - // .center() - // .into() - // // let chars: Vec = t - // // .chars() - // // .map(|c| -> Span { - // // let character: String = format!("{}/n", c); - // // span(character) - // // .size(font_size) - // // .font(font) - // // .background( - // // Background::Color(Color::BLACK) - // // .scale_alpha(0.4), - // // ) - // // .border(border::rounded(10)) - // // .padding(10) - // }) - // .collect(); - // let text = Column::with_children(text).spacing(26); - // Container::new(text) - // .center(Length::Fill) - // .align_x(Horizontal::Left) - }; + // let text_container = if delegate { + // // text widget based + // let font_size = + // scale_font(slide.font_size() as f32, width); + // let lines = slide_text.lines(); + // let text: Vec> = lines + // .map(|t| { + // rich_text([span(format!("{}\n", t)) + // .background( + // Background::Color(Color::BLACK) + // .scale_alpha(0.4), + // ) + // .border(border::rounded(10)) + // .padding(10)]) + // .size(font_size) + // .font(font) + // .center() + // .into() + // // let chars: Vec = t + // // .chars() + // // .map(|c| -> Span { + // // let character: String = format!("{}/n", c); + // // span(character) + // // .size(font_size) + // // .font(font) + // // .background( + // // Background::Color(Color::BLACK) + // // .scale_alpha(0.4), + // // ) + // // .border(border::rounded(10)) + // // .padding(10) + // }) + // .collect(); + // let text = Column::with_children(text).spacing(26); + // Container::new(text) + // .center(Length::Fill) + // .align_x(Horizontal::Left) + // } else { + // // SVG based + // let text: Element = + // if let Some(text) = &slide.text_svg { + // if let Some(handle) = &text.handle { + // debug!("we made it boys"); + // Image::new(handle) + // .content_fit(ContentFit::Cover) + // .width(Length::Fill) + // .height(Length::Fill) + // .into() + // } else { + // Space::with_width(0).into() + // } + // } else { + // Space::with_width(0).into() + // }; + // Container::new(text) + // .center(Length::Fill) + // .align_x(Horizontal::Left) + // // text widget based + // // let font_size = + // // scale_font(slide.font_size() as f32, width); + // // let lines = slide_text.lines(); + // // let text: Vec> = lines + // // .map(|t| { + // // rich_text([span(format!("{}\n", t)) + // // .background( + // // Background::Color(Color::BLACK) + // // .scale_alpha(0.4), + // // ) + // // .border(border::rounded(10)) + // // .padding(10)]) + // // .size(font_size) + // // .font(font) + // // .center() + // // .into() + // // // let chars: Vec = t + // // // .chars() + // // // .map(|c| -> Span { + // // // let character: String = format!("{}/n", c); + // // // span(character) + // // // .size(font_size) + // // // .font(font) + // // // .background( + // // // Background::Color(Color::BLACK) + // // // .scale_alpha(0.4), + // // // ) + // // // .border(border::rounded(10)) + // // // .padding(10) + // // }) + // // .collect(); + // // let text = Column::with_children(text).spacing(26); + // // Container::new(text) + // // .center(Length::Fill) + // // .align_x(Horizontal::Left) + // }; // let stroke_text_container = Container::new(stroke_text) // .center(Length::Fill) @@ -799,6 +808,22 @@ pub(crate) fn slide_view( // let text_stack = // stack!(stroke_text_container, text_container); + + let text: Element = + if let Some(text) = &slide.text_svg { + if let Some(handle) = &text.handle { + debug!("we made it boys"); + Image::new(handle) + .content_fit(ContentFit::Cover) + .width(Length::Fill) + .height(Length::Fill) + .into() + } else { + Space::with_width(0).into() + } + } else { + Space::with_width(0).into() + }; let black = Container::new(Space::new(0, 0)) .style(|_| { container::background(Background::Color(Color::BLACK)) @@ -806,7 +831,7 @@ pub(crate) fn slide_view( .clip(true) .width(width) .height(size.height); - let container = match slide.background().kind { + let background = match slide.background().kind { BackgroundKind::Image => { let path = slide.background().path.clone(); Container::new( @@ -855,11 +880,8 @@ pub(crate) fn slide_view( } } }; - let stack = stack!( - black, - container.center(Length::Fill), - text_container - ); + let stack = + stack!(black, background.center(Length::Fill), text); Container::new(stack).center(Length::Fill).into() }); // let vid = if let Some(video) = &video { diff --git a/src/ui/text_svg.rs b/src/ui/text_svg.rs index a2e844a..a70055f 100644 --- a/src/ui/text_svg.rs +++ b/src/ui/text_svg.rs @@ -2,6 +2,7 @@ use std::{ fmt::Display, hash::{Hash, Hasher}, io::Read, + path::PathBuf, sync::Arc, }; @@ -30,7 +31,7 @@ pub struct TextSvg { stroke: Option, fill: Color, alignment: TextAlignment, - handle: Option, + pub handle: Option, fontdb: Arc, } @@ -258,7 +259,7 @@ impl TextSvg { } else { "".into() }; - let size = Size::new(1920.0, 1080.0); + let size = Size::new(3840.0, 2160.0); let total_lines = self.text.lines().count(); let half_lines = (total_lines / 2) as f32; let middle_position = size.height / 2.0; @@ -291,8 +292,8 @@ impl TextSvg { self.font.size, self.fill, stroke, text); debug!("starting..."); - let resvg_tree = Tree::from_str( - &final_svg, + let resvg_tree = Tree::from_data( + &final_svg.as_bytes(), &resvg::usvg::Options { fontdb: Arc::clone(&self.fontdb), ..Default::default() @@ -306,6 +307,14 @@ impl TextSvg { .expect("opops"); resvg::render(&resvg_tree, transform, &mut pixmap.as_mut()); // debug!(?pixmap); + // let mut path = dirs::data_local_dir().unwrap(); + // path.push(PathBuf::from("lumina")); + // path.push(PathBuf::from("temp")); + // let file_title = + // &self.text.lines().next().unwrap().trim_end(); + // path.push(PathBuf::from(file_title)); + // path.set_extension("png"); + // let _ = pixmap.save_png(path); debug!("rendered"); let handle = Handle::from_bytes(pixmap.take()); self.handle = Some(handle); @@ -315,7 +324,7 @@ impl TextSvg { pub fn view<'a>(&self) -> Element<'a, Message> { Image::new(self.handle.clone().unwrap()) - .content_fit(ContentFit::Contain) + .content_fit(ContentFit::Cover) .width(Length::Fill) .height(Length::Fill) .into() From 035f8896f180f293c78ab9fae006b2ad7c7654b6 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 5 Sep 2025 13:05:54 -0500 Subject: [PATCH 14/15] updating to use the in memory rendered images for text --- Cargo.lock | 429 ++++++++++++++++++++++++++++++++++++++++++-- Cargo.toml | 1 + src/main.rs | 98 +++++----- src/ui/presenter.rs | 1 - src/ui/text_svg.rs | 17 +- todo.org | 1 + 6 files changed, 482 insertions(+), 65 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7de30a3..106d5e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,6 +141,15 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + [[package]] name = "allocator-api2" version = "0.2.21" @@ -267,6 +276,12 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "anyhow" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" + [[package]] name = "apply" version = "0.3.0" @@ -282,6 +297,23 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "arrayref" version = "0.3.9" @@ -614,6 +646,29 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "av1-grain" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3efb2ca85bc610acfa917b5aaa36f3fcbebed5b3182d7f877b02531c4b80c8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c8fbc0f831f4519fe8b810b6a7a91410ec83031b8233f730a0480029f6a23f" +dependencies = [ + "arrayvec", +] + [[package]] name = "backtrace" version = "0.3.75" @@ -689,6 +744,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" +[[package]] +name = "bit_field" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" + [[package]] name = "bitflags" version = "1.3.2" @@ -704,6 +765,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bitstream-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2" + [[package]] name = "block" version = "0.1.6" @@ -750,6 +817,12 @@ dependencies = [ "piper", ] +[[package]] +name = "built" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ed6191a7e78c36abdb16ab65341eefd73d64d303fffccdbb00d51e4205967b" + [[package]] name = "bumpalo" version = "3.19.0" @@ -852,6 +925,16 @@ dependencies = [ "nom", ] +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon 0.12.16", +] + [[package]] name = "cfg-expr" version = "0.20.2" @@ -859,7 +942,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d458d63f0f0f482c8da9b7c8b76c21bd885a02056cc94c6404d861ca2b8206" dependencies = [ "smallvec", - "target-lexicon", + "target-lexicon 0.13.2", ] [[package]] @@ -1796,6 +1879,26 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -1886,6 +1989,21 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "exr" +version = "1.73.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + [[package]] name = "extended" version = "0.1.0" @@ -1913,6 +2031,26 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[package]] +name = "fax" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" +dependencies = [ + "fax_derive", +] + +[[package]] +name = "fax_derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "fd-lock" version = "4.0.4" @@ -2300,7 +2438,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", + "system-deps 7.0.5", "windows-sys 0.59.0", ] @@ -2362,7 +2500,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ab79e1ed126803a8fb827e3de0e2ff95191912b8db65cee467edb56fc4cc215" dependencies = [ "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2400,7 +2538,7 @@ checksum = "ec9aca94bb73989e3cfdbf8f2e0f1f6da04db4d291c431f444838925c4c63eda" dependencies = [ "glib-sys", "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2511,7 +2649,7 @@ dependencies = [ "gstreamer-base-sys", "gstreamer-sys", "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2541,7 +2679,7 @@ dependencies = [ "gstreamer-base-sys", "gstreamer-sys", "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2568,7 +2706,7 @@ dependencies = [ "gobject-sys", "gstreamer-sys", "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2598,7 +2736,7 @@ dependencies = [ "gstreamer-sys", "gstreamer-video-sys", "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2610,7 +2748,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -2641,7 +2779,7 @@ dependencies = [ "gstreamer-base-sys", "gstreamer-sys", "libc", - "system-deps", + "system-deps 7.0.5", ] [[package]] @@ -3154,14 +3292,24 @@ dependencies = [ [[package]] name = "image" -version = "0.25.6" +version = "0.25.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" +checksum = "529feb3e6769d234375c4cf1ee2ce713682b8e76538cb13f9fc23e1400a591e7" dependencies = [ "bytemuck", "byteorder-lite", + "color_quant", + "exr", + "gif", + "image-webp", + "moxcms", "num-traits", - "png", + "png 0.18.0", + "qoi", + "ravif", + "rayon", + "rgb", + "tiff", "zune-core", "zune-jpeg", ] @@ -3188,6 +3336,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" +[[package]] +name = "imgref" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408" + [[package]] name = "immutable-chunkmap" version = "2.0.6" @@ -3257,6 +3411,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -3291,6 +3456,15 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -3448,6 +3622,12 @@ dependencies = [ "spin", ] +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + [[package]] name = "lewton" version = "0.10.2" @@ -3534,6 +3714,16 @@ dependencies = [ "zbus 5.9.0", ] +[[package]] +name = "libfuzzer-sys" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5037190e1f70cbeef565bd267599242926f724d3b8a9f510fd7e0b540cfa4404" +dependencies = [ + "arbitrary", + "cc", +] + [[package]] name = "libloading" version = "0.8.8" @@ -3637,6 +3827,15 @@ version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + [[package]] name = "lru" version = "0.12.5" @@ -3654,6 +3853,7 @@ dependencies = [ "gstreamer", "gstreamer-app", "iced_video_player", + "image", "lexpr", "libcosmic", "miette", @@ -3753,6 +3953,16 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + [[package]] name = "md-5" version = "0.10.6" @@ -3892,6 +4102,16 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "moxcms" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd32fa8935aeadb8a8a6b6b351e40225570a37c43de67690383d87ef170cd08" +dependencies = [ + "num-traits", + "pxfm", +] + [[package]] name = "muldiv" version = "1.0.1" @@ -3978,6 +4198,12 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + [[package]] name = "nibble_vec" version = "0.1.0" @@ -4034,6 +4260,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + [[package]] name = "notify" version = "8.2.0" @@ -4068,6 +4300,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + [[package]] name = "num-bigint-dig" version = "0.8.4" @@ -4128,6 +4370,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ + "num-bigint", "num-integer", "num-traits", ] @@ -4821,6 +5064,19 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "png" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" +dependencies = [ + "bitflags 2.9.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + [[package]] name = "polling" version = "2.8.0" @@ -4943,6 +5199,37 @@ name = "profiling" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" +dependencies = [ + "quote", + "syn 2.0.106", +] + +[[package]] +name = "pxfm" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e790881194f6f6e86945f0a42a6981977323669aeb6c40e9c7ec253133b96f8" +dependencies = [ + "num-traits", +] + +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] [[package]] name = "quick-error" @@ -5055,6 +5342,56 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93e7e49bb0bf967717f7bd674458b3d6b0c5f48ec7e3038166026a69fc22223" +[[package]] +name = "rav1e" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.12.1", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "once_cell", + "paste", + "profiling", + "rand 0.8.5", + "rand_chacha 0.3.1", + "simd_helpers", + "system-deps 6.2.2", + "thiserror 1.0.69", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.11.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5825c26fddd16ab9f515930d49028a630efec172e903483c94796cfe31893e6b" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + [[package]] name = "raw-window-handle" version = "0.6.2" @@ -5701,6 +6038,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + [[package]] name = "simplecss" version = "0.2.2" @@ -6362,13 +6708,26 @@ dependencies = [ "libc", ] +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr 0.15.8", + "heck 0.5.0", + "pkg-config", + "toml", + "version-compare", +] + [[package]] name = "system-deps" version = "7.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4be53aa0cba896d2dc615bd42bbc130acdcffa239e0a2d965ea5b3b2a86ffdb" dependencies = [ - "cfg-expr", + "cfg-expr 0.20.2", "heck 0.5.0", "pkg-config", "toml", @@ -6386,6 +6745,12 @@ dependencies = [ "slotmap", ] +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + [[package]] name = "target-lexicon" version = "0.13.2" @@ -6489,6 +6854,20 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "tiff" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af9605de7fee8d9551863fd692cce7637f548dbd9db9180fcc07ccc6d26c336f" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + [[package]] name = "time" version = "0.3.41" @@ -6533,7 +6912,7 @@ dependencies = [ "bytemuck", "cfg-if", "log", - "png", + "png 0.17.16", "tiny-skia-path", ] @@ -6958,6 +7337,17 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "v_frame" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.1" @@ -8275,6 +8665,15 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + [[package]] name = "zune-jpeg" version = "0.4.20" diff --git a/Cargo.toml b/Cargo.toml index acda2ac..b9bc246 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,6 +33,7 @@ url = "2" colors-transform = "0.2.11" rayon = "1.11.0" resvg = "0.45.1" +image = "0.25.8" # femtovg = { version = "0.16.0", features = ["wgpu"] } # wgpu = "26.0.1" # mupdf = "0.5.0" diff --git a/src/main.rs b/src/main.rs index 202205c..4faaa4f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -142,6 +142,7 @@ enum Message { AddServiceItem(usize, ServiceItem), AddServiceItemDrop(usize), AppendServiceItem(ServiceItem), + AddService(Vec), } const HEADER_SPACE: u16 = 6; @@ -174,7 +175,7 @@ impl cosmic::Application for App { windows.push(core.main_window_id().unwrap()); } - let mut items = match read_to_string(input.file) { + let items = match read_to_string(input.file) { Ok(lisp) => { let mut service_items = vec![]; let lisp = crisp::reader::read(&lisp); @@ -200,23 +201,23 @@ impl cosmic::Application for App { } }; - let items: Vec = items - .into_par_iter() - .map(|mut item| { - item.slides = item - .slides - .into_par_iter() - .map(|mut slide| { - text_svg::text_svg_generator( - &mut slide, - Arc::clone(&fontdb), - ); - slide - }) - .collect(); - item - }) - .collect(); + // let items: Vec = items + // .into_par_iter() + // .map(|mut item| { + // item.slides = item + // .slides + // .into_par_iter() + // .map(|mut slide| { + // text_svg::text_svg_generator( + // &mut slide, + // Arc::clone(&fontdb), + // ); + // slide + // }) + // .collect(); + // item + // }) + // .collect(); let presenter = Presenter::with_items(items.clone()); let song_editor = SongEditor::new(Arc::clone(&fontdb)); @@ -230,7 +231,7 @@ impl cosmic::Application for App { presenter, core, nav_model, - service: items, + service: items.clone(), file: PathBuf::default(), windows, presentation_open: false, @@ -243,7 +244,7 @@ impl cosmic::Application for App { searching: false, current_item: (0, 0), library_dragged_item: None, - fontdb, + fontdb: Arc::clone(&fontdb), }; let mut batch = vec![]; @@ -257,7 +258,7 @@ impl cosmic::Application for App { }; batch.push(app.add_library()); - // batch.push(app.add_service(items)); + batch.push(app.add_service(items, Arc::clone(&fontdb))); let batch = Task::batch(batch); (app, batch) } @@ -944,6 +945,10 @@ impl cosmic::Application for App { self.library = Some(library); Task::none() } + Message::AddService(service) => { + self.service = service; + Task::none() + } Message::None => Task::none(), Message::DndLeave(entity) => { // debug!(?entity); @@ -1182,28 +1187,35 @@ where }) } - // fn add_service( - // &mut self, - // items: Vec, - // ) -> Task { - // Task::perform( - // async move { - // for item in items { - // debug!(?item, "Item to be appended"); - // let slides = item.to_slides().unwrap_or(vec![]); - // map.insert(item, slides); - // } - // let len = map.len(); - // debug!(len, "to be append: "); - // map - // }, - // |x| { - // let len = x.len(); - // debug!(len, "to append: "); - // cosmic::Action::App(Message::AppendService(x)) - // }, - // ) - // } + fn add_service( + &mut self, + items: Vec, + fontdb: Arc, + ) -> Task { + Task::perform( + async move { + let items: Vec = items + .into_par_iter() + .map(|mut item| { + item.slides = item + .slides + .into_par_iter() + .map(|mut slide| { + text_svg::text_svg_generator( + &mut slide, + Arc::clone(&fontdb), + ); + slide + }) + .collect(); + item + }) + .collect(); + items + }, + |x| cosmic::Action::App(Message::AddService(x)), + ) + } fn process_key_press( &mut self, diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index 183208d..9dfa8b1 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -812,7 +812,6 @@ pub(crate) fn slide_view( let text: Element = if let Some(text) = &slide.text_svg { if let Some(handle) = &text.handle { - debug!("we made it boys"); Image::new(handle) .content_fit(ContentFit::Cover) .width(Length::Fill) diff --git a/src/ui/text_svg.rs b/src/ui/text_svg.rs index a70055f..3d12330 100644 --- a/src/ui/text_svg.rs +++ b/src/ui/text_svg.rs @@ -242,6 +242,7 @@ impl TextSvg { } pub fn build(mut self) -> Self { + debug!("starting..."); let shadow = if let Some(shadow) = &self.shadow { format!("", shadow.offset_x, @@ -260,12 +261,12 @@ impl TextSvg { "".into() }; let size = Size::new(3840.0, 2160.0); + let font_size = self.font.size as f32 * (size.width / 960.0); let total_lines = self.text.lines().count(); let half_lines = (total_lines / 2) as f32; let middle_position = size.height / 2.0; let line_spacing = 10.0; - let text_and_line_spacing = - self.font.size as f32 + line_spacing; + let text_and_line_spacing = font_size + line_spacing; let starting_y_position = middle_position - (half_lines * text_and_line_spacing); @@ -289,9 +290,9 @@ impl TextSvg { size.height, shadow, self.font.name, - self.font.size, + font_size, self.fill, stroke, text); - debug!("starting..."); + debug!("text string built..."); let resvg_tree = Tree::from_data( &final_svg.as_bytes(), &resvg::usvg::Options { @@ -314,9 +315,13 @@ impl TextSvg { // &self.text.lines().next().unwrap().trim_end(); // path.push(PathBuf::from(file_title)); // path.set_extension("png"); - // let _ = pixmap.save_png(path); + // let _ = pixmap.save_png(&path); debug!("rendered"); - let handle = Handle::from_bytes(pixmap.take()); + let handle = Handle::from_rgba( + size.width as u32, + size.height as u32, + pixmap.take(), + ); self.handle = Some(handle); debug!("stored"); self diff --git a/todo.org b/todo.org index 427d985..2c7c574 100644 --- a/todo.org +++ b/todo.org @@ -16,6 +16,7 @@ Actually, what if we just made the svg at load/creation time and stored it in th ** SVG performs badly Since SVG's apparently run poorly in iced, instead I'll need to see about either creating a new text element, or teaching Iced to render strokes and shadows on text. + ** Fork Cryoglyph This fork will render text 3 times. Once for the text, once for the stroke, once for the shadow. This will only be used in the slides and therefore should not be much of a performance hit since we will only be render 3 copies of the given text. This should not be bad performance since it's not a large amount of text. From fae83aedc556e2e47ee51c4e080165001f6b8c9e Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 5 Sep 2025 15:26:14 -0500 Subject: [PATCH 15/15] trying to adjust the text_svg --- src/main.rs | 36 ++++++++++++++++++------------------ src/ui/presenter.rs | 6 +++--- src/ui/text_svg.rs | 36 ++++++++++++++++++++---------------- test_presentation.lisp | 4 ++-- test_song.lisp | 2 +- 5 files changed, 44 insertions(+), 40 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4faaa4f..5725086 100644 --- a/src/main.rs +++ b/src/main.rs @@ -201,23 +201,23 @@ impl cosmic::Application for App { } }; - // let items: Vec = items - // .into_par_iter() - // .map(|mut item| { - // item.slides = item - // .slides - // .into_par_iter() - // .map(|mut slide| { - // text_svg::text_svg_generator( - // &mut slide, - // Arc::clone(&fontdb), - // ); - // slide - // }) - // .collect(); - // item - // }) - // .collect(); + let items: Vec = items + .into_par_iter() + .map(|mut item| { + item.slides = item + .slides + .into_par_iter() + .map(|mut slide| { + text_svg::text_svg_generator( + &mut slide, + Arc::clone(&fontdb), + ); + slide + }) + .collect(); + item + }) + .collect(); let presenter = Presenter::with_items(items.clone()); let song_editor = SongEditor::new(Arc::clone(&fontdb)); @@ -258,7 +258,7 @@ impl cosmic::Application for App { }; batch.push(app.add_library()); - batch.push(app.add_service(items, Arc::clone(&fontdb))); + // batch.push(app.add_service(items, Arc::clone(&fontdb))); let batch = Task::batch(batch); (app, batch) } diff --git a/src/ui/presenter.rs b/src/ui/presenter.rs index 9dfa8b1..86d7bc7 100644 --- a/src/ui/presenter.rs +++ b/src/ui/presenter.rs @@ -812,10 +812,10 @@ pub(crate) fn slide_view( let text: Element = if let Some(text) = &slide.text_svg { if let Some(handle) = &text.handle { - Image::new(handle) + image(handle) .content_fit(ContentFit::Cover) - .width(Length::Fill) - .height(Length::Fill) + .width(width) + .height(size.height) .into() } else { Space::with_width(0).into() diff --git a/src/ui/text_svg.rs b/src/ui/text_svg.rs index 3d12330..3ac16ad 100644 --- a/src/ui/text_svg.rs +++ b/src/ui/text_svg.rs @@ -243,6 +243,21 @@ impl TextSvg { pub fn build(mut self) -> Self { debug!("starting..."); + + let mut path = dirs::data_local_dir().unwrap(); + path.push(PathBuf::from("lumina")); + path.push(PathBuf::from("temp")); + let file_title = + &self.text.lines().next().unwrap().trim_end(); + path.push(PathBuf::from(file_title)); + path.set_extension("png"); + + if path.exists() { + debug!("cached"); + let handle = Handle::from_path(path); + self.handle = Some(handle); + return self; + } let shadow = if let Some(shadow) = &self.shadow { format!("", shadow.offset_x, @@ -260,8 +275,8 @@ impl TextSvg { } else { "".into() }; - let size = Size::new(3840.0, 2160.0); - let font_size = self.font.size as f32 * (size.width / 960.0); + let size = Size::new(1920.0, 1080.0); + let font_size = self.font.size as f32; let total_lines = self.text.lines().count(); let half_lines = (total_lines / 2) as f32; let middle_position = size.height / 2.0; @@ -307,21 +322,10 @@ impl TextSvg { Pixmap::new(size.width as u32, size.height as u32) .expect("opops"); resvg::render(&resvg_tree, transform, &mut pixmap.as_mut()); - // debug!(?pixmap); - // let mut path = dirs::data_local_dir().unwrap(); - // path.push(PathBuf::from("lumina")); - // path.push(PathBuf::from("temp")); - // let file_title = - // &self.text.lines().next().unwrap().trim_end(); - // path.push(PathBuf::from(file_title)); - // path.set_extension("png"); - // let _ = pixmap.save_png(&path); + let _ = pixmap.save_png(&path); + debug!("rendered"); - let handle = Handle::from_rgba( - size.width as u32, - size.height as u32, - pixmap.take(), - ); + let handle = Handle::from_path(path); self.handle = Some(handle); debug!("stored"); self diff --git a/test_presentation.lisp b/test_presentation.lisp index 553f254..37919e7 100644 --- a/test_presentation.lisp +++ b/test_presentation.lisp @@ -1,10 +1,10 @@ (slide :background (image :source "~/pics/frodo.jpg" :fit fill) - (text "This is frodo" :font-size 90)) + (text "This is frodo" :font-size 140)) (slide (video :source "~/vids/test/camprules2024.mp4" :fit contain)) (slide (video :source "~/vids/never give up.mkv" :fit contain)) (slide (video :source "~/vids/The promise of Rust.mkv" :fit contain)) (song :id 7 :author "North Point Worship" - :font "Quicksand Bold" :font-size 60 + :font "Quicksand" :font-size 140 :shadow "" :stroke "" :title "Death Was Arrested" :background (image :source "file:///home/chris/nc/tfc/openlp/CMG - Bright Mountains 01.jpg" :fit cover) diff --git a/test_song.lisp b/test_song.lisp index ccee693..a0705c8 100644 --- a/test_song.lisp +++ b/test_song.lisp @@ -1,5 +1,5 @@ (song :id 7 :author "North Point Worship" - :font "Quicksand Bold" :font-size 60 + :font "Quicksand" :font-size 140 :title "Death Was Arrested" :background (image :source "~/nc/tfc/openlp/CMG - Bright Mountains 01.jpg" :fit cover) :text-alignment center