From 11bcb1342796a6fabc7c5b89a15c22c754b014ce Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Oct 2021 15:50:42 +0700 Subject: Wire up styling to `Slider` in `iced_native` --- glow/src/widget/slider.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'glow/src/widget') diff --git a/glow/src/widget/slider.rs b/glow/src/widget/slider.rs index 9a269858..2ece156c 100644 --- a/glow/src/widget/slider.rs +++ b/glow/src/widget/slider.rs @@ -1,13 +1,5 @@ //! Display an interactive selector of a single value from a range of values. //! //! A [`Slider`] has some local [`State`]. -use crate::Renderer; - pub use iced_graphics::slider::{Handle, HandleShape, Style, StyleSheet}; -pub use iced_native::slider::State; - -/// An horizontal bar and a handle that selects a single value from a range of -/// values. -/// -/// This is an alias of an `iced_native` slider with an `iced_wgpu::Renderer`. -pub type Slider<'a, T, Message> = iced_native::Slider<'a, T, Message, Renderer>; +pub use iced_native::slider::{Slider, State}; -- cgit From d39ad717ed0ab85acbe935d7ab883166b36e7bc7 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Oct 2021 19:06:53 +0700 Subject: Wire up styling to `Radio` in `iced_native` --- glow/src/widget/radio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glow/src/widget') diff --git a/glow/src/widget/radio.rs b/glow/src/widget/radio.rs index 0b843d1f..c200f1a8 100644 --- a/glow/src/widget/radio.rs +++ b/glow/src/widget/radio.rs @@ -7,4 +7,4 @@ pub use iced_graphics::radio::{Style, StyleSheet}; /// /// This is an alias of an `iced_native` radio button with an /// `iced_wgpu::Renderer`. -pub type Radio = iced_native::Radio; +pub type Radio<'a, Message> = iced_native::Radio<'a, Message, Renderer>; -- cgit From 7c08c6bd138207b862933ee479752a4f1d18c4f2 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 21 Oct 2021 18:50:27 +0700 Subject: Remove `Renderer` trait for `Checkbox` --- glow/src/widget/checkbox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glow/src/widget') diff --git a/glow/src/widget/checkbox.rs b/glow/src/widget/checkbox.rs index d27d77cc..9fd003d4 100644 --- a/glow/src/widget/checkbox.rs +++ b/glow/src/widget/checkbox.rs @@ -6,4 +6,4 @@ pub use iced_graphics::checkbox::{Style, StyleSheet}; /// A box that can be checked. /// /// This is an alias of an `iced_native` checkbox with an `iced_wgpu::Renderer`. -pub type Checkbox = iced_native::Checkbox; +pub type Checkbox<'a, Message> = iced_native::Checkbox<'a, Message, Renderer>; -- cgit From e42e1e2f57ddb455ceff0017e215ddacca978d37 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 28 Oct 2021 17:36:36 +0700 Subject: Implement `Widget::draw` for `ProgressBar` --- glow/src/widget/progress_bar.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'glow/src/widget') diff --git a/glow/src/widget/progress_bar.rs b/glow/src/widget/progress_bar.rs index 45a25d00..413e6fb7 100644 --- a/glow/src/widget/progress_bar.rs +++ b/glow/src/widget/progress_bar.rs @@ -2,12 +2,5 @@ //! //! A [`ProgressBar`] has a range of possible values and a current value, //! as well as a length, height and style. -use crate::Renderer; -pub use iced_graphics::progress_bar::{Style, StyleSheet}; - -/// A bar that displays progress. -/// -/// This is an alias of an `iced_native` progress bar with an -/// `iced_wgpu::Renderer`. -pub type ProgressBar = iced_native::ProgressBar; +pub use iced_graphics::progress_bar::*; -- cgit From f6257973926233e7bb18ae3b4dee4385bfc6ab61 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 28 Oct 2021 18:03:24 +0700 Subject: Implement `Widget::draw` for `Rule` --- glow/src/widget/rule.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'glow/src/widget') diff --git a/glow/src/widget/rule.rs b/glow/src/widget/rule.rs index faa2be86..40281773 100644 --- a/glow/src/widget/rule.rs +++ b/glow/src/widget/rule.rs @@ -1,10 +1,3 @@ //! Display a horizontal or vertical rule for dividing content. -use crate::Renderer; - -pub use iced_graphics::rule::{FillMode, Style, StyleSheet}; - -/// Display a horizontal or vertical rule for dividing content. -/// -/// This is an alias of an `iced_native` rule with an `iced_glow::Renderer`. -pub type Rule = iced_native::Rule; +pub use iced_graphics::rule::*; -- cgit From 0aafcde0ef1533c9eeba0379de8c0082e30c7504 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 15:35:12 +0700 Subject: Remove `widget` module re-exports in `iced_native` --- glow/src/widget/button.rs | 5 +++-- glow/src/widget/checkbox.rs | 3 ++- glow/src/widget/container.rs | 3 ++- glow/src/widget/pane_grid.rs | 7 ++++--- glow/src/widget/pick_list.rs | 4 ++-- glow/src/widget/radio.rs | 2 +- glow/src/widget/scrollable.rs | 4 ++-- glow/src/widget/slider.rs | 2 +- glow/src/widget/text_input.rs | 5 +++-- glow/src/widget/toggler.rs | 2 +- glow/src/widget/tooltip.rs | 4 ++-- 11 files changed, 23 insertions(+), 18 deletions(-) (limited to 'glow/src/widget') diff --git a/glow/src/widget/button.rs b/glow/src/widget/button.rs index fc729cd5..f11ff25e 100644 --- a/glow/src/widget/button.rs +++ b/glow/src/widget/button.rs @@ -4,9 +4,10 @@ use crate::Renderer; pub use iced_graphics::button::{Style, StyleSheet}; -pub use iced_native::button::State; +pub use iced_native::widget::button::State; /// A widget that produces a message when clicked. /// /// This is an alias of an `iced_native` button with an `iced_wgpu::Renderer`. -pub type Button<'a, Message> = iced_native::Button<'a, Message, Renderer>; +pub type Button<'a, Message> = + iced_native::widget::Button<'a, Message, Renderer>; diff --git a/glow/src/widget/checkbox.rs b/glow/src/widget/checkbox.rs index 9fd003d4..76d572d9 100644 --- a/glow/src/widget/checkbox.rs +++ b/glow/src/widget/checkbox.rs @@ -6,4 +6,5 @@ pub use iced_graphics::checkbox::{Style, StyleSheet}; /// A box that can be checked. /// /// This is an alias of an `iced_native` checkbox with an `iced_wgpu::Renderer`. -pub type Checkbox<'a, Message> = iced_native::Checkbox<'a, Message, Renderer>; +pub type Checkbox<'a, Message> = + iced_native::widget::Checkbox<'a, Message, Renderer>; diff --git a/glow/src/widget/container.rs b/glow/src/widget/container.rs index bc26cef2..c16db50d 100644 --- a/glow/src/widget/container.rs +++ b/glow/src/widget/container.rs @@ -7,4 +7,5 @@ pub use iced_graphics::container::{Style, StyleSheet}; /// /// This is an alias of an `iced_native` container with a default /// `Renderer`. -pub type Container<'a, Message> = iced_native::Container<'a, Message, Renderer>; +pub type Container<'a, Message> = + iced_native::widget::Container<'a, Message, Renderer>; diff --git a/glow/src/widget/pane_grid.rs b/glow/src/widget/pane_grid.rs index fc36862c..3c47acf0 100644 --- a/glow/src/widget/pane_grid.rs +++ b/glow/src/widget/pane_grid.rs @@ -20,12 +20,13 @@ pub use iced_graphics::pane_grid::{ /// [![Pane grid - Iced](https://thumbs.gfycat.com/MixedFlatJellyfish-small.gif)](https://gfycat.com/mixedflatjellyfish) /// /// This is an alias of an `iced_native` pane grid with an `iced_wgpu::Renderer`. -pub type PaneGrid<'a, Message> = iced_native::PaneGrid<'a, Message, Renderer>; +pub type PaneGrid<'a, Message> = + iced_native::widget::PaneGrid<'a, Message, Renderer>; /// The content of a [`Pane`]. pub type Content<'a, Message> = - iced_native::pane_grid::Content<'a, Message, Renderer>; + iced_native::widget::pane_grid::Content<'a, Message, Renderer>; /// The title bar of a [`Pane`]. pub type TitleBar<'a, Message> = - iced_native::pane_grid::TitleBar<'a, Message, Renderer>; + iced_native::widget::pane_grid::TitleBar<'a, Message, Renderer>; diff --git a/glow/src/widget/pick_list.rs b/glow/src/widget/pick_list.rs index fccc68c9..4d93be68 100644 --- a/glow/src/widget/pick_list.rs +++ b/glow/src/widget/pick_list.rs @@ -1,9 +1,9 @@ //! Display a dropdown list of selectable values. -pub use iced_native::pick_list::State; +pub use iced_native::widget::pick_list::State; pub use iced_graphics::overlay::menu::Style as Menu; pub use iced_graphics::pick_list::{Style, StyleSheet}; /// A widget allowing the selection of a single value from a list of options. pub type PickList<'a, T, Message> = - iced_native::PickList<'a, T, Message, crate::Renderer>; + iced_native::widget::PickList<'a, T, Message, crate::Renderer>; diff --git a/glow/src/widget/radio.rs b/glow/src/widget/radio.rs index c200f1a8..9ef1d7a5 100644 --- a/glow/src/widget/radio.rs +++ b/glow/src/widget/radio.rs @@ -7,4 +7,4 @@ pub use iced_graphics::radio::{Style, StyleSheet}; /// /// This is an alias of an `iced_native` radio button with an /// `iced_wgpu::Renderer`. -pub type Radio<'a, Message> = iced_native::Radio<'a, Message, Renderer>; +pub type Radio<'a, Message> = iced_native::widget::Radio<'a, Message, Renderer>; diff --git a/glow/src/widget/scrollable.rs b/glow/src/widget/scrollable.rs index fabb4318..d5635ec5 100644 --- a/glow/src/widget/scrollable.rs +++ b/glow/src/widget/scrollable.rs @@ -2,7 +2,7 @@ use crate::Renderer; pub use iced_graphics::scrollable::{Scrollbar, Scroller, StyleSheet}; -pub use iced_native::scrollable::State; +pub use iced_native::widget::scrollable::State; /// A widget that can vertically display an infinite amount of content /// with a scrollbar. @@ -10,4 +10,4 @@ pub use iced_native::scrollable::State; /// This is an alias of an `iced_native` scrollable with a default /// `Renderer`. pub type Scrollable<'a, Message> = - iced_native::Scrollable<'a, Message, Renderer>; + iced_native::widget::Scrollable<'a, Message, Renderer>; diff --git a/glow/src/widget/slider.rs b/glow/src/widget/slider.rs index 2ece156c..2fb3d5d9 100644 --- a/glow/src/widget/slider.rs +++ b/glow/src/widget/slider.rs @@ -2,4 +2,4 @@ //! //! A [`Slider`] has some local [`State`]. pub use iced_graphics::slider::{Handle, HandleShape, Style, StyleSheet}; -pub use iced_native::slider::{Slider, State}; +pub use iced_native::widget::slider::{Slider, State}; diff --git a/glow/src/widget/text_input.rs b/glow/src/widget/text_input.rs index db18b1cc..5560e3e0 100644 --- a/glow/src/widget/text_input.rs +++ b/glow/src/widget/text_input.rs @@ -4,9 +4,10 @@ use crate::Renderer; pub use iced_graphics::text_input::{Style, StyleSheet}; -pub use iced_native::text_input::State; +pub use iced_native::widget::text_input::State; /// A field that can be filled with text. /// /// This is an alias of an `iced_native` text input with an `iced_wgpu::Renderer`. -pub type TextInput<'a, Message> = iced_native::TextInput<'a, Message, Renderer>; +pub type TextInput<'a, Message> = + iced_native::widget::TextInput<'a, Message, Renderer>; diff --git a/glow/src/widget/toggler.rs b/glow/src/widget/toggler.rs index 1cd8711b..cea48efb 100644 --- a/glow/src/widget/toggler.rs +++ b/glow/src/widget/toggler.rs @@ -6,4 +6,4 @@ pub use iced_graphics::toggler::{Style, StyleSheet}; /// A toggler that can be toggled. /// /// This is an alias of an `iced_native` checkbox with an `iced_wgpu::Renderer`. -pub type Toggler = iced_native::Toggler; +pub type Toggler = iced_native::widget::Toggler; diff --git a/glow/src/widget/tooltip.rs b/glow/src/widget/tooltip.rs index 89ab3a15..c6af3903 100644 --- a/glow/src/widget/tooltip.rs +++ b/glow/src/widget/tooltip.rs @@ -1,6 +1,6 @@ //! Display a widget over another. /// A widget allowing the selection of a single value from a list of options. pub type Tooltip<'a, Message> = - iced_native::Tooltip<'a, Message, crate::Renderer>; + iced_native::widget::Tooltip<'a, Message, crate::Renderer>; -pub use iced_native::tooltip::Position; +pub use iced_native::widget::tooltip::Position; -- cgit From c9ed15782c3a62fcbfe56a141837b384ada82aaa Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 31 Oct 2021 17:48:23 +0700 Subject: Introduce state lifetime for `style_sheet` in `Toggler` --- glow/src/widget/toggler.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'glow/src/widget') diff --git a/glow/src/widget/toggler.rs b/glow/src/widget/toggler.rs index cea48efb..40379025 100644 --- a/glow/src/widget/toggler.rs +++ b/glow/src/widget/toggler.rs @@ -6,4 +6,5 @@ pub use iced_graphics::toggler::{Style, StyleSheet}; /// A toggler that can be toggled. /// /// This is an alias of an `iced_native` checkbox with an `iced_wgpu::Renderer`. -pub type Toggler = iced_native::widget::Toggler; +pub type Toggler<'a, Message> = + iced_native::widget::Toggler<'a, Message, Renderer>; -- cgit