[messages] [Technical Support & Bugs] Weird shape showing in toolbar in 3.2.0 beta2+

Joel Uckelman uckelman at nomic.net
Sat Sep 22 07:08:09 MST 2012


Thus spake Joel Uckelman:
> Thus spake barbanera:
> > And whatever is a JToolBar? I doubt it is something supposed to be there
> >  :)
> 
> The JToolBar is there in both of your screenshots. It's just wider in
> the second one. You can see it in the first one by the line which is
> beneath screenshot button.
> 
> The commit which caused the change is probably 8339. I would argue that
> neither of these is really correct---that button shouldn't be wrapped
> in a JToolBar at all. This is something I've tried to correct before
> without success.

The fundamental problem here is that the UI is being used to store
configuration data. The way that the Player window finds the buttons
belonging to a docked Map is by asking the map for its toolbar, and
sticking the latter into the former. Because it was designed this way,
there's no way for the Editor to determine which buttons came from the
Map if it needs to remove them, except by asking the Map for its toolbar
and removing that. We could independently track a list of Map buttons,
but the problem there is thabuttons are added to the Map's toolbar
directly, so the Map also has no idea what buttons belong to it.

I believe this approach was taken at the beginning becuase it seemed
easier, but it was never the right thing to do. I think anything which
produces the correct behavior will either be a brittle, ugly hack or
require a near total overhaul of how the UI is constructed from module
data. 

If someone else wants to try fixing this, great, but the perceived 
effort goes beyond what I fell justified in undertaking to fix a
cosmetic problem in V3 when I could put the same effort into V4.

-- 
J.


More information about the messages mailing list