diff --git a/Cargo.toml b/Cargo.toml index 995c7d22..3567c2a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,7 @@ desktop = [ "process", "dep:freedesktop-desktop-entry", "dep:mime", + "dep:open", "dep:shlex", "tokio?/io-util", "tokio?/net", @@ -97,7 +98,7 @@ image = { version = "0.25.1", optional = true } lazy_static = "1.4.0" libc = { version = "0.2.155", optional = true } mime = { version = "0.3.17", optional = true } -open = "5.3.0" +open = { version = "5.3.0", optional = true } palette = "0.7.3" rfd = { version = "0.14.0", optional = true } rustix = { version = "0.38.34", features = [ diff --git a/src/widget/about.rs b/src/app/about.rs similarity index 100% rename from src/widget/about.rs rename to src/app/about.rs diff --git a/src/app/mod.rs b/src/app/mod.rs index 5d8db73d..454fd1ad 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -6,6 +6,9 @@ //! Check out our [application](https://github.com/pop-os/libcosmic/tree/master/examples/application) //! example in our repository. +#[cfg(feature = "desktop")] +pub mod about; + pub mod command; mod core; pub mod cosmic; @@ -52,14 +55,13 @@ use std::borrow::Cow; pub use self::command::Task; pub use self::core::Core; pub use self::settings::Settings; +use crate::prelude::*; use crate::theme::THEME; use crate::widget::{ container, context_drawer, horizontal_space, id_container, menu, nav_bar, popover, }; -use crate::{prelude::*, widget}; use apply::Apply; -use iced::alignment::Vertical; -use iced::{window, Alignment}; +use iced::window; use iced::{Length, Subscription}; pub use message::Message; use url::Url; @@ -73,7 +75,12 @@ use { }; #[cfg(feature = "desktop")] -use {crate::widget::About, std::collections::BTreeMap}; +use { + crate::app::about::About, + crate::widget, + iced::{alignment::Vertical, Alignment}, + std::collections::BTreeMap, +}; pub(crate) fn iced_settings( settings: Settings, diff --git a/src/widget/mod.rs b/src/widget/mod.rs index 8ad7190f..ecce1a86 100644 --- a/src/widget/mod.rs +++ b/src/widget/mod.rs @@ -361,6 +361,3 @@ pub mod tooltip { pub mod warning; #[doc(inline)] pub use warning::*; - -pub mod about; -pub use about::*;