mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
ENH:K value and ? overlapping and AMS selection display
JIRA: STUDIO-3777 Change-Id: I59c9fd44bd23aaf26bfbad17e618eb5440ca7db3
This commit is contained in:
@@ -866,8 +866,15 @@ void AMSLib::render_generic_text(wxDC &dc)
|
||||
if (m_info.material_name.empty() /*&& m_info.material_state != AMSCanType::AMS_CAN_TYPE_VIRTUAL*/) {
|
||||
auto tsize = dc.GetMultiLineTextExtent("?");
|
||||
auto pot = wxPoint(0, 0);
|
||||
pot = wxPoint((libsize.x - tsize.x) / 2, (libsize.y - tsize.y) / 2 - FromDIP(9));
|
||||
|
||||
if (m_obj && show_k_value) {
|
||||
pot = wxPoint((libsize.x - tsize.x) / 2, (libsize.y - tsize.y) / 2 - FromDIP(9));
|
||||
}
|
||||
else {
|
||||
pot = wxPoint((libsize.x - tsize.x) / 2, (libsize.y - tsize.y) / 2 + FromDIP(3));
|
||||
}
|
||||
dc.DrawText(L("?"), pot);
|
||||
|
||||
}
|
||||
else {
|
||||
auto tsize = dc.GetMultiLineTextExtent(m_info.material_name);
|
||||
@@ -1673,15 +1680,16 @@ void AMSItem::doRender(wxDC &dc)
|
||||
if (!wxWindow::IsEnabled()) { border_colour = AMS_CONTROL_DISABLE_COLOUR; }
|
||||
|
||||
if (m_hover) {
|
||||
dc.SetPen(wxPen(border_colour, 1));
|
||||
dc.SetPen(wxPen(border_colour, 2));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
dc.DrawRoundedRectangle(0, 0, size.x, size.y, 3);
|
||||
dc.DrawRoundedRectangle(1, 1, size.x - 1, size.y - 1, 3);
|
||||
|
||||
}
|
||||
|
||||
if (m_selected) {
|
||||
dc.SetPen(wxPen(border_colour, 1));
|
||||
dc.SetPen(wxPen(border_colour, 2));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
dc.DrawRoundedRectangle(0, 0, size.x, size.y, 3);
|
||||
dc.DrawRoundedRectangle(1, 1, size.x-1, size.y-1, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ public:
|
||||
protected:
|
||||
wxSize m_cube_size;
|
||||
wxColour m_background_colour = {AMS_CONTROL_DEF_BLOCK_BK_COLOUR};
|
||||
int m_padding = {6};
|
||||
int m_padding = {7};
|
||||
int m_space = {5};
|
||||
bool m_hover = {false};
|
||||
bool m_selected = {false};
|
||||
|
||||
Reference in New Issue
Block a user