fix #349 maxwidth/maxheight issues in Dialog

After delivering #349 via commit 29331b13d5724498ca8bb8a8566564499ed0bf36
a regresion was found during release testing: maxwidth/maxheight
constraints of the Dialog were calculated too big due to addition of the
shadow. That addition should be done only in maximized mode.

Moreover, the Dialog was not correctly resized in maximized mode when
it had maxWidth/maxHeight set. Now that properties are ignored in
maximized mode.

Close #359.
fix #276 icon button test case
1.3.5