From cb8e9843b464460181976fd6ea5d7312b55c86d3 Mon Sep 17 00:00:00 2001 From: jaredoconnell Date: Tue, 10 Sep 2024 23:54:06 -0400 Subject: [PATCH] Update grid example based on feedback --- masonry/examples/grid_masonry.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/masonry/examples/grid_masonry.rs b/masonry/examples/grid_masonry.rs index 10bb24046..29fd8df54 100644 --- a/masonry/examples/grid_masonry.rs +++ b/masonry/examples/grid_masonry.rs @@ -10,6 +10,7 @@ use masonry::app_driver::{AppDriver, DriverCtx}; use masonry::dpi::LogicalSize; use masonry::widget::{Button, Grid, GridParams, Prose, RootWidget, SizedBox}; use masonry::{Action, Color, PointerButton, WidgetId}; +use parley::layout::Alignment; use winit::window::Window; struct Driver { @@ -44,10 +45,11 @@ fn grid_button(params: GridParams) -> Button { pub fn main() { let label = SizedBox::new( Prose::new( - "Change spacing by right and\n\ + "Change spacing by right and \ left clicking on the buttons", ) - .with_text_size(14.0), + .with_text_size(14.0) + .with_text_alignment(Alignment::Middle), ) .border(Color::rgb8(40, 40, 80), 1.0); let button_inputs = vec![