summaryrefslogtreecommitdiff
path: root/wx+/bitmap_button.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2019-12-30 10:35:19 +0000
committerDaniel Wilhelm <shieldwed@outlook.com>2019-12-30 10:35:19 +0000
commitf790cdc5775bb1234a9c2666218456d80825966e (patch)
treecf344e045d5ebdffe0afc35f2de68b8908857808 /wx+/bitmap_button.h
parentMerge branch '10.18' into 'master' (diff)
parentadd upstream 10.19 (diff)
downloadFreeFileSync-f790cdc5775bb1234a9c2666218456d80825966e.tar.gz
FreeFileSync-f790cdc5775bb1234a9c2666218456d80825966e.tar.bz2
FreeFileSync-f790cdc5775bb1234a9c2666218456d80825966e.zip
Merge branch '10.19' into 'master'10.19
add upstream 10.19 See merge request opensource-tracking/FreeFileSync!16
Diffstat (limited to 'wx+/bitmap_button.h')
-rw-r--r--wx+/bitmap_button.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/wx+/bitmap_button.h b/wx+/bitmap_button.h
index bcbc7328..b40d8dd3 100644
--- a/wx+/bitmap_button.h
+++ b/wx+/bitmap_button.h
@@ -56,13 +56,13 @@ void setBitmapTextLabel(wxBitmapButton& btn, const wxImage& img, const wxString&
wxImage dynImage = createImageFromText(text, btn.GetFont(), btn.GetForegroundColour());
if (img.IsOk())
dynImage = btn.GetLayoutDirection() != wxLayout_RightToLeft ?
- stackImages(img, dynImage, ImageStackLayout::HORIZONTAL, ImageStackAlignment::CENTER, gap) :
- stackImages(dynImage, img, ImageStackLayout::HORIZONTAL, ImageStackAlignment::CENTER, gap);
+ stackImages(img, dynImage, ImageStackLayout::horizontal, ImageStackAlignment::center, gap) :
+ stackImages(dynImage, img, ImageStackLayout::horizontal, ImageStackAlignment::center, gap);
- //SetMinSize() instead of SetSize() is needed here for wxWindows layout determination to work corretly
+ //SetMinSize() instead of SetSize() is needed here for wxWindows layout determination to work correctly
const int defaultHeight = wxButton::GetDefaultSize().GetHeight();
- btn.SetMinSize(wxSize(dynImage.GetWidth () + 2 * border,
- std::max(dynImage.GetHeight() + 2 * border, defaultHeight)));
+ btn.SetMinSize({dynImage.GetWidth () + 2 * border,
+ std::max(dynImage.GetHeight() + 2 * border, defaultHeight)});
btn.SetBitmapLabel(wxBitmap(dynImage));
//SetLabel() calls confuse wxBitmapButton in the disabled state and it won't show the image! workaround:
@@ -73,7 +73,7 @@ void setBitmapTextLabel(wxBitmapButton& btn, const wxImage& img, const wxString&
inline
void setImage(wxBitmapButton& button, const wxBitmap& bmp)
{
- if (!isEqual(button.GetBitmapLabel(), bmp))
+ if (!button.GetBitmapLabel().IsSameAs(bmp))
{
button.SetBitmapLabel(bmp);
bgstack15