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
RS-Viewer : metadata scrollbar added #11637
RS-Viewer : metadata scrollbar added #11637
Conversation
Please also rebase development so we can see LibCI works |
e523dc8
to
6015559
Compare
@@ -1510,7 +1536,7 @@ namespace rs2 | |||
void stream_model::show_frame(const rect& stream_rect, const mouse_info& g, std::string& error_message) | |||
{ | |||
auto zoom_val = 1.f; | |||
if (stream_rect.contains(g.cursor)) | |||
if (stream_rect.contains(g.cursor) && !show_metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I see, you placed a comment 500 lines above.
Please add a comment here.
And the main reason I wanted a comment is to explain why we only calculate the mouse scroll for zoom when we don't have metadata.
Something like:
`We allow scrolling for zoom in/out when no metadata is on.
If we have metadata on it will scroll the metadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, my bad. Those lines look a little similar...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still missing comment.
Allow mouse scrolling for zoom when not displaying scrollable metadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment was added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall it looks great.
Just added a few questions and comment that may help the code to be more readable
OK a few things:
See running example: |
rsutils::string::from() << std::setprecision(2) << std::fixed << view_fps.get_fps(), | ||
"Viewer FPS captures how many frames the application manages to render.\n" | ||
"Frame drops can occur for variety of reasons." }); | ||
const std::string no_md = "no md"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please verify that the use case of not having metadata looks OK too.
You can use @remibettan help to remove the metadata from the registry and verify it looks OK as it was on an old viewer code
@@ -959,6 +1018,7 @@ namespace rs2 | |||
|| (profile.stream_type() == RS2_STREAM_GPIO) | |||
|| (profile.stream_type() == RS2_STREAM_POSE); | |||
|
|||
// This scope contains a logic behavior of mouse on viewport when metadata not visible for user. | |||
if (stream_rect.contains(mouse.cursor) && !non_visual_stream && !show_metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curser behavior on visual stream with no metadata on
0c4cc7c
to
27eb5d7
Compare
Tracked on [LRS-714]
The scrollbar was created for metadata view mode.