From ee1c8c5c25d25dfa42120125a8a45dc9831ee412 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:23:48 +0200 Subject: 5.14 --- RealtimeSync/resources.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'RealtimeSync/resources.cpp') diff --git a/RealtimeSync/resources.cpp b/RealtimeSync/resources.cpp index bde89393..2b31ad12 100644 --- a/RealtimeSync/resources.cpp +++ b/RealtimeSync/resources.cpp @@ -51,14 +51,20 @@ GlobalResources::GlobalResources() //for compatibility it seems we need to stick with a "real" icon programIcon = wxIcon(L"A_PROGRAM_ICON"); -#elif defined FFS_LINUX || defined FFS_MAC - //use big logo bitmap for better quality - programIcon.CopyFromBitmap(getImageInt(L"RealtimeSync")); +#elif defined FFS_LINUX + programIcon.CopyFromBitmap(getImage(L"RealtimeSync")); + +#elif defined FFS_MAC + assert(getImage(L"RealtimeSync").GetWidth () == getImage(L"RealtimeSync").GetHeight() && + getImage(L"RealtimeSync").GetWidth() % 128 == 0); + //wxWidgets' bitmap to icon conversion on OS X can only deal with very specific sizes + programIcon.CopyFromBitmap(getImage(L"RealtimeSync").ConvertToImage().Scale(128, 128, wxIMAGE_QUALITY_HIGH)); #endif + } -const wxBitmap& GlobalResources::getImageInt(const wxString& name) const +const wxBitmap& GlobalResources::getImage(const wxString& name) const { auto it = bitmaps.find(!contains(name, L'.') ? //assume .png ending if nothing else specified name + L".png" : -- cgit