mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
Update static box label size after font change
This commit is contained in:
@@ -101,6 +101,13 @@ void LabeledStaticBox::SetBorderColor(StateColor const &color)
|
|||||||
void LabeledStaticBox::SetFont(wxFont set_font)
|
void LabeledStaticBox::SetFont(wxFont set_font)
|
||||||
{
|
{
|
||||||
m_font = set_font;
|
m_font = set_font;
|
||||||
|
|
||||||
|
int tW,tH,descent,externalLeading;
|
||||||
|
// empty label sets m_label_height as 0 that causes extra spacing at top
|
||||||
|
GetTextExtent(m_label.IsEmpty() ? "Orca" : m_label, &tW, &tH, &descent, &externalLeading, &m_font);
|
||||||
|
m_label_height = tH - externalLeading;
|
||||||
|
m_label_width = tW;
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user