>> Replacing pi.base.textwidth with the value of mi.base.textwidth gave exactly
the right drawing.
>
> Wrong again, my testing revealed a lot of misdrawing.
What else was wrong besides the large offset issue?
>> Now I'm upset. You reverted correct working code with wrong one:
>>
>> - pi.pain.line(x + h/2 + 1, y - o - h/2, x + w - h/2 - 2, y - o - h/2,
>> + pi.pain.line(x + 1, y - o - h/2, x + dim.wid - 2, y - o - h/2,
>
> Are you kidding me? You are comparing this simple oneliner that is easy to
add again with my work?
That's not the point. My point is that I asked for help and that you changed the code before I had a
chance to comment on it. (I was upset because you did this without testing the new code or at least
to test if my code was working.) How can I learn something when you immediately do what you think
should be done?
I originally asked you because I needed to have the info of the offset and height inPixels also in
the draw routine. You solved this issue now by adding a mutable int in the header file and do the
calculation in the metrics routine. This is exactly the solution I was looking for.
So when you look what I really reverted:
http://www.lyx.org/trac/changeset/35374
you will see that I only reverted 3 lines: the oneliner mentioned above and
these 2 lines:
Dimension const dim = pi.base.bv->coordCache().getInsets().dim(this);
int const max_width = dim.width();
dim.width() was not the text width and could therefore not be used to calculate the offset and
height inPixels. Thus the drwan lines appeared wrong on screen so that the cursor was blinking
inside the lines. I therefore reverted the last line of them to have the old startpoint for the bug
fixing. These 2 lines are now also not in InsetLine.cpp.
> I explicitely requested that you explain your code which you did not.
What? I asked what you want to know and explained you to my best knowledge what
you requested.
> Adding h/2 looked really weird to me so I removed it. If you had put a
comment explaining that
> then I would have let it, as simple as that.
OK, my mistake that I didn't add a comment for this. But you could also have
asked me.
>> The same is that you blamed me for a patch I sent. I mean, yes it used a
global variable, but
>> it was a patch sent to pushing the discussion forward and to explain what I
want to do in
>> principle. I explicitly stated several times that using a global variable is
not an acceptable
>> solution. So why are you attacking me?
>
> Because you insisted on saying that you are correct while you are wrong;
because you are not
> trying to understand things; because you put in code that is
unmaintainable... is that enough?
Of course I try to learn and to understand things. I still don't get it where I insisted to say I'm
right. I several times fully agreed with you that my hacks are hacks! Maybe I missed points where
you did not think so - please point me to them so that I can avoid that in the future.
In fact I really don't understand why you are so insulted and now are even insult me. I didn't do
this to you, so please be fair and don't do it to me.
regards Uwe