summaryrefslogtreecommitdiffstats
path: root/examples/tour/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-02-23 16:32:12 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-02-23 16:32:12 +0700
commit33b9b50883dfcc9838f7792d884324aaffef0a41 (patch)
tree56e92d2c34d813f9f60066bbaa780bf213b7ed2d /examples/tour/src
parent6f6ce15a2055ddbc15dbe71bc811dbe1c8f42068 (diff)
downloadiced-33b9b50883dfcc9838f7792d884324aaffef0a41.tar.gz
iced-33b9b50883dfcc9838f7792d884324aaffef0a41.tar.bz2
iced-33b9b50883dfcc9838f7792d884324aaffef0a41.zip
Showcase only `Contain`, `Cover`, and `Fill` image modes in `tour`
Diffstat (limited to 'examples/tour/src')
-rw-r--r--examples/tour/src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs
index a4863724..e199c88c 100644
--- a/examples/tour/src/main.rs
+++ b/examples/tour/src/main.rs
@@ -590,12 +590,10 @@ impl<'a> Step {
slider: &'a mut slider::State,
current_fit: ContentFit,
) -> Column<'a, StepMessage> {
- const FIT_MODES: [(ContentFit, &str); 5] = [
+ const FIT_MODES: [(ContentFit, &str); 3] = [
(ContentFit::Contain, "Contain"),
(ContentFit::Cover, "Cover"),
(ContentFit::Fill, "Fill"),
- (ContentFit::None, "None"),
- (ContentFit::ScaleDown, "Only Scale Down"),
];
let mode_selector = FIT_MODES.iter().fold(
@@ -624,6 +622,7 @@ impl<'a> Step {
.width(Length::Fill)
.horizontal_alignment(alignment::Horizontal::Center),
)
+ .push(Text::new("Pick a content fit strategy:"))
.push(mode_selector)
}
@@ -821,7 +820,8 @@ pub enum Layout {
}
mod style {
- use iced::{button, Background, Color, Vector};
+ use iced::button;
+ use iced::{Background, Color, Vector};
pub enum Button {
Primary,