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 drag tab UI #2893

Merged
merged 13 commits into from
Aug 2, 2023
Merged

Improve drag tab UI #2893

merged 13 commits into from
Aug 2, 2023

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Aug 1, 2023

What

This PR includes the following:

TODO:

  • fine tune overlay colours
  • make overlay colours customisable in egui_tiles
  • cleanup code (currently lots of redundancy)

Note

Do not review commit-by-commit, I messed my rebase/merges

image

Checklist

@abey79 abey79 added the ui concerns graphical user interface label Aug 1, 2023
@abey79
Copy link
Member Author

abey79 commented Aug 1, 2023

@martenbjork re: overlay effects while dragging. The current solution is the following:

  • the source area is greyed out ("Alias.Color.Surface.Default.value" + 50% gamma)
  • the destination area now uses white (50% for stroke, 10% for fill)

When the web demo is updated you might want to check it out and we can adjust these parameters.

@martenbjork
Copy link
Contributor

When the web demo is updated you might want to check it out and we can adjust these parameters.

Nice! I think that works pretty well. Another small step towards making the UI feel like one big whole.

(The colors are a tad dull, but we can tweak it down the road when we've made some other design choices that might undull the UI. Regardless, that's on me 😀)

@abey79 abey79 marked this pull request as ready for review August 2, 2023 07:57
@abey79 abey79 requested review from Wumpf and martenbjork August 2, 2023 08:03
Copy link
Contributor

@martenbjork martenbjork left a comment

Choose a reason for hiding this comment

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

Now it feels that the actual tab is being dragged, no some different looking thing.

🥰💯

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

love it. Nice sideeffect that it also correctly distuinguishes between selected and unselected things being dragged - which seems weird at first but totally makes sense

crates/re_viewport/src/viewport.rs Outdated Show resolved Hide resolved
@@ -477,3 +452,107 @@ fn space_view_ui(

space_view_blueprint.scene_ui(space_view_state, ctx, ui, latest_at, space_view_highlights);
}

struct TabWidget {
Copy link
Member

Choose a reason for hiding this comment

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

very tidy, neat. I'd make it its own module but that's more of a taste thing I reckon :)

@abey79 abey79 merged commit 8d8bc6c into main Aug 2, 2023
@abey79 abey79 deleted the antoine/tab-drag-ui branch August 2, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants