diff options
author | B. Stack <bgstack15@gmail.com> | 2022-06-26 16:00:37 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-06-26 16:00:37 +0000 |
commit | 2a026bc7d76875b88700bebc7c5a801fef881bfd (patch) | |
tree | f820b53379f3d14e103e2663e8b0ecd38d1b2105 /wx+/std_button_layout.h | |
parent | Merge branch 'b11.21' into 'master' (diff) | |
parent | add upstream 11.22 (diff) | |
download | FreeFileSync-11.22.tar.gz FreeFileSync-11.22.tar.bz2 FreeFileSync-11.22.zip |
Merge branch '11.22' into 'master'11.22
add upstream 11.22
See merge request opensource-tracking/FreeFileSync!45
Diffstat (limited to 'wx+/std_button_layout.h')
-rw-r--r-- | wx+/std_button_layout.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/wx+/std_button_layout.h b/wx+/std_button_layout.h index 72756041..fbbee1b7 100644 --- a/wx+/std_button_layout.h +++ b/wx+/std_button_layout.h @@ -32,6 +32,20 @@ void setStandardButtonLayout(wxBoxSizer& sizer, const StdButtons& buttons = StdB //sizer width will change! => call wxWindow::Fit and wxWindow::Layout +inline +int getDefaultMenuIconSize() +{ + return fastFromDIP(20); +} + + +inline +int getDefaultButtonHeight() +{ + const int defaultHeight = wxButton::GetDefaultSize().GetHeight(); //buffered by wxWidgets + return std::max(defaultHeight, fastFromDIP(31)); //default button height is much too small => increase! +} + @@ -103,8 +117,7 @@ void setStandardButtonLayout(wxBoxSizer& sizer, const StdButtons& buttons) if (btn) { assert(btn->GetMinSize().GetHeight() == -1); //let OS or this routine do the sizing! note: OS X does not allow changing the (visible!) button height! - const int defaultHeight = wxButton::GetDefaultSize().GetHeight(); //buffered by wxWidgets - btn->SetMinSize({-1, std::max(defaultHeight, fastFromDIP(31))}); //default button height is much too small => increase! + btn->SetMinSize({-1, getDefaultButtonHeight()}); if (settingFirstButton) settingFirstButton = false; |