Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2019-04-25 16:06:44 +0300
committerYuSanka <yusanka@gmail.com>2019-04-25 16:09:12 +0300
commit708037158e78dfe0552b3ed5d9498da1832e031b (patch)
tree0400c2bc1421a673f4e1ff599ddad83a40580fd6 /src/slic3r/GUI/OptionsGroup.cpp
parent3f978f6afe95411ebe25fd8fcb38986b6d8ecbc4 (diff)
Added msw_buttons_rescale() - Function for a scaling Dialog's buttons under MSW
Diffstat (limited to 'src/slic3r/GUI/OptionsGroup.cpp')
-rw-r--r--src/slic3r/GUI/OptionsGroup.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp
index fdbe3b038..099ebc8ba 100644
--- a/src/slic3r/GUI/OptionsGroup.cpp
+++ b/src/slic3r/GUI/OptionsGroup.cpp
@@ -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));
}
}
}