Make Metrics semi-transparent when Workspace cleared

This commit is contained in:
Bruno Herbelin
2022-01-24 23:53:53 +01:00
parent b261829aea
commit eb9a3c2ad1

View File

@@ -818,9 +818,16 @@ void UserInterface::Render()
if (timercontrol.Visible())
timercontrol.Render();
// Logs
if (Settings::application.widget.logs)
Log::ShowLogWindow(&Settings::application.widget.logs);
// stats in the corner
if (Settings::application.widget.stats)
RenderMetrics(&Settings::application.widget.stats,
&Settings::application.widget.stats_corner,
&Settings::application.widget.stats_mode);
if ( WorkspaceWindow::clear())
ImGui::PopStyleVar();
// All other windows are simply not rendered if workspace is clear
@@ -851,12 +858,6 @@ void UserInterface::Render()
if (show_view_navigator > 0)
target_view_navigator = RenderViewNavigator( &show_view_navigator );
// stats in the corner
if (Settings::application.widget.stats)
RenderMetrics(&Settings::application.widget.stats,
&Settings::application.widget.stats_corner,
&Settings::application.widget.stats_mode);
// all IMGUI Rendering
ImGui::Render();
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());