diff --git a/Cargo.lock b/Cargo.lock index 9747b36..d5b0b27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1214,8 +1214,8 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.18.0" -source = "git+https://github.com/pop-os/cosmic-text.git#cd1d3aa1efb7d5529fb9de09d37fbc85b8ce1253" +version = "0.18.1" +source = "git+https://github.com/pop-os/cosmic-text.git#cc73876fc94e6e7c76c87a17ee837c25dd41b1f1" dependencies = [ "bitflags 2.11.0", "fontdb 0.23.0", @@ -3103,9 +3103,9 @@ checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "d36139f1c97c42c0c86a411910b04e48d4939a0376e6e0f989420cbdee0120e5" dependencies = [ "once_cell", "wasm-bindgen", @@ -5952,9 +5952,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "9ff9c7baef35ac3c0e17d8bfc9ad75eb62f85a2f02bccc906699dadb0aa9c622" dependencies = [ "cfg-if", "once_cell", @@ -5965,9 +5965,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "d24699cd39db9966cf6e2ef10d2f72779c961ad905911f395ea201c3ec9f545d" dependencies = [ "cfg-if", "futures-util", @@ -5979,9 +5979,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "39455e84ad887a0bbc93c116d72403f1bb0a39e37dd6f235a43e2128a0c7f1fd" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5989,9 +5989,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "dff4761f60b0b51fd13fec8764167b7bbcc34498ce3e52805fe1db6f2d56b6d6" dependencies = [ "bumpalo", "proc-macro2", @@ -6002,9 +6002,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "bc6a171c53d98021a93a474c4a4579d76ba97f9517d871bc12e27640f218b6dd" dependencies = [ "unicode-ident", ] @@ -6212,9 +6212,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "668fa5d00434e890a452ab060d24e3904d1be93f7bb01b70e5603baa2b8ab23b" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/src/view/mod.rs b/src/view/mod.rs index 8503fec..1f8d0a3 100644 --- a/src/view/mod.rs +++ b/src/view/mod.rs @@ -14,7 +14,10 @@ use cosmic::{ clipboard::mime::{AllowedMimeTypes, AsMimeTypes}, widget::{column, row}, }, - iced_core::{Shadow, text::Wrapping}, + iced_core::{ + Shadow, + text::{Ellipsize, EllipsizeHeightLimit}, + }, iced_winit::platform_specific::wayland::subsurface_widget::Subsurface, widget::{self, Widget}, }; @@ -288,6 +291,7 @@ fn workspace_item( let workspace_footer = row![ widget::horizontal_space().width(Length::Fixed(32.0)), widget::text::body(fl!("workspace", number = workspace.info.name.as_str())) + .ellipsize(Ellipsize::Middle(EllipsizeHeightLimit::Lines(1))) .apply(widget::container) .center_x(Length::Fill), pin_button(workspace), @@ -510,7 +514,8 @@ fn toplevel_preview(toplevel: &Toplevel, is_being_dragged: bool) -> cosmic::Elem space_xxs, space_s, .. } = cosmic::theme::active().cosmic().spacing; - let label = widget::text::body(toplevel.info.title.clone()).wrapping(Wrapping::None); + let label = widget::text::body(toplevel.info.title.clone()) + .ellipsize(Ellipsize::End(EllipsizeHeightLimit::Lines(1))); let label = if let Some(icon) = &toplevel.icon { row![ widget::icon(widget::icon::from_path(icon.clone())).size(24),