Merge branch 'msw-tbar-resize'

Many fixes for wxToolBar (re)sizing in wxMSW, partially addressing
toolbar size changes since the previous wxWidgets versions.

See https://github.com/wxWidgets/wxWidgets/pull/1241

Closes #18294.
This commit is contained in:
Vadim Zeitlin
2019-03-29 19:16:40 +01:00
4 changed files with 229 additions and 283 deletions

View File

@@ -174,6 +174,20 @@ private:
WXHBRUSH MSWGetToolbarBgBrush();
#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK
// Return true if we're showing the labels for the embedded controls: we
// only do it if text is enabled and, somewhat less expectedly, if icons
// are enabled too because showing both the control and its label when only
// text is shown for the other buttons is too inconsistent to be useful.
bool AreControlLabelsShown() const
{
return HasFlag(wxTB_TEXT) && !HasFlag(wxTB_NOICONS);
}
// Return the size required to accommodate the given tool which must be of
// "control" type.
wxSize MSWGetFittingtSizeForControl(class wxToolBarTool* tool) const;
wxDECLARE_EVENT_TABLE();
wxDECLARE_DYNAMIC_CLASS(wxToolBar);
wxDECLARE_NO_COPY_CLASS(wxToolBar);