Capture Widget, Marker Improvement, Restrict HDR Tunning

if you're indenting a whole function to put in inside an if statement, you might instead reverse the if condition and "return". Another option is to put the if on the caller (it might end up fitting better there)