mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
GCodeViewer -> Added visualization of percentage in estimated printing time dialog
This commit is contained in:
parent
afd9429e6d
commit
51f0fd8912
4 changed files with 48 additions and 50 deletions
|
@ -760,12 +760,10 @@ void ImGuiWrapper::search_list(const ImVec2& size_, bool (*items_getter)(int, co
|
|||
void ImGuiWrapper::title(const std::string& str)
|
||||
{
|
||||
ImGuiWindow* window = ImGui::GetCurrentWindow();
|
||||
const float frame_height = ImGui::CalcTextSize(str.c_str(), nullptr, false).y;
|
||||
|
||||
ImRect frame_bb;
|
||||
frame_bb.Min = { window->WorkRect.Min.x, window->DC.CursorPos.y };
|
||||
frame_bb.Max = { window->WorkRect.Max.x, window->DC.CursorPos.y + frame_height };
|
||||
|
||||
frame_bb.Max = { window->WorkRect.Max.x, window->DC.CursorPos.y + ImGui::CalcTextSize(str.c_str(), nullptr, false).y };
|
||||
frame_bb.Min.x -= IM_FLOOR(window->WindowPadding.x * 0.5f - 1.0f);
|
||||
frame_bb.Max.x += IM_FLOOR(window->WindowPadding.x * 0.5f);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue