ENH: adjust imgui plate thumbnail color

Change-Id: Iec5cb3162c55e44eef2c67a3e5d8c65b5eadd785
This commit is contained in:
liz.li 2023-07-26 20:45:14 +08:00 committed by Lane.Wei
parent e9182b2d1d
commit 90e0184313
3 changed files with 13 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="60" height="60" fill="#E7E7E7"/> <rect width="60" height="60" fill="none"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 11.4C19.6686 11.4 19.4 11.6686 19.4 12V19.4H16.6V12C16.6 10.1222 18.1222 8.6 20 8.6H40C41.8778 8.6 43.4 10.1222 43.4 12V19.4H40.6V12C40.6 11.6686 40.3314 11.4 40 11.4H20Z" fill="#00AE42"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M20 11.4C19.6686 11.4 19.4 11.6686 19.4 12V19.4H16.6V12C16.6 10.1222 18.1222 8.6 20 8.6H40C41.8778 8.6 43.4 10.1222 43.4 12V19.4H40.6V12C40.6 11.6686 40.3314 11.4 40 11.4H20Z" fill="#00AE42"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M36.732 20.6V28.0667H33.932V20.6H36.732Z" fill="#00AE42"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M36.732 20.6V28.0667H33.932V20.6H36.732Z" fill="#00AE42"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.4 14.6V28.0667H28.6V14.6H31.4Z" fill="#00AE42"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M31.4 14.6V28.0667H28.6V14.6H31.4Z" fill="#00AE42"/>

Before

Width:  |  Height:  |  Size: 959 B

After

Width:  |  Height:  |  Size: 956 B

View file

@ -1,5 +1,5 @@
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="60" height="60" fill="#E7E7E7"/> <rect width="60" height="60" fill="none"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 11.4C19.6686 11.4 19.4 11.6686 19.4 12V19.4H16.6V12C16.6 10.1222 18.1222 8.6 20 8.6H40C41.8778 8.6 43.4 10.1222 43.4 12V19.4H40.6V12C40.6 11.6686 40.3314 11.4 40 11.4H20Z" fill="#C8EBD5"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M20 11.4C19.6686 11.4 19.4 11.6686 19.4 12V19.4H16.6V12C16.6 10.1222 18.1222 8.6 20 8.6H40C41.8778 8.6 43.4 10.1222 43.4 12V19.4H40.6V12C40.6 11.6686 40.3314 11.4 40 11.4H20Z" fill="#C8EBD5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M36.732 20.6V28.0667H33.932V20.6H36.732Z" fill="#C8EBD5"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M36.732 20.6V28.0667H33.932V20.6H36.732Z" fill="#C8EBD5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.4 14.6V28.0667H28.6V14.6H31.4Z" fill="#C8EBD5"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M31.4 14.6V28.0667H28.6V14.6H31.4Z" fill="#C8EBD5"/>

Before

Width:  |  Height:  |  Size: 959 B

After

Width:  |  Height:  |  Size: 956 B

View file

@ -7534,6 +7534,7 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
ImVec2 size = ImVec2(button_width, button_height * all_plates_stats_item->percent / 100.0f); ImVec2 size = ImVec2(button_width, button_height * all_plates_stats_item->percent / 100.0f);
ImVec2 rect_start_pos = ImVec2(start_pos.x, start_pos.y + size.y); ImVec2 rect_start_pos = ImVec2(start_pos.x, start_pos.y + size.y);
ImVec2 rect_end_pos = ImVec2(start_pos.x + button_width, start_pos.y + button_height); ImVec2 rect_end_pos = ImVec2(start_pos.x + button_width, start_pos.y + button_height);
ImGui::GetForegroundDrawList()->AddRectFilled(start_pos, rect_end_pos, IM_COL32(0, 0, 0, 10));
ImGui::GetForegroundDrawList()->AddRectFilled(rect_start_pos, rect_end_pos, IM_COL32(0, 0, 0, 80)); ImGui::GetForegroundDrawList()->AddRectFilled(rect_start_pos, rect_end_pos, IM_COL32(0, 0, 0, 80));
} }
else if (all_plates_stats_item->slice_state == IMToolbarItem::SliceState::SLICE_FAILED) { else if (all_plates_stats_item->slice_state == IMToolbarItem::SliceState::SLICE_FAILED) {
@ -7542,6 +7543,11 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
ImGui::GetForegroundDrawList()->AddRectFilled(start_pos, end_pos, IM_COL32(40, 1, 1, 64)); ImGui::GetForegroundDrawList()->AddRectFilled(start_pos, end_pos, IM_COL32(40, 1, 1, 64));
ImGui::GetForegroundDrawList()->AddRect(start_pos, end_pos, IM_COL32(208, 27, 27, 255), 0.0f, 0, 1.0f); ImGui::GetForegroundDrawList()->AddRect(start_pos, end_pos, IM_COL32(208, 27, 27, 255), 0.0f, 0, 1.0f);
} }
else if (all_plates_stats_item->slice_state == IMToolbarItem::SliceState::SLICED) {
ImVec2 size = ImVec2(button_width, button_height);
ImVec2 end_pos = ImVec2(start_pos.x + size.x, start_pos.y + size.y);
ImGui::GetForegroundDrawList()->AddRectFilled(start_pos, end_pos, IM_COL32(0, 0, 0, 10));
}
// draw text // draw text
GImGui->FontSize = 15.0f; GImGui->FontSize = 15.0f;
@ -7596,12 +7602,17 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
ImVec2 size = ImVec2(button_width, button_height * item->percent / 100.0f); ImVec2 size = ImVec2(button_width, button_height * item->percent / 100.0f);
ImVec2 rect_start_pos = ImVec2(start_pos.x, start_pos.y + size.y); ImVec2 rect_start_pos = ImVec2(start_pos.x, start_pos.y + size.y);
ImVec2 rect_end_pos = ImVec2(start_pos.x + button_width, start_pos.y + button_height); ImVec2 rect_end_pos = ImVec2(start_pos.x + button_width, start_pos.y + button_height);
ImGui::GetForegroundDrawList()->AddRectFilled(start_pos, rect_end_pos, IM_COL32(0, 0, 0, 10));
ImGui::GetForegroundDrawList()->AddRectFilled(rect_start_pos, rect_end_pos, IM_COL32(0, 0, 0, 80)); ImGui::GetForegroundDrawList()->AddRectFilled(rect_start_pos, rect_end_pos, IM_COL32(0, 0, 0, 80));
} else if (item->slice_state == IMToolbarItem::SliceState::SLICE_FAILED) { } else if (item->slice_state == IMToolbarItem::SliceState::SLICE_FAILED) {
ImVec2 size = ImVec2(button_width, button_height); ImVec2 size = ImVec2(button_width, button_height);
ImVec2 end_pos = ImVec2(start_pos.x + size.x, start_pos.y + size.y); ImVec2 end_pos = ImVec2(start_pos.x + size.x, start_pos.y + size.y);
ImGui::GetForegroundDrawList()->AddRectFilled(start_pos, end_pos, IM_COL32(40, 1, 1, 64)); ImGui::GetForegroundDrawList()->AddRectFilled(start_pos, end_pos, IM_COL32(40, 1, 1, 64));
ImGui::GetForegroundDrawList()->AddRect(start_pos, end_pos, IM_COL32(208, 27, 27, 255), 0.0f, 0, 1.0f); ImGui::GetForegroundDrawList()->AddRect(start_pos, end_pos, IM_COL32(208, 27, 27, 255), 0.0f, 0, 1.0f);
} else if (item->slice_state == IMToolbarItem::SliceState::SLICED) {
ImVec2 size = ImVec2(button_width, button_height);
ImVec2 end_pos = ImVec2(start_pos.x + size.x, start_pos.y + size.y);
ImGui::GetForegroundDrawList()->AddRectFilled(start_pos, end_pos, IM_COL32(0, 0, 0, 10));
} }
// draw text // draw text