Jean-Marc Lasgouttes wrote:

> 
> This one is probably for Angus.
> 
> When I launch lyx-xforms (with default toolbars configuration), I
> find that all toolbars are always shown, whereas the math and table
> toolbars are not shown in Qt.

Yes, I see it too.

> I tried to follow the logic of the code, but got stuck.

You mean this spearation of 'visible' and 'prefered_visibility' in the
layout engine Box?

The logic is that calls to show and hide can have an effect only if
the widget has a prefered_visibility == Visible. If the widget has
been 'turned off' then you have to 'turn it on again' before you can
play with it.

Anyway, I get confused myself ;-)

I got things 'working' by commenting out these two lines:

void XFormsToolbar::hide(bool update_metrics)
{
//      if (!toolbar_->visible())
//              return;

        toolbar_->set(Box::Invisible);
        if (update_metrics)
                owner_.updateMetrics();
}

I'm pretty sure that they were an optimization (obviously an incorrect
one) in the days when any interaction led to the metrics being
updated.

Brief testing suggests that all is Ok after the change, but I'm about
to disappear off for a long w/e so don't have time to test properly.
You might set "table" "table,bottom" in default.ui and have a play
with the User Guide. Do we get any extra flickering of the screen
when moving the cursor around?

I'd guess that the same change could also be made to
XFormsToolbar::show.

HTH,

-- 
Angus

Reply via email to