diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:23:48 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:23:48 +0200 |
commit | ee1c8c5c25d25dfa42120125a8a45dc9831ee412 (patch) | |
tree | 67aa287157db954e0cadeee05b4aad331eb2ecf2 /RealtimeSync/resources.cpp | |
parent | 5.13 (diff) | |
download | FreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.tar.gz FreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.tar.bz2 FreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.zip |
5.14
Diffstat (limited to 'RealtimeSync/resources.cpp')
-rw-r--r-- | RealtimeSync/resources.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
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" : |