Skip to content

Commit

Permalink
Spacing update + no URL tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Sep 6, 2023
1 parent 2853120 commit 355969c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 0 additions & 1 deletion crates/re_viewer/src/ui/welcome_screen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ fn url_large_text_button(
if egui::Button::image_and_text(texture_id, ReUi::small_icon_size(), text)
.ui(ui)
.on_hover_cursor(egui::CursorIcon::PointingHand)
.on_hover_text(url)
.clicked()
{
ui.ctx().output_mut(|o| {
Expand Down
14 changes: 11 additions & 3 deletions crates/re_viewer/src/ui/welcome_screen/welcome_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn onboarding_content_ui(
const MAX_COLUMN_WIDTH: f32 = 255.0;
const MIN_COLUMN_WIDTH: f32 = 164.0;

let grid_spacing = egui::vec2(12.0, 12.0);
let grid_spacing = egui::vec2(12.0, 16.0);

let mut column_count = (((ui.available_width() + grid_spacing.x)
/ (MIN_COLUMN_WIDTH + grid_spacing.x))
Expand Down Expand Up @@ -147,16 +147,18 @@ fn onboarding_content_ui(
ui.add(egui::Label::new(
egui::RichText::new("Welcome.")
.strong()
.line_height(Some(32.0))
.text_style(re_ui::ReUi::welcome_screen_h1()),
));

ui.add(egui::Label::new(
egui::RichText::new("Visualize multimodal data.")
.line_height(Some(32.0))
.text_style(re_ui::ReUi::welcome_screen_h1()),
));
});

ui.add_space(20.0);
ui.add_space(32.0);

let grid = egui::Grid::new("welcome_screen_grid")
.spacing(grid_spacing)
Expand All @@ -181,8 +183,13 @@ fn onboarding_content_ui(

ui.end_row();

for panel in panels {
for (idx, panel) in panels.iter().enumerate() {
ui.vertical(|ui| {
// don't let the text get too close to the right-hand content, if any
if (idx + 1) % column_count != 0 {
ui.set_max_width(column_width - 8.0);
}

ui.label(
egui::RichText::new(panel.title)
.strong()
Expand All @@ -196,6 +203,7 @@ fn onboarding_content_ui(

for panel in panels {
ui.horizontal(|ui| {
ui.spacing_mut().item_spacing.x = 4.0;
if (panel.add_buttons)(ui) {
show_example = true;
}
Expand Down

0 comments on commit 355969c

Please sign in to comment.