Reuse helper MSWGetFittingtSizeForControl() in a couple of places

Refactor the code to reuse the same function for determining the size
needed by an embedded control in the toolbar, including its label.
This commit is contained in:
Vadim Zeitlin
2019-02-24 18:19:49 +01:00
parent c7e8aac70f
commit 7c8ba45705
2 changed files with 33 additions and 6 deletions

View File

@@ -183,6 +183,10 @@ private:
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);