diff options
author | B. Stack <bgstack15@gmail.com> | 2022-06-26 11:59:57 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-06-26 11:59:57 -0400 |
commit | 03efe856012a55165542a3ac5c9055c25723f5e8 (patch) | |
tree | f820b53379f3d14e103e2663e8b0ecd38d1b2105 /wx+/bitmap_button.h | |
parent | Merge branch 'b11.21' into 'master' (diff) | |
download | FreeFileSync-03efe856012a55165542a3ac5c9055c25723f5e8.tar.gz FreeFileSync-03efe856012a55165542a3ac5c9055c25723f5e8.tar.bz2 FreeFileSync-03efe856012a55165542a3ac5c9055c25723f5e8.zip |
add upstream 11.22
Diffstat (limited to 'wx+/bitmap_button.h')
-rw-r--r-- | wx+/bitmap_button.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wx+/bitmap_button.h b/wx+/bitmap_button.h index 32bc68c1..d701e64c 100644 --- a/wx+/bitmap_button.h +++ b/wx+/bitmap_button.h @@ -11,6 +11,7 @@ #include <wx/settings.h> #include <wx/statbmp.h> #include "image_tools.h" +#include "std_button_layout.h" #include "dc.h" @@ -66,9 +67,8 @@ void setBitmapTextLabel(wxBitmapButton& btn, const wxImage& img, const wxString& stackImages(imgTxt, img, ImageStackLayout::horizontal, ImageStackAlignment::center, gap); //SetMinSize() instead of SetSize() is needed here for wxWindows layout determination to work correctly - const int defaultHeight = wxButton::GetDefaultSize().GetHeight(); btn.SetMinSize({imgTxt.GetWidth () + 2 * border, - std::max(imgTxt.GetHeight() + 2 * border, defaultHeight)}); + std::max(imgTxt.GetHeight() + 2 * border, getDefaultButtonHeight())}); setImage(btn, imgTxt); } @@ -104,6 +104,7 @@ inline wxBitmap renderSelectedButton(const wxSize& sz) { wxBitmap bmp(sz); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes + bmp.SetScaleFactor(getDisplayScaleFactor()); { wxMemoryDC dc(bmp); @@ -119,6 +120,7 @@ inline wxBitmap renderPressedButton(const wxSize& sz) { wxBitmap bmp(sz); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes + bmp.SetScaleFactor(getDisplayScaleFactor()); { //draw rectangle border with gradient const wxColor colFrom = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); |