Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Rerun Menu with link to Rerun Discord #4661

Merged
merged 11 commits into from
Jan 3, 2024
5 changes: 3 additions & 2 deletions crates/re_space_view_spatial/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,11 @@ pub fn screenshot_context_menu(
if _ctx.app_options.experimental_space_view_screenshots {
let mut take_screenshot = None;
let response = response.context_menu(|ui| {
if ui.button("Screenshot (save to disk)").clicked() {
ui.style_mut().wrap = Some(false);
if ui.button("Save screenshot to disk").clicked() {
take_screenshot = Some(ScreenshotMode::SaveAndCopyToClipboard);
ui.close_menu();
} else if ui.button("Screenshot (clipboard only)").clicked() {
} else if ui.button("Copy screenshot to clipboard").clicked() {
take_screenshot = Some(ScreenshotMode::CopyToClipboard);
ui.close_menu();
}
Expand Down
Binary file added crates/re_ui/data/icons/discord.png
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nice to make it 14x14 for consistence with all other icons that I'm currently updating.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe @martenbjork want to take a stab at it, too :)

Copy link
Member Author

@emilk emilk Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14x14 what, pixels or ui points?

if it is 14x14 points, then we should probably make it 28x28 pixels, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyways, I chose the 24 width because it is 2x the currently default icon size of 12x12

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, actually I meant 28x28, which is the new default.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix it later :)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions crates/re_ui/src/design_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn apply_design_tokens(ctx: &egui::Context) -> DesignTokens {

let panel_bg_color = get_aliased_color(&json, "{Alias.Color.Surface.Default.value}");
// let floating_color = get_aliased_color(&json, "{Alias.Color.Surface.Floating.value}");
let floating_color = Color32::from_gray(38); // TODO(emilk): change the content of the design_tokens.json origin instead
let floating_color = Color32::from_gray(35); // TODO(emilk): change the content of the design_tokens.json origin instead

// Used as the background of text edits, scroll bars and others things
// that needs to look different from other interactive stuff.
Expand All @@ -110,8 +110,7 @@ fn apply_design_tokens(ctx: &egui::Context) -> DesignTokens {

egui_style.visuals.button_frame = true;
egui_style.visuals.widgets.inactive.weak_bg_fill = Default::default(); // Buttons have no background color when inactive
egui_style.visuals.widgets.inactive.bg_fill = Color32::from_gray(40);
// get_aliased_color(&json, "{Alias.Color.Action.Default.value}"); // too dark to see, especially for scroll bars
egui_style.visuals.widgets.inactive.bg_fill = Color32::from_gray(50); // Fill of unchecked radio buttons, checkboxes, etc. Must be brigher than the background floating_color.

{
// Background colors for buttons (menu buttons, blueprint buttons, etc) when hovered or clicked:
Expand Down
1 change: 1 addition & 0 deletions crates/re_ui/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pub const EXTERNAL_LINK: Icon = Icon::new(
"external_link",
include_bytes!("../data/icons/external_link.png"),
);
pub const DISCORD: Icon = Icon::new("discord", include_bytes!("../data/icons/discord.png"));

pub const SPACE_VIEW_TEXT: Icon = Icon::new(
"spaceview_text",
Expand Down
Loading
Loading