https://github.com/wxWidgets/wxWidgets/pull/26004
(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 requested changes on this pull request.
It's a pity to have to do this because wxRendererNative was created specifically in order to avoid platform-specific code in generic controls.
If the result of DrawTreeItemButton() without this flag is invisible (in some mode only?), then I really think it should use it by default. This would also fix wxPropertyGrid::DrawExpanderButton() which is presumably broken in the same way currently.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
It is too bright in normal/light mode. Barely visible, but it is obviously wrong. There should be a cleaner way to alter wxRendererNative- that is what it us made for. But that code is hard to read. I don't know in which other cases ApplyMacControlFlags() is used. Maybe I can make it less ugly
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
It is too bright in normal/light mode. Barely visible, but it is obviously wrong.
So you're saying that wxRendererMac::DrawTreeItemButton() is wrong and hence needs to be fixed.
There should be a cleaner way to alter wxRendererNative- that is what it us made for. But that code is hard to read. I don't know in which other cases ApplyMacControlFlags() is used. Maybe I can make it less ugly
Maybe, but in the meanwhile just doing
diff --git a/src/osx/cocoa/renderer.mm b/src/osx/cocoa/renderer.mm index 666a0ac11a..2b385aac26 100644 --- a/src/osx/cocoa/renderer.mm +++ b/src/osx/cocoa/renderer.mm @@ -422,7 +422,7 @@ void wxRendererMac::DrawTreeItemButton( wxWindow *win, { #if wxOSX_USE_NSCELL_RENDERER NSControlStateValue stateValue = (flags & wxCONTROL_EXPANDED) ? NSControlStateValueOn : NSControlStateValueOff; - DrawMacCell(win, dc, GetDisclosureButtonCell(), rect, flags, stateValue); + DrawMacCell(win, dc, GetDisclosureButtonCell(), rect, flags | wxCONTROL_PRESSED, stateValue); #else // now the wxGCDC is using native transformations const wxCoord x = rect.x;
should be better than this PR AFAICS (with an appropriate comment explaining why we turn it on), shouldn't it?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Yes, I just came up with the same solution and that works
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@RobertRoeb pushed 2 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()