10/04/2013 13:19, Hashini Senaratne:
* Inserting a real scrollbar (that is, a Qt widget) in our
workarea may prove difficult. Moreover the scrollbar would take
room in the documents. Alternatives include:

Is not it possible to implement to have a horizontal scrollbar (real
 scrollbar) like the vertical scrollbar at the bottom of the working
 area. But it only gets appear when the cursor enters a too wide
area (too wide table, too wide equation). And by scrolling this
horizontal scrollbar, only the above mentioned too wide area will get
scrolled horizontally.

I am not competent at all when it comes to Qt, but I suuspect that a lot
of work will be needed in our WorkArea widget to have it aware that it
contains other Qt widgets (the scrollbars) and pass the needed messages
(process paint events...) correctly. For example, currently our buttons
(for collapsable insets) are not Qt objects at all.

* have buttons with arrows in the left and right margin or (since
these margins are currently thin) maybe buttons that appear as
needed when the mouse if over the problematic inset.

I think this option will not much user-friendly.

Well, it requires to move the mouse to some particular place, but the
same holds for the scrollbar. But you may be right.

* have the inset slide as needed to the left when the cursor
enters a part that would be off screen.

To my understanding, this works with tables. I created a table with
3/4 columns and I added some large text to the final column. When I
click on the first/ second column the table slides to right and when
I click on the final column the table slides left. When I click an
outer area (not in the area belongs to the table) table slides to
right, if it is not. But again, if we have several columns with long
texts, accessing each column would not be easy in this way, as I
think. There we may need to use arrow keys in the keyboard that is
not a user-friendly action.

The tables use IMO a half-backed solution, and I propose that we remove
this code once a proper generic solution has been implemented. What the
code does not do is to scroll a very long inset when a part of it is not
visible on screen.

Thank you for the information. I will go through the source and get
back to you later. As I think having a scrollbar would be easy to
handle for any user rather than inset slides. But as you said,
scrolling the document as a whole is also inefficient.

A good first step to getting to know LyX sources may be to look at the
problem highlighted here:

http://www.lyx.org/trac/ticket/1083#comment:12

<quote>
If you have a float with a wide table and a legend below the table (still within the float) occupying several lines, then you cannot see the whole text of the legend, it is never shifted. The table is *sometimes* shifted when you move the caret around, but sometimes it is not shifted, I still do not understand exactly under which conditions.
</quote>

I suspect that this problem can be solved very easily (I mean in terms of number of lines of code to change, not in time needed to find the right place :). The idea is that an element of an inset should not have a width larger than the screen just because on element of the inset is overly large.

Please guide me on my idea, which I have mentioned above. If it is
difficult to implement or not suitable for the context please advise
me on a better approach. I am mentioning it here again,

"Is not it possible to implement to have a horizontal scrollbar (real
scrollbar) like the vertical scrollbar at the bottom of the working
area. But it only gets appear when the cursor enters a too wide area
(too wide table, too wide equation). And by scrolling this horizontal
scrollbar, only the above mentioned too wide area will get scrolled
horizontally."

Is my answer above sufficient wrt why I fear a real scrollbar will be
difficult to implement?

JMarc

Reply via email to