setDisabled method
Implementation
@override
void setDisabled(final bool turnOn) {
// setDisabled() needs to add WS_EX_LAYERED,
// Fix an issue where the initial opacity value appears to be 0 because there is no value.
setOpacity(getOpacity());
var exStyle = GetWindowLongPtr(_windowId, GWL_EXSTYLE);
if (turnOn) {
exStyle |= WS_EX_TRANSPARENT;
} else {
exStyle &= ~WS_EX_TRANSPARENT;
}
SetWindowLongPtr(_windowId, GWL_EXSTYLE, exStyle);
}