diff --git a/crates/menu/src/ribbon/gallery.rs b/crates/menu/src/ribbon/gallery.rs index b4f957244..5de1d65a0 100644 --- a/crates/menu/src/ribbon/gallery.rs +++ b/crates/menu/src/ribbon/gallery.rs @@ -70,7 +70,7 @@ pub struct Gallery<'a, K: Clone + Eq + Hash + Send + Sync + 'static> { /// The width of each tile's picture as a multiple of its height. aspect: ThumbAspect, /// The height of each tile's picture: a thumbnail size. - size: ThumbSize, + thumb_size: ThumbSize, /// Where a tile shows its item's name: `Below` the picture, else nowhere. caption: CaptionPlace, /// Each shown tile's rect. @@ -103,7 +103,7 @@ impl<'a, K: Clone + Eq + Hash + Send + Sync + 'static> Gallery<'a, K> { compact: 1, more: GalleryMore::Grid, aspect: ThumbAspect::SQUARE, - size: ThumbSize::Medium, + thumb_size: ThumbSize::Medium, caption: CaptionPlace::None, laid: Vec::new(), picked: None, @@ -136,7 +136,7 @@ impl<'a, K: Clone + Eq + Hash + Send + Sync + 'static> Gallery<'a, K> { /// previews are small pages (a style set's title, heading and paragraph) takes the large size, so the pages read. /// `ThumbSize::None` keeps the medium size: a gallery tile always shows its picture. pub fn thumb(mut self, size: ThumbSize) -> Self { - self.size = if size == ThumbSize::None { ThumbSize::Medium } else { size }; + self.thumb_size = if size == ThumbSize::None { ThumbSize::Medium } else { size }; self } @@ -172,7 +172,7 @@ impl<'a, K: Clone + Eq + Hash + Send + Sync + 'static> Gallery<'a, K> { fn sizes(&self, cx: &MeasureCx<'_, Self>) -> Sizes { let words = cx.env.words::(); let button = cx.face(IconButton::new(IconId::new("more")).label(words.more.clone())); - Sizes { tile: cx.face(GalleryTile::blank(self.aspect, self.size, self.captioned())), button, gap: cx.gap() } + Sizes { tile: cx.face(GalleryTile::blank(self.aspect, self.thumb_size, self.captioned())), button, gap: cx.gap() } } } @@ -374,7 +374,7 @@ struct GalleryTile<'a> { /// The width of the picture as a multiple of its height. aspect: ThumbAspect, /// The picture's height, a thumbnail size. - size: ThumbSize, + thumb_size: ThumbSize, /// The item's name under the picture; `None` in a gallery without captions. caption: Option