mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Added msw_buttons_rescale() - Function for a scaling Dialog's buttons under MSW
This commit is contained in:
parent
3f978f6afe
commit
708037158e
17 changed files with 149 additions and 43 deletions
|
@ -516,17 +516,19 @@ void ConfigOptionsGroup::msw_rescale()
|
|||
{
|
||||
auto label = dynamic_cast<wxStaticText*>(label_item->GetWindow());
|
||||
if (label != nullptr) {
|
||||
label->SetMinSize(wxSize(label_width*em, -1));
|
||||
const int label_height = int(1.5f*label->GetFont().GetPixelSize().y + 0.5f);
|
||||
label->SetMinSize(wxSize(label_width*em, /*-1*/label_height));
|
||||
}
|
||||
}
|
||||
else if (label_item->IsSizer()) // case when we nave near_label_widget
|
||||
else if (label_item->IsSizer()) // case when we have near_label_widget
|
||||
{
|
||||
const wxSizerItem* l_item = label_item->GetSizer()->GetItem(1);
|
||||
if (l_item->IsWindow())
|
||||
{
|
||||
auto label = dynamic_cast<wxStaticText*>(l_item->GetWindow());
|
||||
if (label != nullptr) {
|
||||
label->SetMinSize(wxSize(label_width*em, -1));
|
||||
const int label_height = int(1.5f*label->GetFont().GetPixelSize().y + 0.5f);
|
||||
label->SetMinSize(wxSize(label_width*em, /*-1*/label_height));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue