Jürgen Spitzmüller wrote:
Bo Peng wrote:
But if you ever want to insert the break at non-TOP dock, 4.2.2 is
required.

What happens if you use an older version? Is LyX still usable (else, we have to use #ifdef's IMO)?

As already announced, I have a different solution in the pipe (only
inserting ToolbarBreaks if the toolbar exceeds the main window). I'll
send this to the list soon (first, I have to solve the conflicts your
patch caused here).
This would be a good solution and I was too lazy to calculate toolbar
lengths (how to do this anyway?).

Tb->sizeHint().width()
The more difficult problem seems to be the workarea width.

Why? WorkArea::width should always gives you the true width of the content pane (excluding scrollbar). But I think that for toobar purpose you'd rather need the width of the _window_ instead. This is given to you by GuiView::width(). You can create a new pure virtual method in LyXView to get that at kernel level. Or maybe a getGeometry() that will give everything in one go.

Abdel.

Reply via email to