summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml5
-rw-r--r--core/Cargo.toml3
-rw-r--r--core/src/color.rs6
-rw-r--r--core/src/lib.rs2
-rw-r--r--core/src/theme.rs (renamed from style/src/theme.rs)0
-rw-r--r--core/src/theme/palette.rs (renamed from style/src/theme/palette.rs)2
-rw-r--r--examples/color_palette/Cargo.toml2
-rw-r--r--examples/integration/src/controls.rs3
-rw-r--r--examples/integration/src/main.rs3
-rw-r--r--src/lib.rs7
-rw-r--r--src/time.rs2
-rw-r--r--style/Cargo.toml18
-rw-r--r--style/src/lib.rs21
-rw-r--r--widget/Cargo.toml1
-rw-r--r--widget/src/button.rs11
-rw-r--r--widget/src/checkbox.rs8
-rw-r--r--widget/src/combo_box.rs3
-rw-r--r--widget/src/container.rs3
-rw-r--r--widget/src/lib.rs3
-rw-r--r--widget/src/overlay/menu.rs3
-rw-r--r--widget/src/pane_grid.rs6
-rw-r--r--widget/src/pick_list.rs3
-rw-r--r--widget/src/progress_bar.rs5
-rw-r--r--widget/src/qr_code.rs4
-rw-r--r--widget/src/radio.rs5
-rw-r--r--widget/src/rule.rs3
-rw-r--r--widget/src/scrollable.rs3
-rw-r--r--widget/src/slider.rs6
-rw-r--r--widget/src/svg.rs4
-rw-r--r--widget/src/text_editor.rs3
-rw-r--r--widget/src/text_input.rs6
-rw-r--r--widget/src/toggler.rs6
-rw-r--r--widget/src/vertical_slider.rs3
-rw-r--r--winit/Cargo.toml1
-rw-r--r--winit/src/application.rs3
-rw-r--r--winit/src/lib.rs1
36 files changed, 43 insertions, 125 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 7f55ce0e..f446e2af 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -39,8 +39,6 @@ tokio = ["iced_futures/tokio"]
async-std = ["iced_futures/async-std"]
# Enables `smol` as the `executor::Default` on native platforms
smol = ["iced_futures/smol"]
-# Enables advanced color conversion via `palette`
-palette = ["iced_core/palette"]
# Enables querying system information
system = ["iced_winit/system"]
# Enables broken "sRGB linear" blending to reproduce color management of the Web
@@ -57,7 +55,6 @@ advanced = []
fira-sans = ["iced_renderer/fira-sans"]
[dependencies]
-iced_core.workspace = true
iced_futures.workspace = true
iced_renderer.workspace = true
iced_widget.workspace = true
@@ -90,7 +87,6 @@ members = [
"highlighter",
"renderer",
"runtime",
- "style",
"tiny_skia",
"wgpu",
"widget",
@@ -116,7 +112,6 @@ iced_graphics = { version = "0.13.0-dev", path = "graphics" }
iced_highlighter = { version = "0.13.0-dev", path = "highlighter" }
iced_renderer = { version = "0.13.0-dev", path = "renderer" }
iced_runtime = { version = "0.13.0-dev", path = "runtime" }
-iced_style = { version = "0.13.0-dev", path = "style" }
iced_tiny_skia = { version = "0.13.0-dev", path = "tiny_skia" }
iced_wgpu = { version = "0.13.0-dev", path = "wgpu" }
iced_widget = { version = "0.13.0-dev", path = "widget" }
diff --git a/core/Cargo.toml b/core/Cargo.toml
index 2360e822..e71b75ae 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -19,9 +19,8 @@ smol_str.workspace = true
thiserror.workspace = true
web-time.workspace = true
xxhash-rust.workspace = true
-
palette.workspace = true
-palette.optional = true
+once_cell.workspace = true
[target.'cfg(windows)'.dependencies]
raw-window-handle.workspace = true
diff --git a/core/src/color.rs b/core/src/color.rs
index 6526e220..da40ca15 100644
--- a/core/src/color.rs
+++ b/core/src/color.rs
@@ -1,4 +1,3 @@
-#[cfg(feature = "palette")]
use palette::rgb::{Srgb, Srgba};
/// A color in the `sRGB` color space.
@@ -210,7 +209,6 @@ macro_rules! color {
}};
}
-#[cfg(feature = "palette")]
/// Converts from palette's `Rgba` type to a [`Color`].
impl From<Srgba> for Color {
fn from(rgba: Srgba) -> Self {
@@ -218,7 +216,6 @@ impl From<Srgba> for Color {
}
}
-#[cfg(feature = "palette")]
/// Converts from [`Color`] to palette's `Rgba` type.
impl From<Color> for Srgba {
fn from(c: Color) -> Self {
@@ -226,7 +223,6 @@ impl From<Color> for Srgba {
}
}
-#[cfg(feature = "palette")]
/// Converts from palette's `Rgb` type to a [`Color`].
impl From<Srgb> for Color {
fn from(rgb: Srgb) -> Self {
@@ -234,7 +230,6 @@ impl From<Srgb> for Color {
}
}
-#[cfg(feature = "palette")]
/// Converts from [`Color`] to palette's `Rgb` type.
impl From<Color> for Srgb {
fn from(c: Color) -> Self {
@@ -242,7 +237,6 @@ impl From<Color> for Srgb {
}
}
-#[cfg(feature = "palette")]
#[cfg(test)]
mod tests {
use super::*;
diff --git a/core/src/lib.rs b/core/src/lib.rs
index 002336ee..d076413e 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -30,6 +30,7 @@ pub mod overlay;
pub mod renderer;
pub mod svg;
pub mod text;
+pub mod theme;
pub mod time;
pub mod touch;
pub mod widget;
@@ -76,6 +77,7 @@ pub use shadow::Shadow;
pub use shell::Shell;
pub use size::Size;
pub use text::Text;
+pub use theme::Theme;
pub use transformation::Transformation;
pub use vector::Vector;
pub use widget::Widget;
diff --git a/style/src/theme.rs b/core/src/theme.rs
index 21ba2a37..21ba2a37 100644
--- a/style/src/theme.rs
+++ b/core/src/theme.rs
diff --git a/style/src/theme/palette.rs b/core/src/theme/palette.rs
index 15a964cd..985a54a8 100644
--- a/style/src/theme/palette.rs
+++ b/core/src/theme/palette.rs
@@ -1,5 +1,5 @@
//! Define the colors of a theme.
-use crate::core::{color, Color};
+use crate::{color, Color};
use once_cell::sync::Lazy;
use palette::color_difference::Wcag21RelativeContrast;
diff --git a/examples/color_palette/Cargo.toml b/examples/color_palette/Cargo.toml
index 2da6c6ed..bf9bff19 100644
--- a/examples/color_palette/Cargo.toml
+++ b/examples/color_palette/Cargo.toml
@@ -7,6 +7,6 @@ publish = false
[dependencies]
iced.workspace = true
-iced.features = ["canvas", "palette"]
+iced.features = ["canvas"]
palette.workspace = true
diff --git a/examples/integration/src/controls.rs b/examples/integration/src/controls.rs
index 473a7138..28050f8a 100644
--- a/examples/integration/src/controls.rs
+++ b/examples/integration/src/controls.rs
@@ -1,9 +1,8 @@
use iced_wgpu::Renderer;
use iced_widget::{column, container, row, slider, text, text_input};
use iced_winit::core::alignment;
-use iced_winit::core::{Color, Element, Length};
+use iced_winit::core::{Color, Element, Length, Theme};
use iced_winit::runtime::{Command, Program};
-use iced_winit::style::Theme;
pub struct Controls {
background_color: Color,
diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs
index 0e2e53ac..f53b5bf1 100644
--- a/examples/integration/src/main.rs
+++ b/examples/integration/src/main.rs
@@ -10,11 +10,10 @@ use iced_winit::conversion;
use iced_winit::core::mouse;
use iced_winit::core::renderer;
use iced_winit::core::window;
-use iced_winit::core::{Color, Font, Pixels, Size};
+use iced_winit::core::{Color, Font, Pixels, Size, Theme};
use iced_winit::futures;
use iced_winit::runtime::program;
use iced_winit::runtime::Debug;
-use iced_winit::style::Theme;
use iced_winit::winit;
use iced_winit::Clipboard;
diff --git a/src/lib.rs b/src/lib.rs
index 236c64d3..c596f2a6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -162,7 +162,6 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
use iced_widget::graphics;
use iced_widget::renderer;
-use iced_widget::style;
use iced_winit as shell;
use iced_winit::core;
use iced_winit::runtime;
@@ -186,15 +185,14 @@ pub mod advanced;
#[cfg(feature = "multi-window")]
pub mod multi_window;
-pub use style::theme;
-
pub use crate::core::alignment;
pub use crate::core::border;
pub use crate::core::color;
pub use crate::core::gradient;
+pub use crate::core::theme;
pub use crate::core::{
Alignment, Background, Border, Color, ContentFit, Degrees, Gradient,
- Length, Padding, Pixels, Point, Radians, Rectangle, Shadow, Size,
+ Length, Padding, Pixels, Point, Radians, Rectangle, Shadow, Size, Theme,
Transformation, Vector,
};
@@ -314,7 +312,6 @@ pub use renderer::Renderer;
pub use sandbox::Sandbox;
pub use settings::Settings;
pub use subscription::Subscription;
-pub use theme::Theme;
/// A generic widget.
///
diff --git a/src/time.rs b/src/time.rs
index e255d751..26d31c0a 100644
--- a/src/time.rs
+++ b/src/time.rs
@@ -1,5 +1,5 @@
//! Listen and react to time.
-pub use iced_core::time::{Duration, Instant};
+pub use crate::core::time::{Duration, Instant};
#[allow(unused_imports)]
#[cfg_attr(
diff --git a/style/Cargo.toml b/style/Cargo.toml
deleted file mode 100644
index 3f00e787..00000000
--- a/style/Cargo.toml
+++ /dev/null
@@ -1,18 +0,0 @@
-[package]
-name = "iced_style"
-description = "The default set of styles of Iced"
-version.workspace = true
-edition.workspace = true
-authors.workspace = true
-license.workspace = true
-repository.workspace = true
-homepage.workspace = true
-categories.workspace = true
-keywords.workspace = true
-
-[dependencies]
-iced_core.workspace = true
-iced_core.features = ["palette"]
-
-palette.workspace = true
-once_cell.workspace = true
diff --git a/style/src/lib.rs b/style/src/lib.rs
deleted file mode 100644
index bc0e37e9..00000000
--- a/style/src/lib.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-//! The styling library of Iced.
-//!
-//! It contains a set of styles and stylesheets for most of the built-in
-//! widgets.
-//!
-//! ![The foundations of the Iced ecosystem](https://github.com/iced-rs/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/foundations.png?raw=true)
-#![doc(
- html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
-)]
-#![forbid(unsafe_code, rust_2018_idioms)]
-#![deny(
- unused_results,
- // missing_docs,
- unused_results,
- rustdoc::broken_intra_doc_links
-)]
-pub use iced_core as core;
-
-pub mod theme;
-
-pub use theme::Theme;
diff --git a/widget/Cargo.toml b/widget/Cargo.toml
index e8e363c4..3c9ffddb 100644
--- a/widget/Cargo.toml
+++ b/widget/Cargo.toml
@@ -25,7 +25,6 @@ wgpu = ["iced_renderer/wgpu"]
[dependencies]
iced_renderer.workspace = true
iced_runtime.workspace = true
-iced_style.workspace = true
num-traits.workspace = true
thiserror.workspace = true
diff --git a/widget/src/button.rs b/widget/src/button.rs
index b5786baa..d0d3cb4a 100644
--- a/widget/src/button.rs
+++ b/widget/src/button.rs
@@ -6,21 +6,19 @@ use crate::core::layout;
use crate::core::mouse;
use crate::core::overlay;
use crate::core::renderer;
+use crate::core::theme::palette;
use crate::core::touch;
use crate::core::widget::tree::{self, Tree};
use crate::core::widget::Operation;
use crate::core::{
Background, Border, Clipboard, Color, Element, Layout, Length, Padding,
- Rectangle, Shadow, Shell, Size, Vector, Widget,
+ Rectangle, Shadow, Shell, Size, Theme, Vector, Widget,
};
-use crate::style::theme::palette;
-use crate::style::Theme;
/// A generic widget that produces a message when pressed.
///
/// ```no_run
-/// # type Button<'a, Message> =
-/// # iced_widget::Button<'a, Message, iced_widget::style::Theme, iced_widget::renderer::Renderer>;
+/// # type Button<'a, Message> = iced_widget::Button<'a, Message>;
/// #
/// #[derive(Clone)]
/// enum Message {
@@ -34,8 +32,7 @@ use crate::style::Theme;
/// be disabled:
///
/// ```
-/// # type Button<'a, Message> =
-/// # iced_widget::Button<'a, Message, iced_widget::style::Theme, iced_widget::renderer::Renderer>;
+/// # type Button<'a, Message> = iced_widget::Button<'a, Message>;
/// #
/// #[derive(Clone)]
/// enum Message {
diff --git a/widget/src/checkbox.rs b/widget/src/checkbox.rs
index e4fc2232..a297627b 100644
--- a/widget/src/checkbox.rs
+++ b/widget/src/checkbox.rs
@@ -5,23 +5,21 @@ use crate::core::layout;
use crate::core::mouse;
use crate::core::renderer;
use crate::core::text;
+use crate::core::theme::palette;
use crate::core::touch;
use crate::core::widget;
use crate::core::widget::tree::{self, Tree};
use crate::core::{
Background, Border, Clipboard, Color, Element, Layout, Length, Pixels,
- Rectangle, Shell, Size, Widget,
+ Rectangle, Shell, Size, Theme, Widget,
};
-use crate::style::theme::palette;
-use crate::style::Theme;
/// A box that can be checked.
///
/// # Example
///
/// ```no_run
-/// # type Checkbox<'a, Message> =
-/// # iced_widget::Checkbox<'a, Message, iced_widget::style::Theme, iced_widget::renderer::Renderer>;
+/// # type Checkbox<'a, Message> = iced_widget::Checkbox<'a, Message>;
/// #
/// pub enum Message {
/// CheckboxToggled(bool),
diff --git a/widget/src/combo_box.rs b/widget/src/combo_box.rs
index 1140f1c6..62c19137 100644
--- a/widget/src/combo_box.rs
+++ b/widget/src/combo_box.rs
@@ -10,10 +10,9 @@ use crate::core::text;
use crate::core::time::Instant;
use crate::core::widget::{self, Widget};
use crate::core::{
- Clipboard, Element, Length, Padding, Rectangle, Shell, Size, Vector,
+ Clipboard, Element, Length, Padding, Rectangle, Shell, Size, Theme, Vector,
};
use crate::overlay::menu;
-use crate::style::Theme;
use crate::text::LineHeight;
use crate::text_input::{self, TextInput};
diff --git a/widget/src/container.rs b/widget/src/container.rs
index 97b481a2..99d877fe 100644
--- a/widget/src/container.rs
+++ b/widget/src/container.rs
@@ -9,10 +9,9 @@ use crate::core::widget::tree::{self, Tree};
use crate::core::widget::{self, Operation};
use crate::core::{
Background, Border, Clipboard, Color, Element, Layout, Length, Padding,
- Pixels, Point, Rectangle, Shadow, Shell, Size, Vector, Widget,
+ Pixels, Point, Rectangle, Shadow, Shell, Size, Theme, Vector, Widget,
};
use crate::runtime::Command;
-use crate::style::Theme;
/// An element decorating some content.
///
diff --git a/widget/src/lib.rs b/widget/src/lib.rs
index cefafdbe..72596efc 100644
--- a/widget/src/lib.rs
+++ b/widget/src/lib.rs
@@ -14,7 +14,6 @@ pub use iced_renderer as renderer;
pub use iced_renderer::graphics;
pub use iced_runtime as runtime;
pub use iced_runtime::core;
-pub use iced_style as style;
mod column;
mod mouse_area;
@@ -135,5 +134,5 @@ pub mod qr_code;
#[doc(no_inline)]
pub use qr_code::QRCode;
+pub use crate::core::theme::{self, Theme};
pub use renderer::Renderer;
-pub use style::theme::{self, Theme};
diff --git a/widget/src/overlay/menu.rs b/widget/src/overlay/menu.rs
index e0887e59..2b9e0d03 100644
--- a/widget/src/overlay/menu.rs
+++ b/widget/src/overlay/menu.rs
@@ -11,11 +11,10 @@ use crate::core::touch;
use crate::core::widget::Tree;
use crate::core::{
Background, Border, Clipboard, Color, Length, Padding, Pixels, Point,
- Rectangle, Size, Vector,
+ Rectangle, Size, Theme, Vector,
};
use crate::core::{Element, Shell, Widget};
use crate::scrollable::{self, Scrollable};
-use crate::style::Theme;
/// A list of selectable options.
#[allow(missing_debug_implementations)]
diff --git a/widget/src/pane_grid.rs b/widget/src/pane_grid.rs
index ae9cd825..5403b2f5 100644
--- a/widget/src/pane_grid.rs
+++ b/widget/src/pane_grid.rs
@@ -40,9 +40,8 @@ use crate::core::widget;
use crate::core::widget::tree::{self, Tree};
use crate::core::{
Background, Border, Clipboard, Color, Element, Layout, Length, Pixels,
- Point, Rectangle, Shell, Size, Vector, Widget,
+ Point, Rectangle, Shell, Size, Theme, Vector, Widget,
};
-use crate::style::Theme;
const DRAG_DEADBAND_DISTANCE: f32 = 10.0;
const THICKNESS_RATIO: f32 = 25.0;
@@ -71,8 +70,7 @@ const THICKNESS_RATIO: f32 = 25.0;
/// ```no_run
/// # use iced_widget::{pane_grid, text};
/// #
-/// # type PaneGrid<'a, Message> =
-/// # iced_widget::PaneGrid<'a, Message, iced_widget::style::Theme, iced_widget::renderer::Renderer>;
+/// # type PaneGrid<'a, Message> = iced_widget::PaneGrid<'a, Message>;
/// #
/// enum PaneState {
/// SomePane,
diff --git a/widget/src/pick_list.rs b/widget/src/pick_list.rs
index 49daa89c..649daafe 100644
--- a/widget/src/pick_list.rs
+++ b/widget/src/pick_list.rs
@@ -11,10 +11,9 @@ use crate::core::touch;
use crate::core::widget::tree::{self, Tree};
use crate::core::{
Background, Border, Clipboard, Color, Element, Layout, Length, Padding,
- Pixels, Point, Rectangle, Shell, Size, Vector, Widget,
+ Pixels, Point, Rectangle, Shell, Size, Theme, Vector, Widget,
};
use crate::overlay::menu::{self, Menu};
-use crate::style::Theme;
use std::borrow::Borrow;
diff --git a/widget/src/progress_bar.rs b/widget/src/progress_bar.rs
index 62d319f4..b667b506 100644
--- a/widget/src/progress_bar.rs
+++ b/widget/src/progress_bar.rs
@@ -4,9 +4,8 @@ use crate::core::mouse;
use crate::core::renderer;
use crate::core::widget::Tree;
use crate::core::{
- Background, Border, Element, Layout, Length, Rectangle, Size, Widget,
+ Background, Border, Element, Layout, Length, Rectangle, Size, Theme, Widget,
};
-use crate::style::Theme;
use std::ops::RangeInclusive;
@@ -14,7 +13,7 @@ use std::ops::RangeInclusive;
///
/// # Example
/// ```no_run
-/// # type ProgressBar = iced_widget::ProgressBar<iced_widget::style::Theme>;
+/// # type ProgressBar = iced_widget::ProgressBar;
/// #
/// let value = 50.0;
///
diff --git a/widget/src/qr_code.rs b/widget/src/qr_code.rs
index b94e95f6..66513775 100644
--- a/widget/src/qr_code.rs
+++ b/widget/src/qr_code.rs
@@ -5,10 +5,10 @@ use crate::core::mouse;
use crate::core::renderer::{self, Renderer as _};
use crate::core::widget::tree::{self, Tree};
use crate::core::{
- Color, Element, Layout, Length, Point, Rectangle, Size, Vector, Widget,
+ Color, Element, Layout, Length, Point, Rectangle, Size, Theme, Vector,
+ Widget,
};
use crate::graphics::geometry::Renderer as _;
-use crate::style::Theme;
use crate::Renderer;
use std::cell::RefCell;
diff --git a/widget/src/radio.rs b/widget/src/radio.rs
index 83d17f01..556d8ac9 100644
--- a/widget/src/radio.rs
+++ b/widget/src/radio.rs
@@ -10,16 +10,15 @@ use crate::core::widget;
use crate::core::widget::tree::{self, Tree};
use crate::core::{
Background, Border, Clipboard, Color, Element, Layout, Length, Pixels,
- Rectangle, Shell, Size, Widget,
+ Rectangle, Shell, Size, Theme, Widget,
};
-use crate::style::Theme;
/// A circular button representing a choice.
///
/// # Example
/// ```no_run
/// # type Radio<Message> =
-/// # iced_widget::Radio<Message, iced_widget::style::Theme, iced_widget::renderer::Renderer>;
+/// # iced_widget::Radio<Message, iced_widget::Theme, iced_widget::renderer::Renderer>;
/// #
/// # use iced_widget::column;
/// #[derive(Debug, Clone, Copy, PartialEq, Eq)]
diff --git a/widget/src/rule.rs b/widget/src/rule.rs
index 53a077aa..19ad43f6 100644
--- a/widget/src/rule.rs
+++ b/widget/src/rule.rs
@@ -5,9 +5,8 @@ use crate::core::mouse;
use crate::core::renderer;
use crate::core::widget::Tree;
use crate::core::{
- Color, Element, Layout, Length, Pixels, Rectangle, Size, Widget,
+ Color, Element, Layout, Length, Pixels, Rectangle, Size, Theme, Widget,
};
-use crate::style::Theme;
/// Display a horizontal or vertical rule for dividing content.
#[allow(missing_debug_implementations)]
diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs
index 19a80ee2..861f1bfb 100644
--- a/widget/src/scrollable.rs
+++ b/widget/src/scrollable.rs
@@ -13,10 +13,9 @@ use crate::core::widget::operation::{self, Operation};
use crate::core::widget::tree::{self, Tree};
use crate::core::{
Background, Border, Clipboard, Color, Element, Layout, Length, Pixels,
- Point, Rectangle, Shell, Size, Vector, Widget,
+ Point, Rectangle, Shell, Size, Theme, Vector, Widget,
};
use crate::runtime::Command;
-use crate::style::Theme;
pub use operation::scrollable::{AbsoluteOffset, RelativeOffset};
diff --git a/widget/src/slider.rs b/widget/src/slider.rs
index c48fe143..463a4f04 100644
--- a/widget/src/slider.rs
+++ b/widget/src/slider.rs
@@ -12,9 +12,8 @@ use crate::core::touch;
use crate::core::widget::tree::{self, Tree};
use crate::core::{
Border, Clipboard, Color, Element, Layout, Length, Pixels, Point,
- Rectangle, Shell, Size, Widget,
+ Rectangle, Shell, Size, Theme, Widget,
};
-use crate::style::Theme;
use std::ops::RangeInclusive;
@@ -28,8 +27,7 @@ use std::ops::RangeInclusive;
///
/// # Example
/// ```no_run
-/// # type Slider<'a, T, Message> =
-/// # iced_widget::Slider<'a, Message, T, iced_widget::style::Theme>;
+/// # type Slider<'a, T, Message> = iced_widget::Slider<'a, Message, T>;
/// #
/// #[derive(Clone)]
/// pub enum Message {
diff --git a/widget/src/svg.rs b/widget/src/svg.rs
index c80fa6b1..34fd9a7b 100644
--- a/widget/src/svg.rs
+++ b/widget/src/svg.rs
@@ -5,9 +5,9 @@ use crate::core::renderer;
use crate::core::svg;
use crate::core::widget::Tree;
use crate::core::{
- Color, ContentFit, Element, Layout, Length, Rectangle, Size, Vector, Widget,
+ Color, ContentFit, Element, Layout, Length, Rectangle, Size, Theme, Vector,
+ Widget,
};
-use crate::style::Theme;
use std::path::PathBuf;
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs
index 73b006fa..fabcb744 100644
--- a/widget/src/text_editor.rs
+++ b/widget/src/text_editor.rs
@@ -12,9 +12,8 @@ use crate::core::text::{self, LineHeight};
use crate::core::widget::{self, Widget};
use crate::core::{
Background, Border, Color, Element, Length, Padding, Pixels, Rectangle,
- Shell, Size, Vector,
+ Shell, Size, Theme, Vector,
};
-use crate::style::Theme;
use std::cell::RefCell;
use std::fmt;
diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs
index bae84db7..6bad0afe 100644
--- a/widget/src/text_input.rs
+++ b/widget/src/text_input.rs
@@ -28,17 +28,15 @@ use crate::core::widget::tree::{self, Tree};
use crate::core::window;
use crate::core::{
Background, Border, Color, Element, Layout, Length, Padding, Pixels, Point,
- Rectangle, Shell, Size, Vector, Widget,
+ Rectangle, Shell, Size, Theme, Vector, Widget,
};
use crate::runtime::Command;
-use crate::style::Theme;
/// A field that can be filled with text.
///
/// # Example
/// ```no_run
-/// # pub type TextInput<'a, Message> =
-/// # iced_widget::TextInput<'a, Message, iced_widget::style::Theme, iced_widget::renderer::Renderer>;
+/// # pub type TextInput<'a, Message> = iced_widget::TextInput<'a, Message>;
/// #
/// #[derive(Debug, Clone)]
/// enum Message {
diff --git a/widget/src/toggler.rs b/widget/src/toggler.rs
index cecd7b6c..adc82f73 100644
--- a/widget/src/toggler.rs
+++ b/widget/src/toggler.rs
@@ -10,17 +10,15 @@ use crate::core::widget;
use crate::core::widget::tree::{self, Tree};
use crate::core::{
Border, Clipboard, Color, Element, Event, Layout, Length, Pixels,
- Rectangle, Shell, Size, Widget,
+ Rectangle, Shell, Size, Theme, Widget,
};
-use crate::style::Theme;
/// A toggler widget.
///
/// # Example
///
/// ```no_run
-/// # type Toggler<'a, Message> =
-/// # iced_widget::Toggler<'a, Message, iced_widget::style::Theme, iced_widget::renderer::Renderer>;
+/// # type Toggler<'a, Message> = iced_widget::Toggler<'a, Message>;
/// #
/// pub enum Message {
/// TogglerToggled(bool),
diff --git a/widget/src/vertical_slider.rs b/widget/src/vertical_slider.rs
index 47c400c7..721a59fb 100644
--- a/widget/src/vertical_slider.rs
+++ b/widget/src/vertical_slider.rs
@@ -31,8 +31,7 @@ use crate::core::{
///
/// # Example
/// ```no_run
-/// # type VerticalSlider<'a, T, Message> =
-/// # iced_widget::VerticalSlider<'a, T, Message, iced_widget::style::Theme>;
+/// # type VerticalSlider<'a, T, Message> = iced_widget::VerticalSlider<'a, T, Message>;
/// #
/// #[derive(Clone)]
/// pub enum Message {
diff --git a/winit/Cargo.toml b/winit/Cargo.toml
index 87e600ae..9d65cc1b 100644
--- a/winit/Cargo.toml
+++ b/winit/Cargo.toml
@@ -24,7 +24,6 @@ multi-window = ["iced_runtime/multi-window"]
[dependencies]
iced_graphics.workspace = true
iced_runtime.workspace = true
-iced_style.workspace = true
log.workspace = true
thiserror.workspace = true
diff --git a/winit/src/application.rs b/winit/src/application.rs
index fbca6ee4..d2a61580 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -10,7 +10,7 @@ use crate::core::renderer;
use crate::core::time::Instant;
use crate::core::widget::operation;
use crate::core::window;
-use crate::core::{Color, Event, Point, Size};
+use crate::core::{Color, Event, Point, Size, Theme};
use crate::futures::futures;
use crate::futures::{Executor, Runtime, Subscription};
use crate::graphics::compositor::{self, Compositor};
@@ -18,7 +18,6 @@ use crate::runtime::clipboard;
use crate::runtime::program::Program;
use crate::runtime::user_interface::{self, UserInterface};
use crate::runtime::{Command, Debug};
-use crate::style::Theme;
use crate::{Clipboard, Error, Proxy, Settings};
use futures::channel::mpsc;
diff --git a/winit/src/lib.rs b/winit/src/lib.rs
index 3b1b0d3a..64912b3f 100644
--- a/winit/src/lib.rs
+++ b/winit/src/lib.rs
@@ -30,7 +30,6 @@ pub use iced_graphics as graphics;
pub use iced_runtime as runtime;
pub use iced_runtime::core;
pub use iced_runtime::futures;
-pub use iced_style as style;
pub use winit;
#[cfg(feature = "multi-window")]