From 03efe856012a55165542a3ac5c9055c25723f5e8 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Sun, 26 Jun 2022 11:59:57 -0400 Subject: add upstream 11.22 --- wx+/std_button_layout.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'wx+/std_button_layout.h') 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; -- cgit