Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 34 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 19 additions & 3 deletions cosmic-applet-time/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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))
Expand All @@ -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(
Expand Down Expand Up @@ -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)
Expand Down
16 changes: 7 additions & 9 deletions cosmic-applet-workspaces/src/components/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
Loading