diff --git a/crates/re_time_panel/src/lib.rs b/crates/re_time_panel/src/lib.rs index e13b0a24a64c..414a322255f1 100644 --- a/crates/re_time_panel/src/lib.rs +++ b/crates/re_time_panel/src/lib.rs @@ -264,7 +264,9 @@ impl TimePanel { ) { ui.spacing_mut().item_spacing.x = 18.0; // from figma - if ui.max_rect().width() < 600.0 { + let has_any_data_on_timeline = entity_db.has_any_data_on_timeline(time_ctrl.timeline()); + + if ui.max_rect().width() < 600.0 && has_any_data_on_timeline { // Responsive ui for narrow screens, e.g. mobile. Split the controls into two rows. ui.vertical(|ui| { ui.horizontal(|ui| { @@ -273,7 +275,7 @@ impl TimePanel { self.time_control_ui .play_pause_ui(time_ctrl, re_ui, times_per_timeline, ui); - if entity_db.has_any_data_on_timeline(time_ctrl.timeline()) { + if has_any_data_on_timeline { self.time_control_ui.playback_speed_ui(time_ctrl, ui); self.time_control_ui.fps_ui(time_ctrl, ui); } @@ -296,7 +298,7 @@ impl TimePanel { self.time_control_ui .timeline_selector_ui(time_ctrl, times_per_timeline, ui); - if entity_db.has_any_data_on_timeline(time_ctrl.timeline()) { + if has_any_data_on_timeline { self.time_control_ui.playback_speed_ui(time_ctrl, ui); self.time_control_ui.fps_ui(time_ctrl, ui); } diff --git a/crates/re_viewer/src/app_blueprint.rs b/crates/re_viewer/src/app_blueprint.rs index 088c2e6e0177..debfcf31cc72 100644 --- a/crates/re_viewer/src/app_blueprint.rs +++ b/crates/re_viewer/src/app_blueprint.rs @@ -4,10 +4,10 @@ use re_log_types::{DataRow, EntityPath, RowId}; use re_types::blueprint::components::PanelState; use re_viewer_context::{CommandSender, StoreContext, SystemCommand, SystemCommandSender}; -pub const TOP_PANEL_PATH: &str = "top_panel"; -pub const BLUEPRINT_PANEL_PATH: &str = "blueprint_panel"; -pub const SELECTION_PANEL_PATH: &str = "selection_panel"; -pub const TIME_PANEL_PATH: &str = "time_panel"; +const TOP_PANEL_PATH: &str = "top_panel"; +const BLUEPRINT_PANEL_PATH: &str = "blueprint_panel"; +const SELECTION_PANEL_PATH: &str = "selection_panel"; +const TIME_PANEL_PATH: &str = "time_panel"; /// Blueprint for top-level application pub struct AppBlueprint<'a> { @@ -98,9 +98,10 @@ impl<'a> AppBlueprint<'a> { } pub fn setup_welcome_screen_blueprint(welcome_screen_blueprint: &mut EntityDb) { + // Most things are hidden in the welcome screen: for (panel_name, value) in [ (TOP_PANEL_PATH, PanelState::Expanded), - (BLUEPRINT_PANEL_PATH, PanelState::Expanded), + (BLUEPRINT_PANEL_PATH, PanelState::Hidden), (SELECTION_PANEL_PATH, PanelState::Hidden), (TIME_PANEL_PATH, PanelState::Hidden), ] { diff --git a/crates/re_viewer/src/ui/welcome_screen/example_section.rs b/crates/re_viewer/src/ui/welcome_screen/example_section.rs index 2007c4ba3067..5d333aa24fad 100644 --- a/crates/re_viewer/src/ui/welcome_screen/example_section.rs +++ b/crates/re_viewer/src/ui/welcome_screen/example_section.rs @@ -34,7 +34,8 @@ pub(super) const MIN_COLUMN_WIDTH: f32 = 250.0; const MAX_COLUMN_WIDTH: f32 = 337.0; const MAX_COLUMN_COUNT: usize = 3; const COLUMN_HSPACE: f32 = 20.0; -const TITLE_TO_GRID_VSPACE: f32 = 32.0; +const AFTER_HEADER_VSPACE: f32 = 48.0; +const TITLE_TO_GRID_VSPACE: f32 = 24.0; const ROW_VSPACE: f32 = 20.0; const THUMBNAIL_RADIUS: f32 = 12.0; @@ -274,6 +275,8 @@ impl ExampleSection { ui.vertical(|ui| { header_ui(ui); + ui.add_space(AFTER_HEADER_VSPACE); + let Some(examples) = examples.ready_mut() else { // Still waiting for example to load ui.separator(); diff --git a/crates/re_viewer/src/ui/welcome_screen/welcome_section.rs b/crates/re_viewer/src/ui/welcome_screen/welcome_section.rs index 4aa6251d725c..a28873a9f443 100644 --- a/crates/re_viewer/src/ui/welcome_screen/welcome_section.rs +++ b/crates/re_viewer/src/ui/welcome_screen/welcome_section.rs @@ -1,7 +1,7 @@ use egui::Ui; pub(super) const DOCS_URL: &str = "https://www.rerun.io/docs"; -pub(super) const WELCOME_SCREEN_TITLE: &str = "Visualize Multimodal Data"; +pub(super) const WELCOME_SCREEN_TITLE: &str = "Visualize multimodal data"; pub(super) const WELCOME_SCREEN_BULLET_TEXT: &[&str] = &[ "Log data with the Rerun SDK in C++, Python, or Rust", "Visualize and explore live or recorded data", @@ -65,7 +65,5 @@ pub(super) fn welcome_section_ui(ui: &mut egui::Ui) { new_tab: true, }); } - - ui.add_space(83.0); }); }