summaryrefslogtreecommitdiff
path: root/shared/custom_button.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:14:37 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:14:37 +0200
commit8bf668665b107469086f16cb8ad23e47d479d2b4 (patch)
tree66a91ef06a8caa7cd6819dcbe1860693d3eda8d5 /shared/custom_button.cpp
parent3.21 (diff)
downloadFreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.gz
FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.bz2
FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.zip
4.0
Diffstat (limited to 'shared/custom_button.cpp')
-rw-r--r--shared/custom_button.cpp32
1 files changed, 2 insertions, 30 deletions
diff --git a/shared/custom_button.cpp b/shared/custom_button.cpp
index 0c4c3019..606db4f2 100644
--- a/shared/custom_button.cpp
+++ b/shared/custom_button.cpp
@@ -10,37 +10,9 @@
#include <algorithm>
#include <limits>
#include <cmath>
+#include "image_tools.h"
-
-namespace
-{
-bool isEqual(const wxBitmap& lhs, const wxBitmap& rhs)
-{
- if (lhs.IsOk() != rhs.IsOk())
- return false;
-
- if (!lhs.IsOk())
- return true;
-
- const int pixelCount = lhs.GetWidth() * lhs.GetHeight();
- if (pixelCount != rhs.GetWidth() * rhs.GetHeight())
- return false;
-
- wxImage imLhs = lhs.ConvertToImage();
- wxImage imRhs = rhs.ConvertToImage();
-
- if (imLhs.HasAlpha() != imRhs.HasAlpha())
- return false;
-
- if (imLhs.HasAlpha())
- {
- if (!std::equal(imLhs.GetAlpha(), imLhs.GetAlpha() + pixelCount, imRhs.GetAlpha()))
- return false;
- }
-
- return std::equal(imLhs.GetData(), imLhs.GetData() + pixelCount * 3, imRhs.GetData());
-}
-}
+using namespace zen;
void setBitmapLabel(wxBitmapButton& button, const wxBitmap& bmp)
bgstack15