MOOSE TreeViewer toolbar gets cut off when too narrow
Modeling and Simulation made NiCE!
Brought to you by:
amccaskey,
jayjaybillings
When you resize the MOOSE TreeViewer, the add/delete child buttons get cut off. It looks like this is partially due to the dropdown box being a fixed width. Ideally, this toolbar should automatically resize instead of forcing the user to increase its width to access these buttons.
I've taken a look at this briefly. It looks like a similar problem to the one I had with resizing the Properties View so that the TableViewer fills it, it's just trickier because this is part of a ToolBar rather than just nested Composites.
I finally figured out a solution for this by adding a listener for resize events to the
CTabFolder
containing theMOOSETreeCompositeViewer
'sToolBar
. Unfortunately, there appear to be some limitations withCTabFolder
layouts, so I had to do some hacks (like reverting to a previous layout to determine the max available horizontal space).It successfully wraps on win32 and cocoa, but for some reason I can't get the
CTabFolder
to update its layout on gtk.As far as I can tell it only does this for gtk. I successfully got it to
wrap those two buttons down on win32 and cocoa. In any case, I'll try to
come up with a better way to have that dropdown there.
On Wed, Oct 15, 2014 at 1:44 PM, Alex McCaskey amccaskey@users.sf.net
wrote:
Related
MOOSE Bugs: #1
I think I figured out how to do this. I might also play around with a button with a menu, too, to see if that works any better.
It looks like GTK will not support wrapping in ToolBars any time soon:
https://bugzilla.gnome.org/show_bug.cgi?id=135287
I've got some code that works for resizing the
Combo
, but due to some layout refresh issues with the underlyingCTabFolder
, I had to limit the size of theCombo
to fit the phrase "MOOSE app..." However, it will first wrap theToolBar
items and then shrink theCombo
depending on how much space is available.Since this won't work well on gtk, I'm going to try making a dropdown menu with some checkbox/radio buttons. I'll try to abstract it so I can re-use it elsewhere (i.e., in the Reactor Analyzer).