fix: use text::body

This commit is contained in:
Vukašin Vojinović 2024-09-01 19:48:42 +02:00 committed by Michael Murphy
parent 02b3fbdb11
commit d657b1941a
2 changed files with 5 additions and 4 deletions

View file

@ -17,7 +17,7 @@ use cosmic::{
cosmic_config::CosmicConfigEntry, cosmic_config::CosmicConfigEntry,
iced::{ iced::{
self, self,
widget::{self, column, row, slider, text as iced_text}, widget::{self, column, row, slider},
window, Alignment, Length, Limits, Rectangle, Subscription, window, Alignment, Length, Limits, Rectangle, Subscription,
}, },
iced_runtime::core::alignment::Horizontal, iced_runtime::core::alignment::Horizontal,
@ -911,7 +911,7 @@ fn revealer(
column![revealer_head(open, title, selected, toggle)].width(Length::Fill), column![revealer_head(open, title, selected, toggle)].width(Length::Fill),
|col, (id, name)| { |col, (id, name)| {
col.push( col.push(
menu_button(iced_text(name).size(14)) menu_button(text::body(name.clone()))
.on_press(change(id.clone())) .on_press(change(id.clone()))
.width(Length::Fill) .width(Length::Fill)
.padding([8, 48]), .padding([8, 48]),

View file

@ -12,7 +12,7 @@ use cosmic::{
cosmic_config::{Config, CosmicConfigEntry}, cosmic_config::{Config, CosmicConfigEntry},
iced::{ iced::{
wayland::popup::{destroy_popup, get_popup}, wayland::popup::{destroy_popup, get_popup},
widget::{column, row, text as iced_text}, widget::{column, row},
window, Alignment, Length, Limits, Subscription, window, Alignment, Length, Limits, Subscription,
}, },
iced_core::alignment::Horizontal, iced_core::alignment::Horizontal,
@ -375,10 +375,11 @@ impl cosmic::Application for Notifications {
.width(Length::Fill)]); .width(Length::Fill)]);
let notifications = if self.cards.is_empty() { let notifications = if self.cards.is_empty() {
let no_notifications = String::from(fl!("no-notifications"));
row![container( row![container(
column![ column![
text_icon("cosmic-applet-notification-symbolic", 40), text_icon("cosmic-applet-notification-symbolic", 40),
iced_text(&fl!("no-notifications")).size(14.0) text::body(no_notifications)
] ]
.align_items(Alignment::Center) .align_items(Alignment::Center)
) )