show hide widget logic