Simplify wxToolBar implementation
|Reported by:||awi||Owned by:||vadz|
|Keywords:||wxToolBar control separator||Cc:|
When a control tool is added to the toolbar then in order to display it (the control) later on there is reserved necessary space on the toolbar in the form of separator(s).
Current implementation of this feature is based on the assumption that sometimes it could be not possible to create a separator of the necessary size and in this case (as a fallback) it is created a cluster of default separators (of default size) which total size is enough to fit the control. This implementation really complicates the code.
Apparently, it must be a legacy solution because it is claimed in the older SDK I have access to (January 2003) that at least since Win NT 3.51 :) and Win 95 it is possible to create a separator of non-default size.
Resigning from this legacy solution and use always one separator for one control (and generally one button/separator for one tool) would simplify the code and make it more clear and less error-prone.
Patch applying this simplification in making necessary space for controls is attached.