Re: Reviews of commits

2013-09-10 Thread Hashini Senaratne
Hello Jean-Marc, > > 1) When moving from the left most position of a row to the above too wide > > row using left arrow, row does not get slide. (I think I found a fix for > > this, have to test more) > > Here is what I observe: > https://dl.dropboxusercontent.com/u/105510128/Bug_2.webm Did you

Re: Reviews of commits

2013-09-07 Thread Hashini Senaratne
Hello Jean-Marc, > Identified another two bugs... > 1) When moving from the left most position of a row to the above too wide > row using left arrow, row does not get slide. (I think I found a fix for > this, have to test more) Here is what I observe: https://dl.dropboxusercontent.com/u/105510128

Re: Reviews of commits

2013-09-07 Thread Hashini Senaratne
Hello Jean-Marc, > > RowPainter rp(pi, bv.buffer().text(), cur.bottom().pit(), row, bidi, 0, > > - rp.paintOnlyInsets(); > > + //rp.paintOnlyInsets(); > > + rp.paintText(); > > I think you are right. It might also be that we should use both. For now I put only rp.paint

Re: Reviews of commits

2013-09-07 Thread Jean-Marc Lasgouttes
Le 07/09/13 18:37, Hashini Senaratne a écrit : I do not know whether this is a goo new or not. But with the following fix I could solve that problem. diff --git a/src/BufferView.cpp b/src/BufferView.cpp index c53fd1d..1dc8f51 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -2856,14 +

Re: Reviews of commits

2013-09-07 Thread Hashini Senaratne
Hello Jean-Marc, > Le 06/09/13 13:07, Hashini Senaratne a écrit : I do not know whether this is a goo new or not. But with the following fix I could solve that problem. diff --git a/src/BufferView.cpp b/src/BufferView.cpp index c53fd1d..1dc8f51 100644 --- a/src/BufferView.cpp +++ b/src/BufferVie

Re: Reviews of commits

2013-09-07 Thread Jean-Marc Lasgouttes
Le 07/09/13 17:03, Hashini Senaratne a écrit : As I can understand here you have declared a new RowPainter and with the disabled drawing tries to pain only the insets. It is assumed that this will force the re-computation of the positions of the insets. Exactly. This will give the position when

Re: Reviews of commits

2013-09-07 Thread Hashini Senaratne
Hello Jean-Marc, > * Recompute inset positions before checking row left edge, by > painting the row insets with drawing disabled. > > Corresponding change is: > > + // Force the recomputation of inset positions > + bool const drawing = pi.pain.isDrawingEnabled(); > + pi.p

Re: Reviews of commits

2013-09-07 Thread Hashini Senaratne
Hello Jean-Marc, > > I tried both of the above patches that you have sent me. But nothing was > > able to solve the problem I mentioned. (When entering Math inset from right > > edge, row slides unexpectedly to the left most position.) However bellow > > code solved the above mentioned problem. >

Re: Reviews of commits

2013-09-06 Thread Jean-Marc Lasgouttes
Le 06/09/13 13:07, Hashini Senaratne a écrit : I tried both of the above patches that you have sent me. But nothing was able to solve the problem I mentioned. (When entering Math inset from right edge, row slides unexpectedly to the left most position.) However bellow code solved the above mentio

Re: Reviews of commits

2013-09-06 Thread Hashini Senaratne
Hello Jean-Marc, > > Unfortunately, this code exists to avoid painting too much stuff, so we > > have to cope with it. We cannot afford to repaint the whole screen every > > time the user moves the cursor, it can be really horrible, especially on > > Mac OS X. I will try to post a patch tomorrow i

Re: Reviews of commits

2013-09-05 Thread Jean-Marc Lasgouttes
04/09/2013 18:21, Jean-Marc Lasgouttes: Here is a tentative patch. However it does not work since it seems that BufferView::draw does not get called when using home/end... This patch replaces the two patches I sent earlier. Most of it is just moving code from TextMetrics to BufferView, but the

Re: Reviews of commits

2013-09-04 Thread Jean-Marc Lasgouttes
03/09/2013 18:15, Jean-Marc Lasgouttes: Unfortunately, this code exists to avoid painting too much stuff, so we have to cope with it. We cannot afford to repaint the whole screen every time the user moves the cursor, it can be really horrible, especially on Mac OS X. I will try to post a patch to

Re: Reviews of commits

2013-09-03 Thread Scott Kostyshak
On Tue, Sep 3, 2013 at 5:13 PM, Jean-Marc Lasgouttes wrote: > Le 03/09/2013 18:22, Scott Kostyshak a écrit : > > >> I've seen references to this a few times and now curiosity has won me >> over: is there a high-level simple explanation for why "especially on >> Mac OS X" ? > > > No. For some reaso

Re: Reviews of commits

2013-09-03 Thread Jean-Marc Lasgouttes
Le 03/09/2013 18:22, Scott Kostyshak a écrit : I've seen references to this a few times and now curiosity has won me over: is there a high-level simple explanation for why "especially on Mac OS X" ? No. For some reason painting seems to be very expensive there. Maybe because we are not doing

Re: Reviews of commits

2013-09-03 Thread Scott Kostyshak
On Tue, Sep 3, 2013 at 12:15 PM, Jean-Marc Lasgouttes wrote: > 31/08/2013 07:13, Hashini Senaratne: > Unfortunately, this code exists to avoid painting too much stuff, so we have > to cope with it. We cannot afford to repaint the whole screen every time the > user moves the cursor, it can be real

Re: Reviews of commits

2013-09-03 Thread Jean-Marc Lasgouttes
31/08/2013 07:13, Hashini Senaratne: Hello Jean-Marc, Hope you returned safely. Thanks. Sorry to answer so late, I had to cleanup the work that accumulated duing these weeks. See my other message, you should be able to create another RowPainter object. I tried this but as you mentioned i

Re: Reviews of commits

2013-08-30 Thread Hashini Senaratne
Hello Jean-Marc, Hope you returned safely. > > It seems to me, I have not clearly understood this matter till now. I doubt > > how we can call rp.drawOnlyInsets(...); before left_edge computations, as we > > are only creating the RowPainter object after those calculations. > > See my other mess

Re: Reviews of commits

2013-08-26 Thread Jean-Marc Lasgouttes
Le 24/08/2013 19:11, Hashini Senaratne a écrit : I have no idea either. You should maybe chack what happens with normal LyX on a normal file. I am surprised that we could have changed that. I am not just talking about the size. Of course size is getting reduced, due to the appearing math item b

Re: Reviews of commits

2013-08-24 Thread Hashini Senaratne
Jean-Marc Lasgouttes lyx.org> writes: > PainterInfo is defined in src/MetricsInfo.h. "git grep" is your friend > to find this kind of information. Thank you. Got it. > > Did you notice > > that the size of the vertical scroll bar changes when we come into the too > > wide math equation, from a

Re: Reviews of commits

2013-08-22 Thread Jean-Marc Lasgouttes
Le 21/08/2013 20:59, Hashini Senaratne a écrit : As you asked me to change the cursor that we use in TextMetrics.cpp to non-constant by using the non-constant cursor of PainterInfo I tried to find information about that. 'In particular in pi you have pi.bv, which is a pointer to the buffer view.

Re: Reviews of commits

2013-08-21 Thread Hashini Senaratne
Hello Jean-Marc, > I am now back from vacation for a week and took the time to review the > current code and change it according to the ideas that we have discussed > in July. It strikes me as a better way to state my ideas (and was also a > good way to understand what ideas do not work...). N

Re: Reviews of commits

2013-08-20 Thread Jean-Marc Lasgouttes
01/08/2013 20:19, Hashini Senaratne: I carefully followed your reviews and modified the code accordingly. Your comments on them were really useful. Hello Hashini, I am now back from vacation for a week and took the time to review the current code and change it according to the ideas that we h