From 163b540681682a338b1097d3a6f739791c8e45ae Mon Sep 17 00:00:00 2001 From: ihavecoke Date: Mon, 4 Aug 2025 19:33:28 +0800 Subject: [PATCH] tiles: Add `panels` method. (#1112) --- crates/ui/src/dock/tiles.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ui/src/dock/tiles.rs b/crates/ui/src/dock/tiles.rs index cca0d68c..b58b5b26 100644 --- a/crates/ui/src/dock/tiles.rs +++ b/crates/ui/src/dock/tiles.rs @@ -196,6 +196,10 @@ impl Tiles { } } + pub fn panels(&self) -> &[TileItem] { + &self.panels + } + fn sorted_panels(&self) -> Vec { let mut items: Vec<(usize, TileItem)> = self.panels.iter().cloned().enumerate().collect(); items.sort_by(|a, b| a.1.z_index.cmp(&b.1.z_index).then_with(|| a.0.cmp(&b.0)));