diff --git a/src/widget/mod.rs b/src/widget/mod.rs index 448bf2ea..3684b954 100644 --- a/src/widget/mod.rs +++ b/src/widget/mod.rs @@ -134,8 +134,6 @@ pub use nav_bar::nav_bar; pub mod nav_bar_toggle; pub use nav_bar_toggle::{nav_bar_toggle, NavBarToggle}; -pub mod navigation; - pub mod popover; pub use popover::{popover, Popover}; diff --git a/src/widget/navigation.rs b/src/widget/navigation.rs deleted file mode 100644 index 0fd4c7b8..00000000 --- a/src/widget/navigation.rs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2023 System76 -// SPDX-License-Identifier: MPL-2.0 - -use crate::widget::{button, column, container, horizontal_space, icon, list, row, text}; -use crate::{theme, Apply, Element}; -use iced::Length; - -#[must_use] -pub fn page_list_item<'a, Message: 'static + Clone>( - title: &'a str, - description: &'a str, - icon: &'a str, - message: Message, -) -> Element<'a, Message> { - let control = row::with_children(vec![ - horizontal_space(Length::Fill).into(), - icon::from_name("go-next-symbolic").size(16).into(), - ]); - - super::settings::item::builder(title) - .description(description) - .icon(icon::from_name(icon).size(16)) - .control(control) - .spacing(16) - .apply(container) - .padding([20, 24]) - .style(theme::Container::custom(list::style)) - .apply(button) - .style(theme::Button::Transparent) - .on_press(message) - .into() -} - -#[must_use] -pub fn sub_page_header<'a, Message: 'static + Clone>( - sub_page: &'a str, - parent_page: &'a str, - on_press: Message, -) -> Element<'a, Message> { - let previous_button = button::icon(icon::from_name("go-previous-symbolic")) - .extra_small() - .label(parent_page) - .spacing(16) - .style(button::Style::Link) - .on_press(on_press); - - let sub_page_header = row::with_capacity(2) - .push(text::title3(sub_page)) - .push(horizontal_space(Length::Fill)); - - column::with_capacity(2) - .push(previous_button) - .push(sub_page_header) - .spacing(6) - .into() -}