Somewhere in the journey to wxWidgets 2.6.2, is seems that window sizing was
extensively modified and, while it relates to wxPython and sizers, I believe
the discussion at the following link is relevant to the toolbar layout
So, there seems to be 4 options for Audacity:
1) Change the USE_DEFERRED_SIZING define as describe in a previous message
2) Attempt to use the new 2.6.2 sizing methodology and/or look for a
critter in wxWidgets
3) Use an existing toolbar/docking library like wxDockIt
4) Come up with a fix...workaround...hack
While #1 seems to work, it may not be "supported" for long and it requires
additional steps (and resultant confusion) for the self-building users out
I don't think any of y'all have the time for #2 and I don't have the skill,
so that's pretty much out.
wxDockIt seems be a nicely done docking library, but this would make
Audacity susceptible to yet another projects whims.
So, I settled for #4 and came up with a what seems to be a workable
solution. The key ingredient is that the toolbars are only sized once after
the layout operation. Other than that I just kinda "cleaned" it up a bit.
Mind, what I call cleanup might be totally bogus to the rest of the world,
so holler if you want anything changed. :-)
If you combine this patch with the toolbar and transcription patches I sent
previously, I think you'll find some fairly well behaved toolbars. However,
I can see a couple of remaining problems:
1) The CleanSpeech button handling needs to be fixed so the ControlToolBar
gets sized consistently and the CS button appears only when it's supposed
2) Something needs to be done with sliders on the MixerToolBar so they
don't update while other toolbars are being dragged over it. The sliders
get drawn on top of the image being dragged. In addition, they could be
expanded if the toolbar were to grow in width due to layout changes (or when
3) This one is only a personal preference, but shouldn't the "grab and
drag" code in Project.cpp be moved into Toolbar.cpp? I was thinking of
something like always having a ToolBarFrame whether docked or floating. It
would just be borderless when docked. Then, all of the grabbing, dragging,
docking, and floating would be handled within the toolbar related classes.
It might even be interesting to have a toolbar parent class that all
toolbars would be childern of and then the layout code could be moved out of
Project.cpp as well.
Anyway, check out the patch and incorporate if y'all think it's usable.