101 {
102 wxBufferedPaintDC dc(this);
103 wxSize sz = GetClientSize();
104
105 wxColour parent_bg = GetParent() ? GetParent()->GetBackgroundColour()
107 dc.SetBrush(wxBrush(parent_bg));
108 dc.SetPen(*wxTRANSPARENT_PEN);
109 dc.DrawRectangle(0, 0, sz.GetWidth(), sz.GetHeight());
110
114 dc.DrawRoundedRectangle(0, 0, sz.GetWidth(), sz.GetHeight(), FromDIP(3));
115 }
116
117 dc.SetFont(GetFont());
120 wxSize ts = dc.GetTextExtent(
m_text);
121 int x = (sz.GetWidth() - ts.GetWidth()) / 2;
122 int y = (sz.GetHeight() - ts.GetHeight()) / 2;
123 dc.DrawText(
m_text, x, y);
124 }
static wxColour darkModeColorFor(wxColour const &color)
Definition StateColor.cpp:219