From be4c0a0848fb0bc45002ea443b3871f2b8880e22 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 11 Nov 2024 11:11:49 -0700 Subject: [PATCH] Move about widget to new about feature --- Cargo.toml | 3 ++- src/widget/about.rs | 1 - src/widget/mod.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 57b59b6..21addb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,8 @@ name = "cosmic" default = ["multi-window"] # Accessibility support a11y = ["iced/a11y", "iced_accessibility"] +# Enable about widget +about = ["desktop", "dep:license"] # Builds support for animated images animated-image = ["image", "dep:async-fs", "tokio?/io-util", "tokio?/fs"] # XXX autosize should not be used on winit windows unless dialogs @@ -40,7 +42,6 @@ desktop = [ "process", "dep:freedesktop-desktop-entry", "dep:mime", - "dep:license", "dep:shlex", "tokio?/io-util", "tokio?/net", diff --git a/src/widget/about.rs b/src/widget/about.rs index a5bd0b3..5026d41 100644 --- a/src/widget/about.rs +++ b/src/widget/about.rs @@ -1,4 +1,3 @@ -#[cfg(feature = "desktop")] use { crate::{ iced::{Alignment, Length}, diff --git a/src/widget/mod.rs b/src/widget/mod.rs index b84e54e..52acf06 100644 --- a/src/widget/mod.rs +++ b/src/widget/mod.rs @@ -366,8 +366,8 @@ pub use warning::*; #[doc(inline)] pub use iced::widget::markdown; -#[cfg(feature = "desktop")] +#[cfg(feature = "about")] pub mod about; -#[cfg(feature = "desktop")] +#[cfg(feature = "about")] #[doc(inline)] pub use about::about;