summaryrefslogtreecommitdiff
path: root/wx+/std_button_layout.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-06-26 11:59:57 -0400
committerB. Stack <bgstack15@gmail.com>2022-06-26 11:59:57 -0400
commit03efe856012a55165542a3ac5c9055c25723f5e8 (patch)
treef820b53379f3d14e103e2663e8b0ecd38d1b2105 /wx+/std_button_layout.h
parentMerge branch 'b11.21' into 'master' (diff)
downloadFreeFileSync-03efe856012a55165542a3ac5c9055c25723f5e8.tar.gz
FreeFileSync-03efe856012a55165542a3ac5c9055c25723f5e8.tar.bz2
FreeFileSync-03efe856012a55165542a3ac5c9055c25723f5e8.zip
add upstream 11.22
Diffstat (limited to 'wx+/std_button_layout.h')
-rw-r--r--wx+/std_button_layout.h17
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;
bgstack15