Renamed Icon widget to Svg and gave it separate width and height.

The aspect ratio is now preserved like in the `Image` widget.
This commit is contained in:
Malte Veerman 2019-12-12 01:25:18 +01:00
parent 895eaef99b
commit 27717bc70c
4 changed files with 110 additions and 90 deletions

View file

@ -80,17 +80,17 @@ pub mod widget {
pub use iced_winit::image::{Handle, Image};
}
pub mod icon {
pub mod svg {
//! Display icons in your user interface.
pub use iced_winit::icon::Icon;
pub use iced_winit::svg::Svg;
}
pub use iced_winit::{Checkbox, Radio, Text};
#[doc(no_inline)]
pub use {
button::Button, icon::Icon, image::Image, scrollable::Scrollable,
slider::Slider, text_input::TextInput,
button::Button, image::Image, scrollable::Scrollable,
slider::Slider, svg::Svg, text_input::TextInput,
};
/// A container that distributes its contents vertically.