fix(applets context): center text without description
This commit is contained in:
parent
d76c564feb
commit
23ff6e9fcc
17 changed files with 325 additions and 303 deletions
498
Cargo.lock
generated
498
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -48,7 +48,7 @@ lto = "thin"
|
||||||
# smithay-client-toolkit = { git = "https://github.com/smithay/client-toolkit//", rev = "c583de8" }
|
# smithay-client-toolkit = { git = "https://github.com/smithay/client-toolkit//", rev = "c583de8" }
|
||||||
|
|
||||||
[patch.'https://github.com/pop-os/cosmic-protocols']
|
[patch.'https://github.com/pop-os/cosmic-protocols']
|
||||||
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols//", rev = "27d70b6" }
|
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols//", rev = "d218c76" }
|
||||||
|
|
||||||
# For development and testing purposes
|
# For development and testing purposes
|
||||||
# [patch.'https://github.com/pop-os/libcosmic']
|
# [patch.'https://github.com/pop-os/libcosmic']
|
||||||
|
|
|
||||||
|
|
@ -932,7 +932,7 @@ impl SettingsApp {
|
||||||
}
|
}
|
||||||
|
|
||||||
let view = self
|
let view = self
|
||||||
.page_container(settings::view_column(sections_column).padding(0))
|
.page_container(settings::view_column(sections_column))
|
||||||
.apply(scrollable)
|
.apply(scrollable)
|
||||||
.height(Length::Fill)
|
.height(Length::Fill)
|
||||||
.apply(|w| id_container(w, self.id()));
|
.apply(|w| id_container(w, self.id()));
|
||||||
|
|
@ -1050,7 +1050,7 @@ impl SettingsApp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.page_container(settings::view_column(sections).padding(0))
|
self.page_container(settings::view_column(sections))
|
||||||
.apply(scrollable)
|
.apply(scrollable)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -597,7 +597,7 @@ fn status() -> Section<crate::pages::Message> {
|
||||||
} else {
|
} else {
|
||||||
text::body(&descriptions[bluetooth_heading]).into()
|
text::body(&descriptions[bluetooth_heading]).into()
|
||||||
},
|
},
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
if page.popup_setting {
|
if page.popup_setting {
|
||||||
widget::popover(
|
widget::popover(
|
||||||
widget::button::icon(widget::icon::from_name(
|
widget::button::icon(widget::icon::from_name(
|
||||||
|
|
@ -735,7 +735,7 @@ fn connected_devices() -> Section<crate::pages::Message> {
|
||||||
.wrapping(Wrapping::Word)
|
.wrapping(Wrapping::Word)
|
||||||
.into()
|
.into()
|
||||||
},
|
},
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
match device.enabled {
|
match device.enabled {
|
||||||
Active::Enabled => widget::text(&descriptions[device_connected]).into(),
|
Active::Enabled => widget::text(&descriptions[device_connected]).into(),
|
||||||
Active::Enabling => widget::text(&descriptions[device_connecting])
|
Active::Enabling => widget::text(&descriptions[device_connecting])
|
||||||
|
|
@ -790,7 +790,7 @@ fn available_devices() -> Section<crate::pages::Message> {
|
||||||
let mut items = vec![
|
let mut items = vec![
|
||||||
widget::icon::from_name(device.icon).size(16).into(),
|
widget::icon::from_name(device.icon).size(16).into(),
|
||||||
text(device.alias_or_addr()).wrapping(Wrapping::Word).into(),
|
text(device.alias_or_addr()).wrapping(Wrapping::Word).into(),
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if device.enabled == Active::Enabling {
|
if device.enabled == Active::Enabling {
|
||||||
|
|
@ -840,7 +840,7 @@ fn multiple_adapter() -> Section<crate::pages::Message> {
|
||||||
.into(),
|
.into(),
|
||||||
widget::horizontal_space().width(theme.space_xxs()).into(),
|
widget::horizontal_space().width(theme.space_xxs()).into(),
|
||||||
text(&adapter.alias).wrapping(Wrapping::Word).into(),
|
text(&adapter.alias).wrapping(Wrapping::Word).into(),
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
widget::icon::from_name("go-next-symbolic").into(),
|
widget::icon::from_name("go-next-symbolic").into(),
|
||||||
];
|
];
|
||||||
if page.adapter_connected(path) {
|
if page.adapter_connected(path) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ use std::sync::Arc;
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
config::{CosmicTk, FontConfig},
|
config::{CosmicTk, FontConfig},
|
||||||
iced::Length,
|
|
||||||
iced_core::text::Wrapping,
|
iced_core::text::Wrapping,
|
||||||
theme,
|
theme,
|
||||||
widget::{self, settings, svg},
|
widget::{self, settings, svg},
|
||||||
|
|
@ -89,7 +88,7 @@ pub fn selection_context<'a>(
|
||||||
widget::text::body(&**family)
|
widget::text::body(&**family)
|
||||||
.wrapping(Wrapping::Word)
|
.wrapping(Wrapping::Word)
|
||||||
.into(),
|
.into(),
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
if selected {
|
if selected {
|
||||||
widget::icon::from_name("object-select-symbolic")
|
widget::icon::from_name("object-select-symbolic")
|
||||||
.size(16)
|
.size(16)
|
||||||
|
|
|
||||||
|
|
@ -1568,9 +1568,7 @@ pub fn mode_and_colors() -> Section<crate::pages::Message> {
|
||||||
.title(fl!("mode-and-colors"))
|
.title(fl!("mode-and-colors"))
|
||||||
.descriptions(descriptions)
|
.descriptions(descriptions)
|
||||||
.view::<Page>(move |_binder, page, section| {
|
.view::<Page>(move |_binder, page, section| {
|
||||||
let Spacing {
|
let Spacing { space_xxs, .. } = cosmic::theme::active().cosmic().spacing;
|
||||||
space_xxs, space_s, ..
|
|
||||||
} = cosmic::theme::active().cosmic().spacing;
|
|
||||||
|
|
||||||
let descriptions = §ion.descriptions;
|
let descriptions = §ion.descriptions;
|
||||||
let palette = &page.theme_builder.palette.as_ref();
|
let palette = &page.theme_builder.palette.as_ref();
|
||||||
|
|
@ -1728,7 +1726,7 @@ pub fn mode_and_colors() -> Section<crate::pages::Message> {
|
||||||
)
|
)
|
||||||
.direction(Direction::Horizontal(Scrollbar::new()))
|
.direction(Direction::Horizontal(Scrollbar::new()))
|
||||||
]
|
]
|
||||||
.padding([16, space_s, 0, space_s])
|
.padding([16, 0, 0, 0])
|
||||||
.spacing(space_xxs),
|
.spacing(space_xxs),
|
||||||
)
|
)
|
||||||
.add(
|
.add(
|
||||||
|
|
|
||||||
|
|
@ -226,9 +226,8 @@ impl Page {
|
||||||
) -> Element<crate::pages::Message> {
|
) -> Element<crate::pages::Message> {
|
||||||
let cosmic::cosmic_theme::Spacing {
|
let cosmic::cosmic_theme::Spacing {
|
||||||
space_xxxs,
|
space_xxxs,
|
||||||
space_xxs,
|
|
||||||
space_xs,
|
space_xs,
|
||||||
space_s,
|
space_l,
|
||||||
..
|
..
|
||||||
} = theme::active().cosmic().spacing;
|
} = theme::active().cosmic().spacing;
|
||||||
let mut list_column = list_column();
|
let mut list_column = list_column();
|
||||||
|
|
@ -262,7 +261,11 @@ impl Page {
|
||||||
icon::from_name(&*info.icon).size(32).icon().into(),
|
icon::from_name(&*info.icon).size(32).icon().into(),
|
||||||
column::with_capacity(2)
|
column::with_capacity(2)
|
||||||
.push(text::body(info.name.clone()))
|
.push(text::body(info.name.clone()))
|
||||||
.push(text::caption(info.description.clone()))
|
.push_maybe(if info.description.is_empty() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(text::caption(info.description.clone()))
|
||||||
|
})
|
||||||
.spacing(space_xxxs)
|
.spacing(space_xxxs)
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.into(),
|
.into(),
|
||||||
|
|
@ -295,7 +298,7 @@ impl Page {
|
||||||
.on_press(msg_map(Message::AddApplet(info.clone())))
|
.on_press(msg_map(Message::AddApplet(info.clone())))
|
||||||
.into(),
|
.into(),
|
||||||
])
|
])
|
||||||
.padding([0, space_s])
|
.padding([space_xxxs, 0])
|
||||||
.spacing(space_xs)
|
.spacing(space_xs)
|
||||||
.align_y(Alignment::Center),
|
.align_y(Alignment::Center),
|
||||||
);
|
);
|
||||||
|
|
@ -317,7 +320,7 @@ impl Page {
|
||||||
.push(search)
|
.push(search)
|
||||||
.push(list_column)
|
.push(list_column)
|
||||||
.align_x(Alignment::Center)
|
.align_x(Alignment::Center)
|
||||||
.spacing(space_xxs)
|
.spacing(space_l)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@ pub(crate) fn configuration<P: page::Page<crate::pages::Message> + PanelPage>(
|
||||||
.find(|(_, v)| v.id == page.applets_page_id())
|
.find(|(_, v)| v.id == page.applets_page_id())
|
||||||
{
|
{
|
||||||
let control = row::with_children(vec![
|
let control = row::with_children(vec![
|
||||||
horizontal_space().width(Length::Fill).into(),
|
horizontal_space().into(),
|
||||||
icon::from_name("go-next-symbolic").size(16).into(),
|
icon::from_name("go-next-symbolic").size(16).into(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1297,7 +1297,7 @@ pub fn settings() -> Section<crate::pages::Message> {
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.push(category_selection)
|
.push(category_selection)
|
||||||
.push(cosmic::widget::horizontal_space().width(Length::Fill))
|
.push(cosmic::widget::horizontal_space())
|
||||||
.push_maybe(add_button)
|
.push_maybe(add_button)
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1073,15 +1073,16 @@ pub fn display_arrangement() -> Section<crate::pages::Message> {
|
||||||
.show_while::<Page>(|page| page.list.outputs.len() > 1)
|
.show_while::<Page>(|page| page.list.outputs.len() > 1)
|
||||||
.view::<Page>(move |_binder, page, section| {
|
.view::<Page>(move |_binder, page, section| {
|
||||||
let descriptions = §ion.descriptions;
|
let descriptions = §ion.descriptions;
|
||||||
let theme = cosmic::theme::active();
|
let cosmic::cosmic_theme::Spacing {
|
||||||
|
space_xxs, space_m, ..
|
||||||
|
} = cosmic::theme::active().cosmic().spacing;
|
||||||
|
|
||||||
column()
|
column()
|
||||||
.padding(cosmic::iced::Padding::from([
|
.push(
|
||||||
theme.cosmic().space_s(),
|
text::body(&descriptions[display_arrangement_desc])
|
||||||
theme.cosmic().space_m(),
|
.apply(container)
|
||||||
]))
|
.padding([space_xxs, space_m]),
|
||||||
.spacing(theme.cosmic().space_xs())
|
)
|
||||||
.push(widget::text::body(&descriptions[display_arrangement_desc]))
|
|
||||||
.push({
|
.push({
|
||||||
Arrangement::new(&page.list, &page.display_tabs)
|
Arrangement::new(&page.list, &page.display_tabs)
|
||||||
.on_select(|id| pages::Message::Displays(Message::Display(id)))
|
.on_select(|id| pages::Message::Displays(Message::Display(id)))
|
||||||
|
|
@ -1094,9 +1095,12 @@ pub fn display_arrangement() -> Section<crate::pages::Message> {
|
||||||
.width(Length::Shrink)
|
.width(Length::Shrink)
|
||||||
.direction(Direction::Horizontal(Scrollbar::new()))
|
.direction(Direction::Horizontal(Scrollbar::new()))
|
||||||
.apply(container)
|
.apply(container)
|
||||||
|
.padding([48, 32, 32, 32])
|
||||||
.center_x(Length::Fill)
|
.center_x(Length::Fill)
|
||||||
})
|
})
|
||||||
.apply(widget::list::container)
|
.apply(container)
|
||||||
|
.class(cosmic::theme::Container::List)
|
||||||
|
.width(Length::Fill)
|
||||||
.into()
|
.into()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -1224,7 +1228,7 @@ pub fn display_configuration() -> Section<crate::pages::Message> {
|
||||||
content = content.push(display_switcher).push(display_enable);
|
content = content.push(display_switcher).push(display_enable);
|
||||||
} else {
|
} else {
|
||||||
content = content
|
content = content
|
||||||
.push(widget::text::heading(&descriptions[options_label]))
|
.push(text::heading(&descriptions[options_label]))
|
||||||
.push_maybe(display_options.map(|items| {
|
.push_maybe(display_options.map(|items| {
|
||||||
let mut column = list_column();
|
let mut column = list_column();
|
||||||
for item in items {
|
for item in items {
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,10 @@
|
||||||
|
|
||||||
use super::{Message, NightLight};
|
use super::{Message, NightLight};
|
||||||
use crate::pages;
|
use crate::pages;
|
||||||
use cosmic::iced_core::{Alignment, Length, Padding};
|
use cosmic::iced_core::{Alignment, Length};
|
||||||
use cosmic::prelude::CollectionWidget;
|
use cosmic::widget::{
|
||||||
use cosmic::widget::{button, column, icon, list_column, row, toggler};
|
button, column, container, icon, list_column, row, settings, text, toggler, vertical_space,
|
||||||
|
};
|
||||||
use cosmic::{Apply, Element, Task};
|
use cosmic::{Apply, Element, Task};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
|
@ -14,33 +15,40 @@ pub fn view(
|
||||||
description: &'static str,
|
description: &'static str,
|
||||||
button: Option<(&'static str, Message)>,
|
button: Option<(&'static str, Message)>,
|
||||||
) -> Element<'static, Message> {
|
) -> Element<'static, Message> {
|
||||||
let theme = cosmic::theme::active();
|
let cosmic::cosmic_theme::Spacing {
|
||||||
let theme = theme.cosmic();
|
space_xxs, space_l, ..
|
||||||
|
} = cosmic::theme::active().cosmic().spacing;
|
||||||
let has_checkmark = button.is_none();
|
let has_checkmark = button.is_none();
|
||||||
|
|
||||||
let content = column::with_capacity(3)
|
let content = column::with_capacity(4)
|
||||||
.padding(Padding::from([theme.space_xxs(), theme.space_l()]))
|
.padding([space_xxs, space_l])
|
||||||
.push(cosmic::widget::text::body(mode))
|
.push(text::body(mode))
|
||||||
.push(cosmic::widget::text::caption(description))
|
.push(text::caption(description))
|
||||||
.push(cosmic::widget::Space::new(Length::Fill, 12))
|
.push(vertical_space().height(12))
|
||||||
.push_maybe(button.map(|(text, message)| {
|
.push_maybe(button.map(|(text, message)| {
|
||||||
button::text(text)
|
button::text(text)
|
||||||
.class(cosmic::theme::Button::Link)
|
.class(cosmic::theme::Button::Link)
|
||||||
.trailing_icon(icon::from_name("go-next-symbolic").size(16))
|
.trailing_icon(icon::from_name("go-next-symbolic").size(16))
|
||||||
.padding(0)
|
|
||||||
.on_press(message)
|
.on_press(message)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if has_checkmark {
|
if has_checkmark {
|
||||||
row::with_capacity(2)
|
row::with_capacity(2)
|
||||||
.align_items(Alignment::Center)
|
.align_y(Alignment::Center)
|
||||||
.push(content)
|
.push(content)
|
||||||
.push(icon::from_name("object-select-symbolic").size(24))
|
.push(icon::from_name("object-select-symbolic").size(24))
|
||||||
.apply(Element::from)
|
.apply(Element::from)
|
||||||
.apply(cosmic::widget::list::container)
|
.apply(container)
|
||||||
|
.class(cosmic::theme::Container::List)
|
||||||
|
.padding(8)
|
||||||
|
.width(Length::Fill)
|
||||||
.into()
|
.into()
|
||||||
} else {
|
} else {
|
||||||
cosmic::widget::list::container(content).into()
|
container(content)
|
||||||
|
.class(cosmic::theme::Container::List)
|
||||||
|
.padding(8)
|
||||||
|
.width(Length::Fill)
|
||||||
|
.into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,14 +58,15 @@ impl super::Page {
|
||||||
|
|
||||||
// Displays the night light status, and a button for configuring it.
|
// Displays the night light status, and a button for configuring it.
|
||||||
container = container.add(
|
container = container.add(
|
||||||
cosmic::widget::settings::item::builder(&*super::text::NIGHT_LIGHT)
|
settings::item::builder(&*super::text::NIGHT_LIGHT)
|
||||||
.description(&*super::text::NIGHT_LIGHT_DESCRIPTION)
|
.description(&*super::text::NIGHT_LIGHT_DESCRIPTION)
|
||||||
.control(
|
.control(
|
||||||
row()
|
row()
|
||||||
.align_items(Alignment::Center)
|
.align_y(Alignment::Center)
|
||||||
.push(toggler(self.config.night_light_enabled, |enable| {
|
.push(
|
||||||
Message::NightLight(NightLight::Toggle(enable))
|
toggler(self.config.night_light_enabled)
|
||||||
}))
|
.on_toggle(Message::NightLight(NightLight::Toggle)),
|
||||||
|
)
|
||||||
.push(
|
.push(
|
||||||
button::icon(icon::from_name("go-next-symbolic"))
|
button::icon(icon::from_name("go-next-symbolic"))
|
||||||
.extra_small()
|
.extra_small()
|
||||||
|
|
|
||||||
|
|
@ -835,7 +835,7 @@ fn devices_view() -> Section<crate::pages::Message> {
|
||||||
|
|
||||||
let widget = widget::settings::item_row(vec![
|
let widget = widget::settings::item_row(vec![
|
||||||
identifier.into(),
|
identifier.into(),
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
controls.into(),
|
controls.into(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -676,7 +676,7 @@ fn devices_view() -> Section<crate::pages::Message> {
|
||||||
|
|
||||||
let widget = widget::settings::item_row(vec![
|
let widget = widget::settings::item_row(vec![
|
||||||
identifier.into(),
|
identifier.into(),
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
controls.into(),
|
controls.into(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -541,7 +541,7 @@ impl Page {
|
||||||
|
|
||||||
let widget = widget::settings::item_row(vec![
|
let widget = widget::settings::item_row(vec![
|
||||||
identifier.into(),
|
identifier.into(),
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
controls.into(),
|
controls.into(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ use std::str::FromStr;
|
||||||
use chrono::{Datelike, Timelike};
|
use chrono::{Datelike, Timelike};
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
cosmic_config::{self, ConfigGet, ConfigSet},
|
cosmic_config::{self, ConfigGet, ConfigSet},
|
||||||
iced::Length,
|
|
||||||
iced_core::text::Wrapping,
|
iced_core::text::Wrapping,
|
||||||
widget::{self, dropdown, settings},
|
widget::{self, dropdown, settings},
|
||||||
Apply, Element, Task,
|
Apply, Element, Task,
|
||||||
|
|
@ -339,7 +338,7 @@ impl Page {
|
||||||
fn timezone_context_item<'a>(&self, id: usize, timezone: &'a str) -> Element<'a, Message> {
|
fn timezone_context_item<'a>(&self, id: usize, timezone: &'a str) -> Element<'a, Message> {
|
||||||
widget::button::custom(widget::settings::item_row(vec![
|
widget::button::custom(widget::settings::item_row(vec![
|
||||||
widget::text::body(timezone).wrapping(Wrapping::Word).into(),
|
widget::text::body(timezone).wrapping(Wrapping::Word).into(),
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
]))
|
]))
|
||||||
.on_press(Message::Timezone(id))
|
.on_press(Message::Timezone(id))
|
||||||
.class(cosmic::theme::Button::Icon)
|
.class(cosmic::theme::Button::Icon)
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ impl Page {
|
||||||
})
|
})
|
||||||
.wrapping(Wrapping::Word)
|
.wrapping(Wrapping::Word)
|
||||||
.into(),
|
.into(),
|
||||||
widget::horizontal_space().width(Length::Fill).into(),
|
widget::horizontal_space().into(),
|
||||||
if is_installed {
|
if is_installed {
|
||||||
widget::icon::from_name("object-select-symbolic")
|
widget::icon::from_name("object-select-symbolic")
|
||||||
.size(16)
|
.size(16)
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ pub fn search_page_link<Message: 'static>(title: &str) -> button::TextButton<Mes
|
||||||
pub fn page_title<Message: 'static>(page: &page::Info) -> Element<Message> {
|
pub fn page_title<Message: 'static>(page: &page::Info) -> Element<Message> {
|
||||||
row::with_capacity(2)
|
row::with_capacity(2)
|
||||||
.push(text::title3(page.title.as_str()))
|
.push(text::title3(page.title.as_str()))
|
||||||
.push(horizontal_space().width(Length::Fill))
|
.push(horizontal_space())
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -110,9 +110,9 @@ pub fn display_container<'a, Message: 'a>(widget: Element<'a, Message>) -> Eleme
|
||||||
.class(crate::theme::display_container_frame());
|
.class(crate::theme::display_container_frame());
|
||||||
|
|
||||||
row::with_capacity(3)
|
row::with_capacity(3)
|
||||||
.push(horizontal_space().width(Length::Fill))
|
.push(horizontal_space())
|
||||||
.push(display)
|
.push(display)
|
||||||
.push(horizontal_space().width(Length::Fill))
|
.push(horizontal_space())
|
||||||
.padding([0, 0, 8, 0])
|
.padding([0, 0, 8, 0])
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +190,7 @@ pub fn sub_page_header<'a, Message: 'static + Clone>(
|
||||||
pub fn go_next_item<Msg: Clone + 'static>(description: &str, msg: Msg) -> cosmic::Element<'_, Msg> {
|
pub fn go_next_item<Msg: Clone + 'static>(description: &str, msg: Msg) -> cosmic::Element<'_, Msg> {
|
||||||
settings::item_row(vec![
|
settings::item_row(vec![
|
||||||
text::body(description).wrapping(Wrapping::Word).into(),
|
text::body(description).wrapping(Wrapping::Word).into(),
|
||||||
horizontal_space().width(Length::Fill).into(),
|
horizontal_space().into(),
|
||||||
icon::from_name("go-next-symbolic").size(16).icon().into(),
|
icon::from_name("go-next-symbolic").size(16).icon().into(),
|
||||||
])
|
])
|
||||||
.apply(widget::container)
|
.apply(widget::container)
|
||||||
|
|
@ -208,7 +208,7 @@ pub fn go_next_with_item<'a, Msg: Clone + 'static>(
|
||||||
) -> cosmic::Element<'_, Msg> {
|
) -> cosmic::Element<'_, Msg> {
|
||||||
settings::item_row(vec![
|
settings::item_row(vec![
|
||||||
text::body(description).wrapping(Wrapping::Word).into(),
|
text::body(description).wrapping(Wrapping::Word).into(),
|
||||||
horizontal_space().width(Length::Fill).into(),
|
horizontal_space().into(),
|
||||||
widget::row::with_capacity(2)
|
widget::row::with_capacity(2)
|
||||||
.push(item)
|
.push(item)
|
||||||
.push(icon::from_name("go-next-symbolic").size(16).icon())
|
.push(icon::from_name("go-next-symbolic").size(16).icon())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue