From d98e78884715526eaca580ba9fd1bb047aa04db4 Mon Sep 17 00:00:00 2001 From: "hu.wang" Date: Fri, 4 Aug 2023 09:22:32 +0800 Subject: [PATCH] ENH:Improving the AMS display of empty disks It is difficult to distinguish between blank and empty thumbnails, so adding a diagonal line on the empty disk indicates empty JIRA:STUDIO-4515 Change-Id: I46038c9256fc43927976b82f29ea895ce907d247 --- src/slic3r/GUI/Widgets/AMSControl.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Widgets/AMSControl.cpp b/src/slic3r/GUI/Widgets/AMSControl.cpp index e6dc2363a..ae7ad6d17 100644 --- a/src/slic3r/GUI/Widgets/AMSControl.cpp +++ b/src/slic3r/GUI/Widgets/AMSControl.cpp @@ -1299,7 +1299,6 @@ AMSRoad::AMSRoad(wxWindow *parent, wxWindowID id, Caninfo info, int canindex, in wxPostEvent(GetParent()->GetParent(), close_event); #endif // __WXMSW__ - } } }); @@ -1666,7 +1665,16 @@ void AMSItem::doRender(wxDC &dc) dc.DrawBitmap(m_ts_bitmap_cube->bmp(),left,(size.y - AMS_ITEM_CUBE_SIZE.y) / 2); } else { - dc.DrawRoundedRectangle(left, (size.y - AMS_ITEM_CUBE_SIZE.y) / 2, AMS_ITEM_CUBE_SIZE.x, AMS_ITEM_CUBE_SIZE.y, 2); + wxRect rect(left, (size.y - AMS_ITEM_CUBE_SIZE.y) / 2, AMS_ITEM_CUBE_SIZE.x, AMS_ITEM_CUBE_SIZE.y); + if(iter->material_state==AMSCanType::AMS_CAN_TYPE_EMPTY){ + dc.SetPen(wxPen(wxColor(0, 0, 0))); + dc.DrawRoundedRectangle(rect, 2); + + dc.DrawLine(rect.GetRight()-1, rect.GetTop()+1, rect.GetLeft()+1, rect.GetBottom()-1); + } + else { + dc.DrawRoundedRectangle(rect, 2); + } } }