FIX: [STUDIO-1562] fix sizeof PresetComboBox
Change-Id: Ia64128f9fded669cd3e7eb1c64868fada76df6b8
This commit is contained in:
parent
cfafbc812f
commit
15d6130b29
|
@ -556,7 +556,7 @@ Sidebar::Sidebar(Plater *parent)
|
||||||
//bed_type_title->SetBackgroundColour();
|
//bed_type_title->SetBackgroundColour();
|
||||||
bed_type_title->Wrap(-1);
|
bed_type_title->Wrap(-1);
|
||||||
bed_type_title->SetFont(Label::Body_14);
|
bed_type_title->SetFont(Label::Body_14);
|
||||||
m_bed_type_list = new ComboBox(p->m_panel_printer_content, wxID_ANY, wxString(""), wxDefaultPosition, {-1, FromDIP(24)}, 0, nullptr, wxCB_READONLY);
|
m_bed_type_list = new ComboBox(p->m_panel_printer_content, wxID_ANY, wxString(""), wxDefaultPosition, {-1, FromDIP(30)}, 0, nullptr, wxCB_READONLY);
|
||||||
const ConfigOptionDef* bed_type_def = print_config_def.get("curr_bed_type");
|
const ConfigOptionDef* bed_type_def = print_config_def.get("curr_bed_type");
|
||||||
if (bed_type_def && bed_type_def->enum_keys_map) {
|
if (bed_type_def && bed_type_def->enum_keys_map) {
|
||||||
for (auto item : *bed_type_def->enum_keys_map) {
|
for (auto item : *bed_type_def->enum_keys_map) {
|
||||||
|
|
|
@ -633,7 +633,7 @@ bool PresetComboBox::selection_is_changed_according_to_physical_printers()
|
||||||
// ---------------------------------
|
// ---------------------------------
|
||||||
|
|
||||||
PlaterPresetComboBox::PlaterPresetComboBox(wxWindow *parent, Preset::Type preset_type) :
|
PlaterPresetComboBox::PlaterPresetComboBox(wxWindow *parent, Preset::Type preset_type) :
|
||||||
PresetComboBox(parent, preset_type, wxSize(15 * wxGetApp().em_unit(), 24 * wxGetApp().em_unit() / 10))
|
PresetComboBox(parent, preset_type, wxSize(15 * wxGetApp().em_unit(), 30 * wxGetApp().em_unit() / 10))
|
||||||
{
|
{
|
||||||
GetDropDown().SetUseContentWidth(true);
|
GetDropDown().SetUseContentWidth(true);
|
||||||
|
|
||||||
|
@ -1118,7 +1118,7 @@ void PlaterPresetComboBox::update()
|
||||||
void PlaterPresetComboBox::msw_rescale()
|
void PlaterPresetComboBox::msw_rescale()
|
||||||
{
|
{
|
||||||
PresetComboBox::msw_rescale();
|
PresetComboBox::msw_rescale();
|
||||||
SetMinSize({-1, 24 * m_em_unit / 10});
|
SetMinSize({-1, 30 * m_em_unit / 10});
|
||||||
|
|
||||||
if (clr_picker)
|
if (clr_picker)
|
||||||
clr_picker->SetSize(20 * m_em_unit / 10, 20 * m_em_unit / 10);
|
clr_picker->SetSize(20 * m_em_unit / 10, 20 * m_em_unit / 10);
|
||||||
|
@ -1134,7 +1134,7 @@ void PlaterPresetComboBox::msw_rescale()
|
||||||
|
|
||||||
TabPresetComboBox::TabPresetComboBox(wxWindow* parent, Preset::Type preset_type) :
|
TabPresetComboBox::TabPresetComboBox(wxWindow* parent, Preset::Type preset_type) :
|
||||||
// BBS: new layout
|
// BBS: new layout
|
||||||
PresetComboBox(parent, preset_type, wxSize(20 * wxGetApp().em_unit(), -1))
|
PresetComboBox(parent, preset_type, wxSize(20 * wxGetApp().em_unit(), 30 * wxGetApp().em_unit() / 10))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1340,9 +1340,9 @@ void TabPresetComboBox::update()
|
||||||
|
|
||||||
void TabPresetComboBox::msw_rescale()
|
void TabPresetComboBox::msw_rescale()
|
||||||
{
|
{
|
||||||
PresetComboBox::Rescale();
|
PresetComboBox::msw_rescale();
|
||||||
// BBS: new layout
|
// BBS: new layout
|
||||||
wxSize sz = wxSize(20 * m_em_unit, GetSize().GetHeight());
|
wxSize sz = wxSize(20 * m_em_unit, 30 * m_em_unit / 10);
|
||||||
SetMinSize(sz);
|
SetMinSize(sz);
|
||||||
SetSize(sz);
|
SetSize(sz);
|
||||||
}
|
}
|
||||||
|
|
|
@ -343,7 +343,7 @@ void Tab::create_preset_tab()
|
||||||
// BBS: model config
|
// BBS: model config
|
||||||
if (m_presets_choice) {
|
if (m_presets_choice) {
|
||||||
m_presets_choice->Reparent(m_top_panel);
|
m_presets_choice->Reparent(m_top_panel);
|
||||||
m_top_sizer->Add(m_presets_choice, 1, wxLEFT | wxRIGHT | wxEXPAND, 10);
|
m_top_sizer->Add(m_presets_choice, 1, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, 10);
|
||||||
} else {
|
} else {
|
||||||
m_top_sizer->AddSpacer(10);
|
m_top_sizer->AddSpacer(10);
|
||||||
m_top_sizer->AddStretchSpacer(1);
|
m_top_sizer->AddStretchSpacer(1);
|
||||||
|
|
Loading…
Reference in New Issue