From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 1D6621FF0E1 for ; Mon, 10 Aug 2026 16:35:41 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 791FD21736; Mon, 10 Aug 2026 16:35:40 +0200 (CEST) From: Dominik Csapak To: yew-devel@lists.proxmox.com Subject: [PATCH yew-widget-toolkit 4/4] touch: adaptive scaffold: pass the rail group alignment through Date: Mon, 10 Aug 2026 16:34:54 +0200 Message-ID: <20260810143536.31163-5-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260810143536.31163-1-d.csapak@proxmox.com> References: <20260810143536.31163-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 1.058 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: UOGRU3R6OW2D4LZAAWFNTQX7IEKQ2UFB X-Message-ID-Hash: UOGRU3R6OW2D4LZAAWFNTQX7IEKQ2UFB X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Yew framework devel list at Proxmox List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The rail's group alignment is as much a layout choice as its leading widget or its expand button, so forward it here too instead of making callers drop down to a plain Scaffold just for that. Also add the doc comment the property was missing on the rail itself. Signed-off-by: Dominik Csapak --- src/touch/adaptive_scaffold.rs | 10 ++++++++++ src/touch/navigation_rail.rs | 1 + 2 files changed, 11 insertions(+) diff --git a/src/touch/adaptive_scaffold.rs b/src/touch/adaptive_scaffold.rs index d70b1d8..a85328c 100644 --- a/src/touch/adaptive_scaffold.rs +++ b/src/touch/adaptive_scaffold.rs @@ -6,6 +6,7 @@ use yew::virtual_dom::{Key, VComp, VNode}; use pwt_macros::builder; +use crate::css::JustifyContent; use crate::dom::ViewportQuery; use crate::prelude::*; use crate::props::IntoOptionalKey; @@ -105,6 +106,12 @@ pub struct AdaptiveScaffold { #[prop_or_default] pub rail_expand_button: bool, + /// Determines the navigation group alignment (rail layout only, see + /// [NavigationRail::group_alignment]). + #[builder(IntoPropValue, into_prop_value)] + #[prop_or_default] + pub rail_group_alignment: Option, + /// Selection forwarded to the active navigator. #[builder(IntoPropValue, into_prop_value)] #[prop_or_default] @@ -188,6 +195,9 @@ impl PwtAdaptiveScaffold { if let Some(expanded_query) = &props.rail_expanded_query { rail = rail.expanded_query(expanded_query.clone()); } + if let Some(group_alignment) = &props.rail_group_alignment { + rail = rail.group_alignment(*group_alignment); + } if let Some(default_active) = &props.default_active { rail = rail.default_active(default_active.clone()); } diff --git a/src/touch/navigation_rail.rs b/src/touch/navigation_rail.rs index 05c5a01..fccc619 100644 --- a/src/touch/navigation_rail.rs +++ b/src/touch/navigation_rail.rs @@ -57,6 +57,7 @@ pub struct NavigationRail { #[prop_or_default] pub leading: Option, + /// Determines the alignment of the navigation group. #[builder] #[prop_or(JustifyContent::Center)] pub group_alignment: JustifyContent, -- 2.47.3