mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 07:11:12 -06:00
ENH: refine physical printer dialog
Change-Id: I34d122f83addab3db2952a6a2b91b59921d2a981
This commit is contained in:
parent
f89dfa7615
commit
b6ef31f7b9
4 changed files with 104 additions and 45 deletions
|
@ -6,9 +6,9 @@ BEGIN_EVENT_TABLE(RoundedRectangle, wxPanel)
|
|||
EVT_PAINT(RoundedRectangle::OnPaint)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
RoundedRectangle::RoundedRectangle(wxWindow *parent, wxColour col, wxPoint pos, wxSize size, double radius, int type)
|
||||
: wxWindow(parent, wxID_ANY, pos, size, wxBORDER_NONE)
|
||||
{
|
||||
RoundedRectangle::RoundedRectangle(wxWindow *parent, wxColour col, wxPoint pos, wxSize size, double radius, int type)
|
||||
: wxWindow(parent, wxID_ANY, pos, size, wxBORDER_NONE)
|
||||
{
|
||||
SetBackgroundColour(wxColour(255,255,255));
|
||||
m_type = type;
|
||||
m_color = col;
|
||||
|
@ -26,9 +26,10 @@ void RoundedRectangle::OnPaint(wxPaintEvent &evt)
|
|||
}
|
||||
|
||||
//draw RoundedRectangle only board
|
||||
if (m_type == 1) {
|
||||
if (m_type == 1) {
|
||||
wxPaintDC dc(this);
|
||||
dc.SetPen(m_color);
|
||||
dc.SetPen(m_color);
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
dc.DrawRoundedRectangle(0, 0, GetSize().GetWidth(), GetSize().GetHeight(), m_radius);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue