summaryrefslogtreecommitdiff
path: root/wx+/std_button_layout.h
diff options
context:
space:
mode:
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