Expose transparent background colors for displayModel#12658
Conversation
This comment has been minimized.
This comment has been minimized.
seanbudd
left a comment
There was a problem hiding this comment.
These changes look good to me, this is a great change which might be able to be leveraged in #12372
Would it be too difficult to add system tests here considering the need for an external app (that was used for manual testing)?
Also can you explain why it is okay to remove all the free statements here? I'm guessing it is to do with how the construction was changed but looking to confirm.
In C To replace these I tracked the variable being freed back to where the call to Since C++11 the memory of
We'd have to make a build of the demo app that could be fetched by appveyor. At the moment the demo app doesn't let us test very much (only colors and text reading). So the value is limited. I think if we covered a bit more functionality this would be worth it. There are three demo apps, which I used to test variations in how the GUI APIs use GDI. It isn't immediately obvious how we would structure the tests to interact with these variations. |
Used 'git shortlog -s -n -- <filePath>' to find contributors
Qchristensen
left a comment
There was a problem hiding this comment.
UserGuide change looks fine, good work!
Link to issue number:
Resolves concerns about contributed PR: #9197
Workaround for #6467
Summary of the issue:
From #6467 (comment)
Description of how this pull request fixes the issue:
There have been two prior attempts to fix this, both causing severe performance regressions.
This implementation merely exposes information about the potential transparency of the text background.
Testing with various GDI dependent GUI APIs shows that the
GetBkColorresult can be:The exposure of the transparency (via the
alphavalue on thecolors.RGBclass) will allow appModulesor add-ons to customize NVDA's presentation as necessary.
For users, there is no change in behavior by default. An option is introcuded to the advanced settings panel to allow reporting of transparency in colors. The intention here is that developers will use this to identify where
color reporting could be improved.
The prior approach used the colorref high-level byte of a
colorrefstruct. However, MSDN requires this byte be zero.This prior approach did not pass the colorref into any Windows API's, so it was safe. But to prevent this from being accidentally introduced in the future, a compatible alternative type is introduced and used instead.
In order to stay compatible with python code interpretting this color value, a single bit is set if the color is considered transparent.
Testing strategy:
NVDA+Numpad 7to switch to screen reviewNumpad 7,Numpad 8,Numpad 9to read the dialogKnown issues with pull request:
None
Change log entries:
For Developers
Code Review Checklist: