From cb9612cf9edf3aa574bb5e39c6a132a99b2d6a51 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 6 Mar 2025 14:54:51 +0000 Subject: [PATCH] live-preview: Polish: Do not expand empty Property Groups Those contain only one element informing about there not being any properties to show. While I think it is important to show that information so users have a chance to figure out how to actually use the live data tab, it is not that important that we need to always show it. --- tools/lsp/ui/components/property-widgets.slint | 2 +- tools/lsp/ui/views/preview-data-view.slint | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/lsp/ui/components/property-widgets.slint b/tools/lsp/ui/components/property-widgets.slint index cfd50a21990..b6aa9b71465 100644 --- a/tools/lsp/ui/components/property-widgets.slint +++ b/tools/lsp/ui/components/property-widgets.slint @@ -1306,7 +1306,7 @@ export component ExpandableGroup { in property text; in property panel-width; - property open: true; + in-out property open: true; group-layer := Rectangle { content-layer := VerticalLayout { diff --git a/tools/lsp/ui/views/preview-data-view.slint b/tools/lsp/ui/views/preview-data-view.slint index d759fd5107c..2cef54494ef 100644 --- a/tools/lsp/ui/views/preview-data-view.slint +++ b/tools/lsp/ui/views/preview-data-view.slint @@ -32,6 +32,8 @@ export component PreviewDataView inherits ScrollView { text: ep.container-name; panel-width: root.width; + open: ep.properties.length != 0; + VerticalLayout { spacing: EditorSpaceSettings.property-spacing; padding: EditorSpaceSettings.default-padding;