fix: use cosmic::widget::text instead of cosmic::iced::widget::text
This commit is contained in:
parent
a2063213e4
commit
02b3fbdb11
7 changed files with 60 additions and 70 deletions
|
|
@ -17,12 +17,12 @@ use cosmic::{
|
||||||
cosmic_config::CosmicConfigEntry,
|
cosmic_config::CosmicConfigEntry,
|
||||||
iced::{
|
iced::{
|
||||||
self,
|
self,
|
||||||
widget::{self, column, row, slider, text},
|
widget::{self, column, row, slider, text as iced_text},
|
||||||
window, Alignment, Length, Limits, Rectangle, Subscription,
|
window, Alignment, Length, Limits, Rectangle, Subscription,
|
||||||
},
|
},
|
||||||
iced_runtime::core::alignment::Horizontal,
|
iced_runtime::core::alignment::Horizontal,
|
||||||
iced_style::application,
|
iced_style::application,
|
||||||
widget::{button, divider, horizontal_space, icon, Column, Row},
|
widget::{button, divider, horizontal_space, icon, text, Column, Row},
|
||||||
Element, Renderer, Theme,
|
Element, Renderer, Theme,
|
||||||
};
|
};
|
||||||
use cosmic_settings_subscriptions::pulse as sub_pulse;
|
use cosmic_settings_subscriptions::pulse as sub_pulse;
|
||||||
|
|
@ -819,8 +819,8 @@ impl cosmic::Application for Audio {
|
||||||
|
|
||||||
elements.push(
|
elements.push(
|
||||||
column![
|
column![
|
||||||
text(title).size(14).width(Length::Shrink),
|
text::body(title).width(Length::Shrink),
|
||||||
text(artists).size(10).width(Length::Shrink),
|
text::caption(artists).width(Length::Shrink),
|
||||||
]
|
]
|
||||||
.width(Length::FillPortion(5))
|
.width(Length::FillPortion(5))
|
||||||
.into(),
|
.into(),
|
||||||
|
|
@ -885,7 +885,7 @@ impl cosmic::Application for Audio {
|
||||||
)
|
)
|
||||||
.padding([8, 24]),
|
.padding([8, 24]),
|
||||||
padded_control(divider::horizontal::default()),
|
padded_control(divider::horizontal::default()),
|
||||||
menu_button(text(fl!("sound-settings")).size(14)).on_press(Message::OpenSettings)
|
menu_button(text::body(fl!("sound-settings"))).on_press(Message::OpenSettings)
|
||||||
]
|
]
|
||||||
.align_items(Alignment::Start)
|
.align_items(Alignment::Start)
|
||||||
.padding([8, 0]);
|
.padding([8, 0]);
|
||||||
|
|
@ -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(text(name).size(14))
|
menu_button(iced_text(name).size(14))
|
||||||
.on_press(change(id.clone()))
|
.on_press(change(id.clone()))
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.padding([8, 48]),
|
.padding([8, 48]),
|
||||||
|
|
@ -930,8 +930,8 @@ fn revealer_head(
|
||||||
toggle: Message,
|
toggle: Message,
|
||||||
) -> cosmic::widget::Button<'static, Message> {
|
) -> cosmic::widget::Button<'static, Message> {
|
||||||
menu_button(column![
|
menu_button(column![
|
||||||
text(title).width(Length::Fill).size(14),
|
text::body(title).width(Length::Fill),
|
||||||
text(selected).size(10),
|
text::caption(selected),
|
||||||
])
|
])
|
||||||
.on_press(toggle)
|
.on_press(toggle)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,14 @@ use cosmic::{
|
||||||
iced::{
|
iced::{
|
||||||
alignment::Horizontal,
|
alignment::Horizontal,
|
||||||
wayland::popup::{destroy_popup, get_popup},
|
wayland::popup::{destroy_popup, get_popup},
|
||||||
widget::{column, container, row, slider, text},
|
widget::{column, container, row, slider},
|
||||||
window, Alignment, Length, Subscription,
|
window, Alignment, Length, Subscription,
|
||||||
},
|
},
|
||||||
iced_core::{alignment::Vertical, Background, Border, Color, Shadow},
|
iced_core::{alignment::Vertical, Background, Border, Color, Shadow},
|
||||||
iced_runtime::core::layout::Limits,
|
iced_runtime::core::layout::Limits,
|
||||||
iced_style::application,
|
iced_style::application,
|
||||||
iced_widget::{Column, Row},
|
iced_widget::{Column, Row},
|
||||||
widget::{divider, horizontal_space, icon, scrollable, vertical_space},
|
widget::{divider, horizontal_space, icon, scrollable, text, vertical_space},
|
||||||
Command, Element, Theme,
|
Command, Element, Theme,
|
||||||
};
|
};
|
||||||
use cosmic_settings_subscriptions::{
|
use cosmic_settings_subscriptions::{
|
||||||
|
|
@ -428,8 +428,8 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view_window(&self, _id: window::Id) -> Element<Message> {
|
fn view_window(&self, _id: window::Id) -> Element<Message> {
|
||||||
let name = text(fl!("battery")).size(14);
|
let name = text::body(fl!("battery"));
|
||||||
let description = text(if !self.on_battery {
|
let description = text::caption(if !self.on_battery {
|
||||||
format!("{:.0}%", self.battery_percent)
|
format!("{:.0}%", self.battery_percent)
|
||||||
} else {
|
} else {
|
||||||
format!(
|
format!(
|
||||||
|
|
@ -438,8 +438,7 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
fl!("until-empty"),
|
fl!("until-empty"),
|
||||||
self.battery_percent
|
self.battery_percent
|
||||||
)
|
)
|
||||||
})
|
});
|
||||||
.size(10);
|
|
||||||
|
|
||||||
let mut content = vec![
|
let mut content = vec![
|
||||||
padded_control(
|
padded_control(
|
||||||
|
|
@ -455,8 +454,8 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
menu_button(
|
menu_button(
|
||||||
row![
|
row![
|
||||||
column![
|
column![
|
||||||
text(fl!("battery")).size(14),
|
text::body(fl!("battery")),
|
||||||
text(fl!("battery-desc")).size(10)
|
text::caption(fl!("battery-desc"))
|
||||||
]
|
]
|
||||||
.width(Length::Fill),
|
.width(Length::Fill),
|
||||||
if matches!(self.power_profile, Power::Battery) {
|
if matches!(self.power_profile, Power::Battery) {
|
||||||
|
|
@ -476,8 +475,8 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
menu_button(
|
menu_button(
|
||||||
row![
|
row![
|
||||||
column![
|
column![
|
||||||
text(fl!("balanced")).size(14),
|
text::body(fl!("balanced")),
|
||||||
text(fl!("balanced-desc")).size(10)
|
text::caption(fl!("balanced-desc"))
|
||||||
]
|
]
|
||||||
.width(Length::Fill),
|
.width(Length::Fill),
|
||||||
if matches!(self.power_profile, Power::Balanced) {
|
if matches!(self.power_profile, Power::Balanced) {
|
||||||
|
|
@ -497,8 +496,8 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
menu_button(
|
menu_button(
|
||||||
row![
|
row![
|
||||||
column![
|
column![
|
||||||
text(fl!("performance")).size(14),
|
text::body(fl!("performance")),
|
||||||
text(fl!("performance-desc")).size(10)
|
text::caption(fl!("performance-desc"))
|
||||||
]
|
]
|
||||||
.width(Length::Fill),
|
.width(Length::Fill),
|
||||||
if matches!(self.power_profile, Power::Performance) {
|
if matches!(self.power_profile, Power::Performance) {
|
||||||
|
|
@ -631,11 +630,10 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
content.push(
|
content.push(
|
||||||
menu_button(
|
menu_button(
|
||||||
row![
|
row![
|
||||||
text(fl!(
|
text::body(fl!(
|
||||||
"dgpu-applications",
|
"dgpu-applications",
|
||||||
gpu_name = format!("\"{}\"", gpu.name.trim())
|
gpu_name = format!("\"{}\"", gpu.name.trim())
|
||||||
))
|
))
|
||||||
.size(14)
|
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.vertical_alignment(Vertical::Center),
|
.vertical_alignment(Vertical::Center),
|
||||||
container(
|
container(
|
||||||
|
|
@ -675,7 +673,7 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
} else {
|
} else {
|
||||||
container(horizontal_space(12.0))
|
container(horizontal_space(12.0))
|
||||||
},
|
},
|
||||||
column![text(&app.name).size(14), text(&app.secondary).size(10)]
|
column![text::body(&app.name), text::caption(&app.secondary)]
|
||||||
.width(Length::Fill),
|
.width(Length::Fill),
|
||||||
]
|
]
|
||||||
.spacing(8)
|
.spacing(8)
|
||||||
|
|
@ -694,7 +692,7 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
}
|
}
|
||||||
|
|
||||||
content.push(
|
content.push(
|
||||||
menu_button(text(fl!("power-settings")).size(14).width(Length::Fill))
|
menu_button(text::body(fl!("power-settings")).width(Length::Fill))
|
||||||
.on_press(Message::OpenSettings)
|
.on_press(Message::OpenSettings)
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -556,7 +556,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
let mut ipv4 = Vec::with_capacity(ip_addresses.len() + 1);
|
let mut ipv4 = Vec::with_capacity(ip_addresses.len() + 1);
|
||||||
ipv4.push(text::body(name).into());
|
ipv4.push(text::body(name).into());
|
||||||
for addr in ip_addresses {
|
for addr in ip_addresses {
|
||||||
ipv4.push(text(format!("{}: {}", fl!("ipv4"), addr)).size(10).into());
|
ipv4.push(text::caption(format!("{}: {}", fl!("ipv4"), addr)).into());
|
||||||
}
|
}
|
||||||
vpn_ethernet_col = vpn_ethernet_col.push(column![
|
vpn_ethernet_col = vpn_ethernet_col.push(column![
|
||||||
row![
|
row![
|
||||||
|
|
@ -584,7 +584,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
ip_addresses,
|
ip_addresses,
|
||||||
} => {
|
} => {
|
||||||
let mut ipv4 = Vec::with_capacity(ip_addresses.len() + 1);
|
let mut ipv4 = Vec::with_capacity(ip_addresses.len() + 1);
|
||||||
ipv4.push(text(name).size(14).into());
|
ipv4.push(text::body(name).into());
|
||||||
for addr in ip_addresses {
|
for addr in ip_addresses {
|
||||||
ipv4.push(text(format!("{}: {}", fl!("ipv4"), addr)).size(12).into());
|
ipv4.push(text(format!("{}: {}", fl!("ipv4"), addr)).size(12).into());
|
||||||
}
|
}
|
||||||
|
|
@ -628,7 +628,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
.size(24)
|
.size(24)
|
||||||
.symbolic(true)
|
.symbolic(true)
|
||||||
.into(),
|
.into(),
|
||||||
column![text(name).size(14), Column::with_children(ipv4)]
|
column![text::body(name), Column::with_children(ipv4)]
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.into(),
|
.into(),
|
||||||
];
|
];
|
||||||
|
|
@ -709,7 +709,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
icon::from_name("airplane-mode-symbolic")
|
icon::from_name("airplane-mode-symbolic")
|
||||||
.size(48)
|
.size(48)
|
||||||
.symbolic(true),
|
.symbolic(true),
|
||||||
text(fl!("airplane-mode-on")).size(14),
|
text::body(fl!("airplane-mode-on")),
|
||||||
text(fl!("turn-off-airplane-mode")).size(12)
|
text(fl!("turn-off-airplane-mode")).size(12)
|
||||||
)
|
)
|
||||||
.spacing(8)
|
.spacing(8)
|
||||||
|
|
@ -722,7 +722,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
content = content.push(padded_control(divider::horizontal::default()));
|
content = content.push(padded_control(divider::horizontal::default()));
|
||||||
for known in &self.nm_state.known_access_points {
|
for known in &self.nm_state.known_access_points {
|
||||||
let mut btn_content = Vec::with_capacity(2);
|
let mut btn_content = Vec::with_capacity(2);
|
||||||
let ssid = text(&known.ssid).size(14).width(Length::Fill);
|
let ssid = text::body(&known.ssid).width(Length::Fill);
|
||||||
if known.working {
|
if known.working {
|
||||||
btn_content.push(
|
btn_content.push(
|
||||||
icon::from_name("network-wireless-acquiring-symbolic")
|
icon::from_name("network-wireless-acquiring-symbolic")
|
||||||
|
|
@ -858,7 +858,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
icon::from_name("network-wireless-acquiring-symbolic")
|
icon::from_name("network-wireless-acquiring-symbolic")
|
||||||
.size(24)
|
.size(24)
|
||||||
.symbolic(true),
|
.symbolic(true),
|
||||||
text(&access_point.ssid).size(14),
|
text::body(&access_point.ssid),
|
||||||
]
|
]
|
||||||
.align_items(Alignment::Center)
|
.align_items(Alignment::Center)
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
|
|
@ -880,7 +880,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
icon::from_name("network-wireless-error-symbolic")
|
icon::from_name("network-wireless-error-symbolic")
|
||||||
.size(24)
|
.size(24)
|
||||||
.symbolic(true),
|
.symbolic(true),
|
||||||
text(&access_point.ssid).size(14),
|
text::body(&access_point.ssid),
|
||||||
]
|
]
|
||||||
.align_items(Alignment::Center)
|
.align_items(Alignment::Center)
|
||||||
.spacing(12),
|
.spacing(12),
|
||||||
|
|
|
||||||
|
|
@ -12,20 +12,17 @@ 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},
|
widget::{column, row, text as iced_text},
|
||||||
window, Alignment, Length, Limits, Subscription,
|
window, Alignment, Length, Limits, Subscription,
|
||||||
},
|
},
|
||||||
iced_core::alignment::Horizontal,
|
iced_core::alignment::Horizontal,
|
||||||
Command,
|
iced_widget::{scrollable, Column},
|
||||||
|
widget::{button, container, divider, icon, text},
|
||||||
|
Command, Element, Theme,
|
||||||
};
|
};
|
||||||
|
|
||||||
use cosmic::{iced_futures::futures::executor::block_on, iced_style::application};
|
use cosmic::{iced_futures::futures::executor::block_on, iced_style::application};
|
||||||
|
|
||||||
use cosmic::{
|
|
||||||
iced_widget::{scrollable, Column},
|
|
||||||
widget::{button, container, divider, icon},
|
|
||||||
Element, Theme,
|
|
||||||
};
|
|
||||||
use cosmic_notifications_config::NotificationsConfig;
|
use cosmic_notifications_config::NotificationsConfig;
|
||||||
use cosmic_notifications_util::{Image, Notification};
|
use cosmic_notifications_util::{Image, Notification};
|
||||||
use cosmic_time::{anim, chain, id, once_cell::sync::Lazy, Instant, Timeline};
|
use cosmic_time::{anim, chain, id, once_cell::sync::Lazy, Instant, Timeline};
|
||||||
|
|
@ -381,7 +378,7 @@ impl cosmic::Application for Notifications {
|
||||||
row![container(
|
row![container(
|
||||||
column![
|
column![
|
||||||
text_icon("cosmic-applet-notification-symbolic", 40),
|
text_icon("cosmic-applet-notification-symbolic", 40),
|
||||||
text(&fl!("no-notifications")).size(14)
|
iced_text(&fl!("no-notifications")).size(14.0)
|
||||||
]
|
]
|
||||||
.align_items(Alignment::Center)
|
.align_items(Alignment::Center)
|
||||||
)
|
)
|
||||||
|
|
@ -421,7 +418,7 @@ impl cosmic::Application for Notifications {
|
||||||
.size(12)
|
.size(12)
|
||||||
.width(Length::Fill);
|
.width(Length::Fill);
|
||||||
|
|
||||||
let duration_since = text(duration_ago_msg(n)).size(10);
|
let duration_since = text::caption(duration_ago_msg(n));
|
||||||
|
|
||||||
let close_notif = button(
|
let close_notif = button(
|
||||||
icon::from_name("window-close-symbolic")
|
icon::from_name("window-close-symbolic")
|
||||||
|
|
@ -474,9 +471,8 @@ impl cosmic::Application for Notifications {
|
||||||
.align_items(Alignment::Center),
|
.align_items(Alignment::Center),
|
||||||
},
|
},
|
||||||
column![
|
column![
|
||||||
text(n.summary.lines().next().unwrap_or_default())
|
text::body(n.summary.lines().next().unwrap_or_default())
|
||||||
.width(Length::Fill)
|
.width(Length::Fill),
|
||||||
.size(14),
|
|
||||||
text(n.body.lines().next().unwrap_or_default())
|
text(n.body.lines().next().unwrap_or_default())
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.size(12)
|
.size(12)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use cosmic::{
|
||||||
actions::layer_surface::SctkLayerSurfaceSettings,
|
actions::layer_surface::SctkLayerSurfaceSettings,
|
||||||
popup::{destroy_popup, get_popup},
|
popup::{destroy_popup, get_popup},
|
||||||
},
|
},
|
||||||
widget::{self, column, container, row, space::Space, text},
|
widget::{self, column, container, row, space::Space},
|
||||||
window, Alignment, Length, Subscription,
|
window, Alignment, Length, Subscription,
|
||||||
},
|
},
|
||||||
iced_runtime::core::layout::Limits,
|
iced_runtime::core::layout::Limits,
|
||||||
|
|
@ -29,7 +29,7 @@ use cosmic::{
|
||||||
iced_style::application,
|
iced_style::application,
|
||||||
iced_widget::mouse_area,
|
iced_widget::mouse_area,
|
||||||
theme,
|
theme,
|
||||||
widget::{button, divider, horizontal_space, icon, vertical_space, Column},
|
widget::{button, divider, horizontal_space, icon, text, vertical_space, Column},
|
||||||
Element, Theme,
|
Element, Theme,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -248,15 +248,15 @@ impl cosmic::Application for Power {
|
||||||
|
|
||||||
fn view_window(&self, id: window::Id) -> Element<Message> {
|
fn view_window(&self, id: window::Id) -> Element<Message> {
|
||||||
if matches!(self.popup, Some(p) if p == id) {
|
if matches!(self.popup, Some(p) if p == id) {
|
||||||
let settings = menu_button(text(fl!("settings")).size(14)).on_press(Message::Settings);
|
let settings = menu_button(text::body(fl!("settings"))).on_press(Message::Settings);
|
||||||
|
|
||||||
let session = column![
|
let session = column![
|
||||||
menu_button(
|
menu_button(
|
||||||
row![
|
row![
|
||||||
text_icon("system-lock-screen-symbolic", 24),
|
text_icon("system-lock-screen-symbolic", 24),
|
||||||
text(fl!("lock-screen")).size(14),
|
text::body(fl!("lock-screen")),
|
||||||
Space::with_width(Length::Fill),
|
Space::with_width(Length::Fill),
|
||||||
text(fl!("lock-screen-shortcut")).size(14),
|
text::body(fl!("lock-screen-shortcut")),
|
||||||
]
|
]
|
||||||
.align_items(Alignment::Center)
|
.align_items(Alignment::Center)
|
||||||
.spacing(8)
|
.spacing(8)
|
||||||
|
|
@ -265,9 +265,9 @@ impl cosmic::Application for Power {
|
||||||
menu_button(
|
menu_button(
|
||||||
row![
|
row![
|
||||||
text_icon("system-log-out-symbolic", 24),
|
text_icon("system-log-out-symbolic", 24),
|
||||||
text(fl!("log-out")).size(14),
|
text::body(fl!("log-out")),
|
||||||
Space::with_width(Length::Fill),
|
Space::with_width(Length::Fill),
|
||||||
text(fl!("log-out-shortcut")).size(14),
|
text::body(fl!("log-out-shortcut")),
|
||||||
]
|
]
|
||||||
.align_items(Alignment::Center)
|
.align_items(Alignment::Center)
|
||||||
.spacing(8)
|
.spacing(8)
|
||||||
|
|
@ -320,8 +320,7 @@ impl cosmic::Application for Power {
|
||||||
))
|
))
|
||||||
.primary_action(
|
.primary_action(
|
||||||
button(min_width_and_height(
|
button(min_width_and_height(
|
||||||
text(fl!("confirm", HashMap::from_iter(vec![("action", action)])))
|
text::body(fl!("confirm", HashMap::from_iter(vec![("action", action)])))
|
||||||
.size(14)
|
|
||||||
.into(),
|
.into(),
|
||||||
142.0,
|
142.0,
|
||||||
32.0,
|
32.0,
|
||||||
|
|
@ -333,7 +332,7 @@ impl cosmic::Application for Power {
|
||||||
)
|
)
|
||||||
.secondary_action(
|
.secondary_action(
|
||||||
button(min_width_and_height(
|
button(min_width_and_height(
|
||||||
text(fl!("cancel")).size(14).into(),
|
text::body(fl!("cancel")).into(),
|
||||||
142.0,
|
142.0,
|
||||||
32.0,
|
32.0,
|
||||||
))
|
))
|
||||||
|
|
@ -382,7 +381,7 @@ impl cosmic::Application for Power {
|
||||||
|
|
||||||
fn power_buttons(name: &str, msg: String) -> cosmic::widget::Button<Message> {
|
fn power_buttons(name: &str, msg: String) -> cosmic::widget::Button<Message> {
|
||||||
cosmic::widget::button(
|
cosmic::widget::button(
|
||||||
column![text_icon(name, 40), text(msg).size(14)]
|
column![text_icon(name, 40), text::body(msg)]
|
||||||
.spacing(4)
|
.spacing(4)
|
||||||
.align_items(Alignment::Center)
|
.align_items(Alignment::Center)
|
||||||
.width(Length::Fill),
|
.width(Length::Fill),
|
||||||
|
|
|
||||||
|
|
@ -298,29 +298,26 @@ impl cosmic::Application for Window {
|
||||||
.width(Length::Fill),
|
.width(Length::Fill),
|
||||||
padded_control(divider::horizontal::default(),),
|
padded_control(divider::horizontal::default(),),
|
||||||
padded_control(column![
|
padded_control(column![
|
||||||
text(fl!("new-workspace")).size(14),
|
text::body(fl!("new-workspace")),
|
||||||
new_workspace_behavior_button,
|
new_workspace_behavior_button,
|
||||||
]),
|
]),
|
||||||
padded_control(divider::horizontal::default()),
|
padded_control(divider::horizontal::default()),
|
||||||
padded_control(row!(
|
padded_control(row!(
|
||||||
text(fl!("navigate-windows")).size(14).width(Length::Fill),
|
text::body(fl!("navigate-windows")).width(Length::Fill),
|
||||||
text(format!("{} + {}", fl!("super"), fl!("arrow-keys"))).size(14),
|
text::body(format!("{} + {}", fl!("super"), fl!("arrow-keys"))),
|
||||||
)),
|
)),
|
||||||
padded_control(row!(
|
padded_control(row!(
|
||||||
text(fl!("move-window")).size(14).width(Length::Fill),
|
text::body(fl!("move-window")).width(Length::Fill),
|
||||||
text(format!(
|
text::body(format!(
|
||||||
"{} + {} + {}",
|
"{} + {} + {}",
|
||||||
fl!("shift"),
|
fl!("shift"),
|
||||||
fl!("super"),
|
fl!("super"),
|
||||||
fl!("arrow-keys")
|
fl!("arrow-keys")
|
||||||
))
|
)),
|
||||||
.size(14),
|
|
||||||
)),
|
)),
|
||||||
padded_control(row!(
|
padded_control(row!(
|
||||||
text(fl!("toggle-floating-window"))
|
text::body(fl!("toggle-floating-window")).width(Length::Fill),
|
||||||
.size(14)
|
text::body(format!("{} + G", fl!("super"))),
|
||||||
.width(Length::Fill),
|
|
||||||
text(format!("{} + G", fl!("super"))).size(14),
|
|
||||||
)),
|
)),
|
||||||
padded_control(divider::horizontal::default()),
|
padded_control(divider::horizontal::default()),
|
||||||
padded_control(
|
padded_control(
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,15 @@ use cosmic::{
|
||||||
futures::{channel::mpsc, SinkExt, StreamExt, TryFutureExt},
|
futures::{channel::mpsc, SinkExt, StreamExt, TryFutureExt},
|
||||||
subscription,
|
subscription,
|
||||||
wayland::popup::{destroy_popup, get_popup},
|
wayland::popup::{destroy_popup, get_popup},
|
||||||
widget::{column, row, text, vertical_space},
|
widget::{column, row, vertical_space},
|
||||||
window, Alignment, Length, Rectangle, Subscription,
|
window, Alignment, Length, Rectangle, Subscription,
|
||||||
},
|
},
|
||||||
iced_core::alignment::{Horizontal, Vertical},
|
iced_core::alignment::{Horizontal, Vertical},
|
||||||
iced_style::application,
|
iced_style::application,
|
||||||
iced_widget::{horizontal_rule, Column},
|
iced_widget::{horizontal_rule, Column},
|
||||||
widget::{
|
widget::{
|
||||||
button, container, divider, grid, horizontal_space, icon, rectangle_tracker::*, Button,
|
button, container, divider, grid, horizontal_space, icon, rectangle_tracker::*, text,
|
||||||
Grid, Space,
|
Button, Grid, Space,
|
||||||
},
|
},
|
||||||
Command, Element, Theme,
|
Command, Element, Theme,
|
||||||
};
|
};
|
||||||
|
|
@ -565,7 +565,7 @@ impl cosmic::Application for Window {
|
||||||
let mut day_of_week_bag = Bag::empty();
|
let mut day_of_week_bag = Bag::empty();
|
||||||
day_of_week_bag.weekday = Some(components::Text::Long);
|
day_of_week_bag.weekday = Some(components::Text::Long);
|
||||||
|
|
||||||
let day_of_week = text(self.format(day_of_week_bag, &self.date_selected)).size(14);
|
let day_of_week = text::body(self.format(day_of_week_bag, &self.date_selected));
|
||||||
|
|
||||||
let month_controls = row![
|
let month_controls = row![
|
||||||
button::icon(icon::from_name("go-previous-symbolic"))
|
button::icon(icon::from_name("go-previous-symbolic"))
|
||||||
|
|
@ -631,7 +631,7 @@ impl cosmic::Application for Window {
|
||||||
.padding([12, 20]),
|
.padding([12, 20]),
|
||||||
calender.padding([0, 12].into()),
|
calender.padding([0, 12].into()),
|
||||||
padded_control(divider::horizontal::default()),
|
padded_control(divider::horizontal::default()),
|
||||||
menu_button(text(fl!("datetime-settings")).size(14))
|
menu_button(text::body(fl!("datetime-settings")))
|
||||||
.on_press(Message::OpenDateTimeSettings),
|
.on_press(Message::OpenDateTimeSettings),
|
||||||
]
|
]
|
||||||
.padding([8, 0]);
|
.padding([8, 0]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue