Page 1 of 1
RenderCache double offset?
Posted: Mon Jul 18, 2005 07:42
by gcarlton
I've just got latest after a huge delay, and there were two little snags I came across. The static element seems to be double-offsetting its position. This is since it tells the cache its position as an abs rect, that then gets offset again when rendered.
To fix it, I had to change the following lines:
Static::populateRenderCache:
Rect backgroundRect(Point(0,0), getAbsoluteSize());
StaticText::populateRenderCache:
Rect absarea(Point(0,0), getAbsoluteSize());
This could be due a merge conflict on my part (perhaps due to my changes to support rotated static images), I'm not sure. Anyway, that fixed it for me.
Geoff
Re: RenderCache double offset?
Posted: Mon Jul 18, 2005 08:27
by CrazyEddie
Hey Geoff,
I'll have a look, though I thought I'd got this right - I did re-test the old classes, honest
Re: RenderCache double offset?
Posted: Mon Jul 18, 2005 10:14
by gcarlton
Its wierd, the menu text item seems to have the same problem. Surely all these different classes can't be wrong, so I wonder if I have some simple merge bug somewhere that is screwing it all up...
Re: RenderCache double offset?
Posted: Mon Jul 18, 2005 21:59
by guyver6
@CrazyEddie: That's probably one of the bugs I talked you about on IRC, that static text control with lots of text in it stopped rendering it's content. I can give you a patch from gcarlton's code.
UPDATE: Hmm, looks like current CVS HEAD doesn't have that code in it
ANOTHER UPDATE: Just found them, here's a patch. Btw, I can't test it since HEAD build is broken
Re: RenderCache double offset?
Posted: Tue Jul 19, 2005 07:16
by gcarlton
Ok, thanks for making up that patch. Talking of bugs, I've noticed a couple of things with the tooltip - and again I'm just going to mention them rather than making up a patch, due to time.
The comments on the setDisplayTime, setHoverTime are swapped! Also, if the app is injecting positions, the tooltip is constantly resetting itself since the windows get mousemove(0,0) events.
Apart from that, its all good. And the menu system kicks ass too!
Re: RenderCache double offset?
Posted: Tue Jul 19, 2005 09:08
by CrazyEddie
I'll be looking into this offst issue today.
I'll fix the comments for tooltip
With regard to the position injection thing, you should only inject an event if the mouse has moved.