Wednesday, 9 May 2012

A big shout out

Since Maestro 3.0, the user interface that you have seen was done that way because my favourite WinForms docking library DockPanelSuite was riddled with P/Invokes into Win32, rendering the library un-usable on Mono. We use this library in FDO Toolbox because the FDO .net wrapper was already windows-only so we could get away with it, but not for Maestro.

So as a result, I had no choice but to hack my own clunky pseudo-docking library that is driven by SplitContainers and TabControls. This worked to an extent, but as it turns out, those weird and crazy display problems with the Layer Definition editor (you've probably experienced it. Just try resizing the main window) is the result of bugs caused by this combination. The suggested solution in that link didn't work for me btw.

Rather than try to bolt on some bandaids to an already hacky UI which turns out to be composed of 2 components that don't like each other, I thought I'd take another look to see if there has been any effort to get DockPanelSuite working on Mono. Lo and behind, there was a saviour!

Mr Lex Li has made a patched version of DockPanelSuite with the offending P/Invokes patched out for Mono. What do we lose with these patched out P/Invoke calls? According to Lex, we lose the ability to drag and drop Dock Windows around to different areas of the main window. And you know what? We don't even use that feature! So I had to take a look at this patched DockPanelSuite.

10 minutes of UI refactoring later and behold! The new Maestro 5.0 main window!

And more importantly, here's how it looks on Mono (in Ubuntu)

The only problem I get on Mono at the moment is this big stack dump vomit from DockPanelSuite when Maestro exits, but it looks like a problem that can be worked around.

So a big shout out goes to Lex Li for finally making my original UI plans possible!

No comments: