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

[Viewer] Option Open/Close dashboard area #12636

Merged

Conversation

Tamir91
Copy link
Contributor

@Tamir91 Tamir91 commented Feb 6, 2024

Tracked on [LRS-1021]
image
image

The for loop is surrounded by an if statement that prevents dashboard drawing until the dashboard is fully open.
@Tamir91 Tamir91 requested a review from Nir-Az February 6, 2024 10:15
@@ -121,6 +121,7 @@ namespace rs2
static const char* last_calib_notice{ "viewer_model.last_calib_notice" };
static const char* is_measuring{ "viewer_model.is_measuring" };
static const char* output_open{ "viewer_model.output_open" };
static const char* dashboard_open{ "viewer_model.dashbord_open" };
Copy link
Collaborator

Choose a reason for hiding this comment

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

dashboard

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@@ -114,6 +114,9 @@ output_model::output_model() : fw_logger([this](){ thread_loop(); }) , incoming_
configurations::viewer::output_open, false);
search_line = config_file::instance().get_or_default(
configurations::viewer::search_term, std::string(""));
is_dashboard_open = config_file::instance().get_or_default(
configurations::viewer::dashboard_open, true );
Copy link
Collaborator

Choose a reason for hiding this comment

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

dashboard

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I can't find the issue here.

@Nir-Az Nir-Az requested a review from OhadMeir February 6, 2024 14:07
@Tamir91 Tamir91 requested a review from Nir-Az February 7, 2024 13:56
@Nir-Az Nir-Az requested review from Nir-Az and removed request for Nir-Az February 7, 2024 14:34
@@ -981,13 +1040,14 @@ void stream_dashboard::draw_dashboard(ux_window& win, rect& r)
{ pos.x + r.w, pos.y + get_height() }, ImColor(dark_sensor_bg));

auto size = ImGui::CalcTextSize(name.c_str());
ImGui::SetCursorPos(ImVec2( r.w / 2 - size.x / 2, 5 ));
auto collapse_buton_h = 28 + 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

What is 28 and what is 3?
Is it the same 3 used on line 1050 ImGui::SetCursorPosY( 3.f + collapse_buton_h );

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • 28 is the button size. It was declared in another function. Should we do it global for 1 usage only?

I can add a comment that explains what is 28.

  • 3 is a space, it does not add a significant difference. I can remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

Just add a comment // Dashboard button size plus some spacing

common/output-model.cpp Outdated Show resolved Hide resolved
Type of button changed to float
Comment added
@OhadMeir OhadMeir merged commit 69e1d41 into IntelRealSense:development Feb 8, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants