Another try to fix IconRendering on OSX

This commit is contained in:
YuSanka 2018-09-11 12:44:27 +02:00
parent 73ee3f77c3
commit dbf18ed8d4
5 changed files with 9 additions and 9 deletions

View File

@ -1118,11 +1118,11 @@ void show_buttons(bool show)
} }
} }
void show_info_sizer(bool show) void show_info_sizer(const bool show, const bool is_update_settings/* = false*/)
{ {
g_info_sizer->Show(static_cast<size_t>(0), show); g_info_sizer->Show(static_cast<size_t>(0), show);
g_info_sizer->Show(1, show && g_show_print_info); g_info_sizer->Show(1, show && g_show_print_info);
g_manifold_warning_icon->Show(show && g_show_manifold_warning_icon); g_manifold_warning_icon->Show(show && (!is_update_settings && g_show_manifold_warning_icon));
} }
void show_object_name(bool show) void show_object_name(bool show)

View File

@ -182,7 +182,7 @@ bool select_language(wxArrayString & names, wxArrayLong & identifiers);
// update right panel of the Plater according to view mode // update right panel of the Plater according to view mode
void update_mode(); void update_mode();
void show_info_sizer(bool show); void show_info_sizer(const bool show, const bool is_update_settinfs = false);
std::vector<Tab *>& get_tabs_list(); std::vector<Tab *>& get_tabs_list();
bool checked_tab(Tab* tab); bool checked_tab(Tab* tab);

View File

@ -951,7 +951,7 @@ void update_settings_list()
} }
show_manipulation_og(show_manipulations); show_manipulation_og(show_manipulations);
show_info_sizer(show_manipulations); show_info_sizer(show_manipulations, true);
#ifdef __linux__ #ifdef __linux__
no_updates.reset(nullptr); no_updates.reset(nullptr);

View File

@ -386,12 +386,12 @@ bool PrusaObjectDataViewModelNode::update_settings_digest(const std::vector<std:
bmp = m_bitmap_cache->insert(m_name.ToStdString(), bmps); bmp = m_bitmap_cache->insert(m_name.ToStdString(), bmps);
} }
m_icon.CopyFromBitmap(*bmp);
#ifdef __WXOSX__ #ifdef __WXOSX__
if (m_icon.GetWidth() != m_icon.GetHeight()) if (bmp->GetWidth() != bmp->GetHeight())
m_icon.SetHeight(m_icon.GetWidth()); bmp->SetHeight(bmp->GetWidth());
#endif // __WXOSX__ #endif // __WXOSX__
m_icon.CopyFromBitmap(*bmp);
return true; return true;
} }

View File

@ -424,7 +424,7 @@ class PrusaIconTextRenderer : public wxDataViewCustomRenderer
public: public:
PrusaIconTextRenderer( wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, PrusaIconTextRenderer( wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int align = wxDVR_DEFAULT_ALIGNMENT): int align = wxDVR_DEFAULT_ALIGNMENT):
wxDataViewCustomRenderer(wxT("wxDataViewIconText"), mode, wxALIGN_CENTER) {} wxDataViewCustomRenderer(wxT("wxDataViewIconText"), mode, align) {}
bool SetValue(const wxVariant &value); bool SetValue(const wxVariant &value);
bool GetValue(wxVariant &value) const; bool GetValue(wxVariant &value) const;