mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-04 17:44:46 -07:00
Update static box label size after font change
This commit is contained in:
parent
687286ccac
commit
38f51bd77f
1 changed files with 7 additions and 0 deletions
|
|
@ -101,6 +101,13 @@ void LabeledStaticBox::SetBorderColor(StateColor const &color)
|
|||
void LabeledStaticBox::SetFont(wxFont 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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue