mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 13:17:54 -06:00
Fix of #2014
This commit is contained in:
parent
734d57a714
commit
87febaacc0
2 changed files with 20 additions and 7 deletions
|
@ -540,13 +540,26 @@ void Choice::BUILD() {
|
||||||
else{
|
else{
|
||||||
for (auto el : m_opt.enum_labels.empty() ? m_opt.enum_values : m_opt.enum_labels) {
|
for (auto el : m_opt.enum_labels.empty() ? m_opt.enum_values : m_opt.enum_labels) {
|
||||||
const wxString& str = _(el);//m_opt_id == "support" ? _(el) : el;
|
const wxString& str = _(el);//m_opt_id == "support" ? _(el) : el;
|
||||||
//FIXME Vojtech: Why is the single column empty icon necessary? It is a workaround of some kind, but what for?
|
temp->Append(str);
|
||||||
// Please document such workarounds by comments!
|
|
||||||
// temp->Append(str, create_scaled_bitmap("empty_icon.png"));
|
|
||||||
temp->Append(str, wxNullBitmap);
|
|
||||||
}
|
}
|
||||||
set_selection();
|
set_selection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __WXGTK__
|
||||||
|
/* Workaround for a correct rendering of the control without Bitmap (under MSW and OSX):
|
||||||
|
*
|
||||||
|
* 1. We should create small Bitmap to fill Bitmaps RefData,
|
||||||
|
* ! in this case wxBitmap.IsOK() return true.
|
||||||
|
* 2. But then set width to 0 value for no using of bitmap left and right spacing
|
||||||
|
* 3. Set this empty bitmap to the at list one item and BitmapCombobox will be recreated correct
|
||||||
|
*
|
||||||
|
* Note: Set bitmap height to the Font size because of OSX rendering.
|
||||||
|
*/
|
||||||
|
wxBitmap empty_bmp(1, temp->GetFont().GetPixelSize().y + 2);
|
||||||
|
empty_bmp.SetWidth(0);
|
||||||
|
temp->SetItemBitmap(0, empty_bmp);
|
||||||
|
#endif
|
||||||
|
|
||||||
// temp->Bind(wxEVT_TEXT, ([this](wxCommandEvent e) { on_change_field(); }), temp->GetId());
|
// temp->Bind(wxEVT_TEXT, ([this](wxCommandEvent e) { on_change_field(); }), temp->GetId());
|
||||||
temp->Bind(wxEVT_COMBOBOX, ([this](wxCommandEvent e) { on_change_field(); }), temp->GetId());
|
temp->Bind(wxEVT_COMBOBOX, ([this](wxCommandEvent e) { on_change_field(); }), temp->GetId());
|
||||||
|
|
||||||
|
|
|
@ -123,8 +123,8 @@ void ObjectSettings::update_settings_list()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto optgroup = std::make_shared<ConfigOptionsGroup>(m_og->ctrl_parent(), cat.first, config, false, extra_column);
|
auto optgroup = std::make_shared<ConfigOptionsGroup>(m_og->ctrl_parent(), cat.first, config, false, extra_column);
|
||||||
optgroup->label_width = 15 * wxGetApp().em_unit();//150;
|
optgroup->label_width = 15 * wxGetApp().em_unit();
|
||||||
optgroup->sidetext_width = 7 * wxGetApp().em_unit();//70;
|
optgroup->sidetext_width = 5.5 * wxGetApp().em_unit();
|
||||||
|
|
||||||
optgroup->m_on_change = [](const t_config_option_key& opt_id, const boost::any& value) {
|
optgroup->m_on_change = [](const t_config_option_key& opt_id, const boost::any& value) {
|
||||||
wxGetApp().obj_list()->part_settings_changed(); };
|
wxGetApp().obj_list()->part_settings_changed(); };
|
||||||
|
@ -134,7 +134,7 @@ void ObjectSettings::update_settings_list()
|
||||||
if (opt == "extruder")
|
if (opt == "extruder")
|
||||||
continue;
|
continue;
|
||||||
Option option = optgroup->get_option(opt);
|
Option option = optgroup->get_option(opt);
|
||||||
option.opt.width = 7 * wxGetApp().em_unit();//70;
|
option.opt.width = 12 * wxGetApp().em_unit();
|
||||||
optgroup->append_single_option_line(option);
|
optgroup->append_single_option_line(option);
|
||||||
}
|
}
|
||||||
optgroup->reload_config();
|
optgroup->reload_config();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue