In the following pictures, there are four (04) vertical lines (blue & red) in the middle drawn with pen width == 1 and 2. Blue lines are drawn by calling wxDrawLine() function internally. Whereas red lines are drawn by wxDrawHVLine() function.
I removed m_pen.GetWidth() <= 1 || check from this line https://github.com/wxWidgets/wxWidgets/blob/4ed05f7b47d3bd3ac01c4b0d867bece20fe083ff/src/msw/dc.cpp#L710 to expose the bug only. The code I use to draw these line ():
// Put this in MyCanvas::DrawDefault() in drawing sample for ( int i = 0; i < 2; i++ ) { int dx = 400 + 3*(i); int pw = i+1; // pen width wxPen pen(*wxBLUE, pw); dc.SetPen(pen); dc.DrawLine(dx, 0, dx, 80); // calls wxDrawLine() internally pen = wxPen(*wxRED, pw); pen.SetCap(wxCAP_BUTT); dc.SetPen(pen); dc.DrawLine(dx, 80, dx, 160); // calls wxDrawHVLine() internally dc.SetPen(wxNullPen); }
In LTR layout:
drawline.png (view on web)In RTL layout (with this PR):
drawline_rtl_ok.png (view on web)In RTL layout (before):
drawline_rtl_bad.png (view on web)This PR also fixes a bug in wxGrid where the vertical frozen border was not drawn in RTL layout:
Before:
grid_frozen_rtl_bad.png (view on web)After (I changed the grid lines colour to grey):
grid_frozen_rtl_ok.png (view on web)https://github.com/wxWidgets/wxWidgets/pull/26448
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
This is unrelated to #26398
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@vadz approved this pull request.
Thanks, it's really strange that the shift is 1 independently of the pen width (I would find it understandable if it were width - 1), but if this is what we need to do to make this work, let's do it.
I'll merge this soon, thanks again.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()