resolve detail window width and close image