diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:50:01 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:50:01 +0200 |
commit | 6213f9a4474f28b3df9abafefe2804a105b1f468 (patch) | |
tree | 16a22816c826ba2da0060bbfe63a1ec2ad0eb1b0 /wx+/bitmap_button.h | |
parent | 6.5 (diff) | |
download | FreeFileSync-6213f9a4474f28b3df9abafefe2804a105b1f468.tar.gz FreeFileSync-6213f9a4474f28b3df9abafefe2804a105b1f468.tar.bz2 FreeFileSync-6213f9a4474f28b3df9abafefe2804a105b1f468.zip |
6.6
Diffstat (limited to 'wx+/bitmap_button.h')
-rw-r--r-- | wx+/bitmap_button.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wx+/bitmap_button.h b/wx+/bitmap_button.h index 4e5adb87..3255ffce 100644 --- a/wx+/bitmap_button.h +++ b/wx+/bitmap_button.h @@ -60,9 +60,9 @@ void setBitmapTextLabel(wxBitmapButton& btn, const wxImage& img, const wxString& } //SetMinSize() instead of SetSize() is needed here for wxWindows layout determination to work corretly - wxSize minSize = btn.GetMinSize(); - btn.SetMinSize(wxSize(std::max(dynImage.GetWidth () + 2 * border, minSize.GetWidth()), - std::max(dynImage.GetHeight() + 2 * border, minSize.GetHeight()))); + const int defaultHeight = wxButton::GetDefaultSize().GetHeight(); + btn.SetMinSize(wxSize(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: |