chore: adapt to libcosmic row/column changes
Co-authored-by: Vukašin Vojinović <150025636+git-f0x@users.noreply.github.com>
This commit is contained in:
parent
251162f846
commit
04da80bb90
17 changed files with 36 additions and 36 deletions
|
|
@ -888,7 +888,7 @@ impl cosmic::Application for SettingsApp {
|
|||
} else if let Some(sub_pages) = self.pages.sub_pages(self.active_page) {
|
||||
self.sub_page_view(sub_pages)
|
||||
} else {
|
||||
return self.page_container(row::row());
|
||||
return self.page_container(cosmic::widget::space());
|
||||
};
|
||||
|
||||
container(view).into()
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ impl Page {
|
|||
fn apps() -> Section<crate::pages::Message> {
|
||||
Section::default().view::<Page>(move |_binder, page, section| {
|
||||
let Some(mime_apps) = page.mime_apps.as_ref() else {
|
||||
return widget::row().into();
|
||||
return widget::space().into();
|
||||
};
|
||||
|
||||
// Avoid creating popup_dropdown for empty app lists.
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ pub fn legacy_application_scaling() -> Section<crate::pages::Message> {
|
|||
.title(§ion.title)
|
||||
.add(widget::settings::item_row(vec![
|
||||
widget::radio(
|
||||
widget::column()
|
||||
widget::column::with_capacity(2)
|
||||
.push(text::body(&descriptions[gaming]))
|
||||
.push(text::caption(&descriptions[gaming_desc])),
|
||||
XwaylandDescaling::Fractional,
|
||||
|
|
@ -370,7 +370,7 @@ pub fn legacy_application_scaling() -> Section<crate::pages::Message> {
|
|||
]))
|
||||
.add(widget::settings::item_row(vec![
|
||||
widget::radio(
|
||||
widget::column()
|
||||
widget::column::with_capacity(2)
|
||||
.push(text::body(&descriptions[apps]))
|
||||
.push(text::caption(&descriptions[apps_desc])),
|
||||
XwaylandDescaling::Enabled,
|
||||
|
|
@ -382,7 +382,7 @@ pub fn legacy_application_scaling() -> Section<crate::pages::Message> {
|
|||
]))
|
||||
.add(widget::settings::item_row(vec![
|
||||
widget::radio(
|
||||
widget::column()
|
||||
widget::column::with_capacity(2)
|
||||
.push(text::body(&descriptions[compat]))
|
||||
.push(text::caption(&descriptions[compat_desc])),
|
||||
XwaylandDescaling::Disabled,
|
||||
|
|
|
|||
|
|
@ -839,7 +839,7 @@ fn connected_devices() -> Section<crate::pages::Message> {
|
|||
.position(widget::popover::Position::Bottom)
|
||||
.on_close(Message::PopupDevice(None))
|
||||
.popup(
|
||||
widget::column()
|
||||
widget::column::with_capacity(2)
|
||||
.push_maybe(device.is_connected().then(|| {
|
||||
popup_button(
|
||||
Some(Message::DisconnectDevice(path.clone())),
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ pub fn button(
|
|||
let theme = theme.cosmic();
|
||||
let background = Background::Color(theme.palette.neutral_4.into());
|
||||
|
||||
cosmic::widget::column()
|
||||
cosmic::widget::column::with_capacity(2)
|
||||
.push(
|
||||
cosmic::widget::button::custom_image_button(
|
||||
cosmic::widget::column::with_children([
|
||||
cosmic::widget::row()
|
||||
cosmic::widget::row::with_capacity(ICON_PREV_ROW)
|
||||
.extend(
|
||||
handles
|
||||
.iter()
|
||||
|
|
@ -47,7 +47,7 @@ pub fn button(
|
|||
)
|
||||
.spacing(theme.space_xxxs())
|
||||
.into(),
|
||||
cosmic::widget::row()
|
||||
cosmic::widget::row::with_capacity(ICON_PREV_ROW)
|
||||
.extend(
|
||||
handles
|
||||
.iter()
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ impl<'a, Message: 'static + Clone> AppletReorderList<'a, Message> {
|
|||
let is_dragged = active_dnd.as_ref().is_some_and(|dnd| dnd.id == info.id);
|
||||
|
||||
let content = if is_dragged {
|
||||
row().height(Length::Fixed(32.0))
|
||||
row([]).height(Length::Fixed(32.0))
|
||||
} else {
|
||||
row::with_children(vec![
|
||||
icon::from_name("grip-lines-symbolic")
|
||||
|
|
|
|||
|
|
@ -1202,7 +1202,7 @@ pub fn display_arrangement() -> Section<crate::pages::Message> {
|
|||
space_xxs, space_m, ..
|
||||
} = cosmic::theme::spacing();
|
||||
|
||||
column()
|
||||
column::with_capacity(2)
|
||||
.push(
|
||||
text::body(&descriptions[display_arrangement_desc])
|
||||
.apply(container)
|
||||
|
|
@ -1249,7 +1249,7 @@ pub fn display_configuration() -> Section<crate::pages::Message> {
|
|||
let descriptions = §ion.descriptions;
|
||||
|
||||
let Some(&active_id) = page.display_tabs.active_data::<OutputKey>() else {
|
||||
return column().into();
|
||||
return widget::space().into();
|
||||
};
|
||||
|
||||
let active_output = &page.list.outputs[active_id];
|
||||
|
|
@ -1351,7 +1351,7 @@ pub fn display_configuration() -> Section<crate::pages::Message> {
|
|||
items
|
||||
});
|
||||
|
||||
let mut content = column().spacing(cosmic::theme::spacing().space_xs);
|
||||
let mut content = column::with_capacity(2).spacing(cosmic::theme::spacing().space_xs);
|
||||
|
||||
if page.list.outputs.len() > 1 {
|
||||
let display_switcher = tab_bar::horizontal(&page.display_tabs)
|
||||
|
|
|
|||
|
|
@ -569,7 +569,7 @@ impl Page {
|
|||
}
|
||||
}
|
||||
|
||||
widget::column()
|
||||
widget::column::with_capacity(2)
|
||||
.spacing(space_l)
|
||||
.push(toggler)
|
||||
.push(list)
|
||||
|
|
|
|||
|
|
@ -444,17 +444,17 @@ impl Page {
|
|||
.on_submit(|_| Message::EditCombination)
|
||||
.id(self.task_id.clone());
|
||||
|
||||
let name_control = widget::column()
|
||||
let name_control = widget::column::with_capacity(2)
|
||||
.spacing(4)
|
||||
.push(widget::text::body(fl!("shortcut-name")))
|
||||
.push(name_input);
|
||||
|
||||
let command_control = widget::column()
|
||||
let command_control = widget::column::with_capacity(2)
|
||||
.spacing(4)
|
||||
.push(widget::text::body(fl!("command")))
|
||||
.push(task_input);
|
||||
|
||||
let input_fields = widget::column()
|
||||
let input_fields = widget::column::with_capacity(2)
|
||||
.spacing(12)
|
||||
.push(name_control)
|
||||
.push(command_control)
|
||||
|
|
@ -491,7 +491,7 @@ impl Page {
|
|||
.width(Length::Fill)
|
||||
.align_x(Alignment::End);
|
||||
|
||||
widget::column()
|
||||
widget::column::with_capacity(2)
|
||||
.spacing(32)
|
||||
.push(controls)
|
||||
.push(add_keybinding_button)
|
||||
|
|
@ -739,7 +739,7 @@ fn shortcuts() -> Section<crate::pages::Message> {
|
|||
.width(Length::Fill)
|
||||
.align_x(Alignment::End);
|
||||
|
||||
widget::column()
|
||||
widget::column::with_capacity(2)
|
||||
.push(content)
|
||||
.push(add_shortcut)
|
||||
.spacing(24)
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ fn category_item(category: Category, name: &str, modified: u16) -> Element<'_, M
|
|||
let control = if modified == 0 {
|
||||
Element::from(icon)
|
||||
} else {
|
||||
widget::row()
|
||||
widget::row::with_capacity(2)
|
||||
.push(text::body(fl!("modified", count = modified)))
|
||||
.push(icon)
|
||||
.into()
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
|
||||
let device_list = wifi_devices
|
||||
.chain(wired_devices)
|
||||
.fold(widget::column(), |column, device| column.push(device))
|
||||
.fold(widget::column([]), |column, device| column.push(device))
|
||||
.push(crate::widget::page_list_item(
|
||||
fl!("vpn"),
|
||||
&descs[vpn_desc],
|
||||
|
|
|
|||
|
|
@ -990,7 +990,7 @@ fn devices_view() -> Section<crate::pages::Message> {
|
|||
ref active_conns, ..
|
||||
}) = page.nm_state
|
||||
else {
|
||||
return cosmic::widget::column().into();
|
||||
return cosmic::widget::space().into();
|
||||
};
|
||||
|
||||
let spacing = cosmic::theme::spacing();
|
||||
|
|
@ -1050,7 +1050,7 @@ fn devices_view() -> Section<crate::pages::Message> {
|
|||
.position(widget::popover::Position::Bottom)
|
||||
.on_close(Message::ViewMore(None))
|
||||
.popup(
|
||||
widget::column()
|
||||
widget::column::with_capacity(3)
|
||||
.push_maybe(is_connected.then(|| {
|
||||
popup_button(
|
||||
Message::Deactivate(uuid.clone()),
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
widget::button::standard(fl!("cancel")).on_press(Message::CancelDialog);
|
||||
|
||||
let control: Element<_> = if let Some(identity) = identity {
|
||||
column::column()
|
||||
widget::Column::new()
|
||||
.spacing(8)
|
||||
.push(
|
||||
widget::text_input::text_input(fl!("identity"), identity)
|
||||
|
|
@ -263,7 +263,7 @@ impl page::Page<crate::pages::Message> for Page {
|
|||
info_items = info_items.add(widget::settings::item(fl!("password"), pass.unsecure()));
|
||||
}
|
||||
|
||||
let content = column::column()
|
||||
let content = column::with_capacity(3)
|
||||
.spacing(spacing.space_s)
|
||||
.push(qr_section)
|
||||
.push(description)
|
||||
|
|
@ -877,7 +877,7 @@ fn devices_view() -> Section<crate::pages::Message> {
|
|||
.descriptions(descriptions)
|
||||
.view::<Page>(move |_binder, page, section| {
|
||||
let Some(NmState { ref state, .. }) = page.nm_state else {
|
||||
return cosmic::widget::column().into();
|
||||
return cosmic::widget::space().into();
|
||||
};
|
||||
|
||||
let spacing = cosmic::theme::spacing();
|
||||
|
|
@ -976,7 +976,7 @@ fn devices_view() -> Section<crate::pages::Message> {
|
|||
.position(widget::popover::Position::Bottom)
|
||||
.on_close(Message::ViewMore(None))
|
||||
.popup(
|
||||
widget::column()
|
||||
widget::column::with_capacity(4)
|
||||
.push_maybe(is_connected.then(|| {
|
||||
popup_button(
|
||||
Message::Disconnect(network.ssid.clone()),
|
||||
|
|
@ -1081,7 +1081,7 @@ fn devices_view() -> Section<crate::pages::Message> {
|
|||
.position(widget::popover::Position::Bottom)
|
||||
.on_close(Message::ViewMore(None))
|
||||
.popup(
|
||||
widget::column()
|
||||
widget::column::with_capacity(4)
|
||||
.push_maybe(is_connected.then(|| {
|
||||
popup_button(
|
||||
Message::Disconnect(network.ssid.clone()),
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ impl Page {
|
|||
.position(widget::popover::Position::Bottom)
|
||||
.on_close(Message::ViewMore(None))
|
||||
.popup(
|
||||
widget::column()
|
||||
widget::column::with_capacity(3)
|
||||
.push_maybe(is_connected.then(|| {
|
||||
popup_button(
|
||||
Message::Deactivate(connection.uuid.clone()),
|
||||
|
|
@ -575,7 +575,7 @@ fn devices_view() -> Section<crate::pages::Message> {
|
|||
.descriptions(descriptions)
|
||||
.view::<Page>(move |_binder, page, section| {
|
||||
let Some(ref nm_state) = page.nm_state else {
|
||||
return cosmic::widget::column().into();
|
||||
return cosmic::widget::space().into();
|
||||
};
|
||||
|
||||
let spacing = cosmic::theme::spacing();
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ fn connected_devices() -> Section<crate::pages::Message> {
|
|||
.spacing(8)
|
||||
.push(text::heading(§ion.title))
|
||||
.push(
|
||||
widget::column()
|
||||
widget::column::with_capacity(devices.len())
|
||||
.extend(
|
||||
devices
|
||||
.into_iter()
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ fn input() -> Section<crate::pages::Message> {
|
|||
.descriptions(descriptions)
|
||||
.view::<Page>(move |_binder, page, section| {
|
||||
if page.model.sources().is_empty() {
|
||||
return widget::row().into();
|
||||
return widget::space().into();
|
||||
}
|
||||
|
||||
let slider = if page.amplification_source {
|
||||
|
|
@ -399,10 +399,10 @@ fn output() -> Section<crate::pages::Message> {
|
|||
.add(settings::item(&*section.descriptions[device], devices))
|
||||
.add(settings::item(
|
||||
&*section.descriptions[balance],
|
||||
widget::row::with_capacity(4)
|
||||
widget::row::with_capacity(5)
|
||||
.align_y(Alignment::Center)
|
||||
.push(
|
||||
widget::column::column()
|
||||
widget::column::with_capacity(2)
|
||||
.align_x(Alignment::Center)
|
||||
.push(
|
||||
widget::text::body(&*section.descriptions[left])
|
||||
|
|
@ -422,7 +422,7 @@ fn output() -> Section<crate::pages::Message> {
|
|||
)
|
||||
.push(horizontal_space().width(8.))
|
||||
.push(
|
||||
widget::column::column()
|
||||
widget::column::with_capacity(2)
|
||||
.align_x(Alignment::Center)
|
||||
.push(
|
||||
widget::text::body(&*section.descriptions[right])
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ pub fn color_picker_context_view<'a, Message: Clone + 'static>(
|
|||
.apply(container)
|
||||
.center_x(Length::Fill);
|
||||
|
||||
cosmic::widget::column()
|
||||
column::with_capacity(2)
|
||||
.push_maybe(description)
|
||||
.push(color_picker)
|
||||
.align_x(Alignment::Center)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue