diff options
author | B Stack <bgstack15@gmail.com> | 2019-12-27 08:28:17 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-12-27 08:28:17 -0500 |
commit | e6e1a42e1e84d7a24c79295d01aa8b1844d64c6b (patch) | |
tree | cf344e045d5ebdffe0afc35f2de68b8908857808 /wx+/bitmap_button.h | |
parent | Merge branch '10.18' into 'master' (diff) | |
download | FreeFileSync-e6e1a42e1e84d7a24c79295d01aa8b1844d64c6b.tar.gz FreeFileSync-e6e1a42e1e84d7a24c79295d01aa8b1844d64c6b.tar.bz2 FreeFileSync-e6e1a42e1e84d7a24c79295d01aa8b1844d64c6b.zip |
add upstream 10.19
Diffstat (limited to 'wx+/bitmap_button.h')
-rw-r--r-- | wx+/bitmap_button.h | 12 |
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); |