Fix of #2014
This commit is contained in:
parent
734d57a714
commit
87febaacc0
@ -540,13 +540,26 @@ void Choice::BUILD() {
|
||||
else{
|
||||
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;
|
||||
//FIXME Vojtech: Why is the single column empty icon necessary? It is a workaround of some kind, but what for?
|
||||
// Please document such workarounds by comments!
|
||||
// temp->Append(str, create_scaled_bitmap("empty_icon.png"));
|
||||
temp->Append(str, wxNullBitmap);
|
||||
temp->Append(str);
|
||||
}
|
||||
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_COMBOBOX, ([this](wxCommandEvent e) { on_change_field(); }), temp->GetId());
|
||||
|
||||
|
@ -123,8 +123,8 @@ void ObjectSettings::update_settings_list()
|
||||
continue;
|
||||
|
||||
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->sidetext_width = 7 * wxGetApp().em_unit();//70;
|
||||
optgroup->label_width = 15 * wxGetApp().em_unit();
|
||||
optgroup->sidetext_width = 5.5 * wxGetApp().em_unit();
|
||||
|
||||
optgroup->m_on_change = [](const t_config_option_key& opt_id, const boost::any& value) {
|
||||
wxGetApp().obj_list()->part_settings_changed(); };
|
||||
@ -134,7 +134,7 @@ void ObjectSettings::update_settings_list()
|
||||
if (opt == "extruder")
|
||||
continue;
|
||||
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->reload_config();
|
||||
|
Loading…
Reference in New Issue
Block a user