To fix blurred icons under OSX there is implemented PresetBitmapComboBox, derived from wxBitmapComboBox,

which now will be used for preset choosers on sidebar a preset tabs.

+ for BitmapCache class added m_scale used for correct scaling of SVG images on Retina displays

+ some code clearing from unused functions or function's parameters
This commit is contained in:
YuSanka 2020-01-31 16:50:11 +01:00
parent 378321231f
commit 1472ad9b14
17 changed files with 319 additions and 177 deletions

View file

@ -114,7 +114,7 @@ void Tab::create_preset_tab()
#endif //__WXOSX__
// preset chooser
m_presets_choice = new wxBitmapComboBox(panel, wxID_ANY, "", wxDefaultPosition, wxSize(35 * m_em_unit, -1), 0, 0, wxCB_READONLY);
m_presets_choice = new PresetBitmapComboBox(panel, wxSize(35 * m_em_unit, -1));
auto color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
@ -1690,7 +1690,7 @@ void TabPrinter::build_printhost(ConfigOptionsGroup *optgroup)
auto printhost_cafile_browse = [this, optgroup] (wxWindow* parent) {
auto btn = new wxButton(parent, wxID_ANY, " " + _(L("Browse"))+" " +dots, wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
btn->SetFont(Slic3r::GUI::wxGetApp().normal_font());
btn->SetBitmap(create_scaled_bitmap(this, "browse"));
btn->SetBitmap(create_scaled_bitmap("browse"));
auto sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(btn);