-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Viewer] Option Open/Close dashboard area #12636
Conversation
The for loop is surrounded by an if statement that prevents dashboard drawing until the dashboard is fully open.
common/device-model.h
Outdated
@@ -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" }; |
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.
dashboard
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.
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 ); |
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.
dashboard
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.
Sorry, I can't find the issue here.
common/output-model.cpp
Outdated
@@ -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; |
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.
What is 28 and what is 3?
Is it the same 3 used on line 1050 ImGui::SetCursorPosY( 3.f + collapse_buton_h );
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.
- 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
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.
Just add a comment // Dashboard button size plus some spacing
Type of button changed to float Comment added
Tracked on [LRS-1021]