diff --git a/Cargo.lock b/Cargo.lock index 6a538836..01fcd5cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,6 +59,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -1268,7 +1269,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1290,7 +1291,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "quote", "syn 1.0.109", @@ -1348,7 +1349,7 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#4fedcbfc3574600b58de6da6c2401c92264537bd" +source = "git+https://github.com/pop-os/cosmic-panel#0ce85da198f02f94ad75441e64c0e165c41eb4ae" dependencies = [ "anyhow", "cosmic-config", @@ -1377,7 +1378,7 @@ dependencies = [ [[package]] name = "cosmic-settings-daemon" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#063c2ad0dbe090d7e1221817128098493838b13a" +source = "git+https://github.com/pop-os/dbus-settings-bindings#931f5db558bf3fcb572ff4e18f7f1618a7430046" dependencies = [ "zbus 4.4.0", ] @@ -1429,7 +1430,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "almost", "cosmic-config", @@ -2856,7 +2857,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "dnd", "iced_accessibility", @@ -2874,7 +2875,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "accesskit", "accesskit_unix", @@ -2883,7 +2884,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "bitflags 2.6.0", "dnd", @@ -2905,7 +2906,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "futures", "iced_core", @@ -2918,7 +2919,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "bitflags 2.6.0", "bytemuck", @@ -2942,7 +2943,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2954,7 +2955,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "dnd", "iced_accessibility", @@ -2968,7 +2969,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "enum-repr", "float-cmp", @@ -2994,7 +2995,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "iced_core", "once_cell", @@ -3004,7 +3005,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "bytemuck", "cosmic-text", @@ -3021,7 +3022,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "as-raw-xcb-connection", "bitflags 2.6.0", @@ -3050,7 +3051,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "dnd", "iced_renderer", @@ -3731,7 +3732,7 @@ checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#2006d138eb87d080b6c9886ef9aa8079ff533688" dependencies = [ "apply", "ashpd 0.9.1", @@ -3771,6 +3772,7 @@ dependencies = [ "tracing", "unicode-segmentation", "url", + "ustr", "zbus 4.4.0", ] @@ -6217,6 +6219,19 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "ustr" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e904a2279a4a36d2356425bb20be271029cc650c335bc82af8bfae30085a3d0" +dependencies = [ + "ahash", + "byteorder", + "lazy_static", + "parking_lot 0.12.3", + "serde", +] + [[package]] name = "usvg" version = "0.37.0" @@ -6953,7 +6968,7 @@ dependencies = [ [[package]] name = "xdg-shell-wrapper-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#4fedcbfc3574600b58de6da6c2401c92264537bd" +source = "git+https://github.com/pop-os/cosmic-panel#0ce85da198f02f94ad75441e64c0e165c41eb4ae" dependencies = [ "serde", "wayland-protocols-wlr", diff --git a/cosmic-applet-time/src/window.rs b/cosmic-applet-time/src/window.rs index 0ade58e8..8d3b8317 100644 --- a/cosmic-applet-time/src/window.rs +++ b/cosmic-applet-time/src/window.rs @@ -9,6 +9,7 @@ use cosmic::{ applet::{cosmic_panel_config::PanelAnchor, menu_button, padded_control}, cctk::sctk::reexports::calloop, cosmic_theme::Spacing, + font, iced::{ futures::{channel::mpsc, SinkExt, StreamExt, TryFutureExt}, subscription, @@ -463,7 +464,10 @@ impl cosmic::Application for Window { Element::from( row!( - self.core.applet.text(self.format(bag, &self.now)), + self.core + .applet + .text(self.format(bag, &self.now)) + .font(font::mono()), container(vertical_space(Length::Fixed( (self.core.applet.suggested_size(true).1 + 2 * self.core.applet.suggested_padding(true)) @@ -486,7 +490,13 @@ impl cosmic::Application for Window { let formated = self.format(date_bag, &self.now); for p in formated.split_whitespace() { - elements.push(self.core.applet.text(p.to_owned()).into()); + elements.push( + self.core + .applet + .text(p.to_owned()) + .font(font::mono()) + .into(), + ); } elements.push( @@ -514,7 +524,13 @@ impl cosmic::Application for Window { // todo: split using formatToParts when it is implemented // https://github.com/unicode-org/icu4x/issues/4936#issuecomment-2128812667 for p in formated.split_whitespace().flat_map(|s| s.split(':')) { - elements.push(self.core.applet.text(p.to_owned()).into()); + elements.push( + self.core + .applet + .text(p.to_owned()) + .font(font::mono()) + .into(), + ); } let date_time_col = Column::with_children(elements) diff --git a/cosmic-applet-workspaces/src/components/app.rs b/cosmic-applet-workspaces/src/components/app.rs index ae85a20e..58714e0e 100644 --- a/cosmic-applet-workspaces/src/components/app.rs +++ b/cosmic-applet-workspaces/src/components/app.rs @@ -3,20 +3,14 @@ use cctk::sctk::reexports::{calloop::channel::SyncSender, client::backend::ObjectId}; use cosmic::{ - applet::cosmic_panel_config::PanelAnchor, - font::FONT_BOLD, - iced::{ + applet::cosmic_panel_config::PanelAnchor, font, iced::{ alignment::{Horizontal, Vertical}, event, mouse::{self, ScrollDelta}, widget::{button, column, row}, Event::Mouse, Length, Subscription, - }, - iced_core::{Background, Border}, - iced_style::application, - widget::{container, horizontal_space, vertical_space}, - Command, Element, Theme, + }, iced_core::{Background, Border}, iced_style::application, widget::{container, horizontal_space, vertical_space}, Command, Element, Theme }; use cosmic_protocols::workspace::v1::client::zcosmic_workspace_handle_v1; @@ -176,7 +170,11 @@ impl cosmic::Application for IcedWorkspacesApplet { let popup_index = self.popup_index().unwrap_or(self.workspaces.len()); let buttons = self.workspaces[..popup_index].iter().filter_map(|w| { - let content = self.core.applet.text(w.0.clone()).font(FONT_BOLD); + let content = self + .core + .applet + .text(w.0.clone()) + .font(font::bold()); let (width, height) = if self.core.applet.is_horizontal() { (suggested_total as f32, suggested_window_size.1.get() as f32)