This is the result of debugging and "fixing" (working around, actually) #26014.
@csomor I wasn't able to understand why isn't the device origin respected in wxRendererMac::DrawMacHeaderCell(). I've checked that it uses the same CGContext for which we had called wxMacCoreGraphicsContext::SetTransform() with the translation transform before, yet somehow it is just not taken into account in this code.
https://github.com/wxWidgets/wxWidgets/pull/26016
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@vadz I'll look at it if possible tomorrow
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks, there is nothing urgent about it and my workaround works fine, but I just wonder if you immediately see something obviously wrong with using wxDC::SetDeviceOrigin() and then using native functions on the underlying graphics context because this could be a source of other bugs elsewhere...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
it's not the offset, but a clipping problem, if you scroll and make the window large enough you see some additional headers being properly drawn, but only as long as they are part of the "original" clipping area
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
When I undo the device origin offsetting and instead move the native NSCell drawing frame accordingly, then things are drawn correctly, I'll have to think about this a little more
ie after this CGContextSaveGState(cgContext); in renderer.mm line 763, I added
wxPoint offset = dc.GetDeviceOrigin();
CGContextTranslateCTM( cgContext, -offset.x, -offset.y );
controlRect = NSOffsetRect(controlRect, offset.x, offset.y);
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
it's not the offset, but a clipping problem,
Ah, I should have realized it (because "I" column was still visible after scrolling), thanks.
As I said, I think we can live with the new version of the code avoiding clipping in wxHeaderCtrl (it's more efficient, too, even if this could be done while still setting the device origin, of course), but it would probably still be good to adjust the clipping region when it the device origin is changed — if this is even possible?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I've written a PR #26018 with this change
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Merged #26016 into master.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()