This post is here to save your time during GUI development in Mathematica. And one way to do this is to know where limits are and to be aware of features that are awaiting.

##Intro

Usually I don't have to care (it hurts my brain though) about misaligned details, additional/missing pixels. But currently I'm participating in a project where the design matters and I have to follow examples made by a graphics designer.

I have to workaround 10 "features" per hour, and I'm not talking about fancy stuff.

##Things to keep in mind when developing complex GUI in MMA:


- ###MMA assumes your `dpi == 72` on Windows whether it is so or not.

 You can force proper handling of printer's points on HiDPI screens, but are you allowed to do this for the customer's front end?

 Which isn't documented and self inconsistent documentation won't help you understand what's going on.

 [**What is a printer's point?**](http://mathematica.stackexchange.com/q/109813/5478)

 

 
 [**Fontsize is too small**](http://mathematica.stackexchange.com/q/745/5478)

 
- ###Painful mix of units

   Printer points and font size units (good luck with tracking what is the current one) are only options. And not both but you have to align two different worlds. 

  [**How to convert between various ItemSize/ImageSize units?**](http://mathematica.stackexchange.com/q/1584/89)

- ###Lack of full control/documentation of Kernel initialization/deinitialization:

 [**Handling Kernel start. Autoload place in init stack.**](http://mathematica.stackexchange.com/q/110243/5478)

 [**Handling Kernel quit**](http://mathematica.stackexchange.com/q/110162/5478)

 [**How to clean up after a package?**](http://community.wolfram.com/groups/-/m/t/824185) 

 [[...] What you cannot do is to make assumptions about the order in which subsequent DynamicModule or Dynamic expressions will fire, or even if they will fire (if they're not in the same position). [...]](http://mathematica.stackexchange.com/questions/167/what-are-the-most-common-usual-ways-to-make-palettes-with-non-trivial-function/109638#comment3498_1113) [[...] NotebookDynamicExpression not firing in new kernel sessions [...]](http://mathematica.stackexchange.com/questions/167/what-are-the-most-common-usual-ways-to-make-palettes-with-non-trivial-function/109638#comment123110_1113)

- ###Dynamic based GUI will not digest Kernel quit well, and you can't do much about that because of the previous point.

 [**Dynamic cells after Kernel restart/quit.**](http://mathematica.stackexchange.com/q/80560/5478)

- ###Ignored options
   
   [**Grid - problem with ItemSize being ignored**](http://mathematica.stackexchange.com/q/13399/89)
 

     `SetOptions[GraphicsGrid, Frame -> True];`
     `GraphicsGrid@Array[Graphics@Circle[] &, {2, 2}]`
     
       ![Mathematica graphics](https://i.sstatic.net/Q8Mog.png)


- ###Misaligned frames:


        test = Framed[  "TEST",
          Background -> Red, FrameStyle -> Blue, ImageSize -> {100, 100}
        ]
[![enter image description here][1]][1]

- ###Lack of a precise control over the output size:

        ImageDimensions @ Rasterize @ %
>      {100, 102} (*I could live with {102, 102} ... *)

- ###Additional pixels everywhere:

        test = Framed[   "TEST",   Background -> Red,   FrameStyle -> #  ] &;

        Column[{
            #, #,
            Column[{#, #}, Spacings -> 0]
           }, Spacings -> 0] & /@ {test[Blue], test[None]}

 [![enter image description here][2]][2]

- ###"Features" everywhere

 When you go with bitmap based GUI you think it's going to be lovely day, and then e.g. [**Grid cuts my images**](http://mathematica.stackexchange.com/q/105061/5478) or [**Transparent bitmaps in controllers bug.**](http://mathematica.stackexchange.com/q/85521/5478).

 [**TabView Alignment problem for content larger than a view area**](http://mathematica.stackexchange.com/q/76397/5478)

 [**Notebook's WindowSize interference with contents' Dynamic ImageSizes**](http://mathematica.stackexchange.com/q/61659/5478)

 [**Problem with CurrentValue["MouseOver"] and Deploy**](http://mathematica.stackexchange.com/q/43672/5478)

 [**Create a notebook and save it without prompting Dynamics**](http://mathematica.stackexchange.com/q/109651/5478)


- ###OS dependent features

 From my experience it is impossible to create precise GUI for Win and Mac. Not all features are OS dependent, and often workaround for one will give you headache in the other.

  [**Grid layout problems: different sizes when rendering on Mac and Windows**](http://mathematica.stackexchange.com/q/17795/5478)

  [Not needed Stylesheet locked by the FrontEnd](http://mathematica.stackexchange.com/q/108640/5478)

----------

Give me couple of days and I will make this post 3 times bigger (just saying, don't have time for that).

##Question

**Are there any guidelines to make GUI creation process more stable?** 

Quick workarounds are not general enough and I don't have time to spend 1 day to align a simple grid.

**If not, what should I tell the designer/manager about requirements?** 

People are used to the fact that you can create very nice layout with css in no time, how to explain that it is impossible, or not worth the time spent, in Mathematica?  How to explain why getting rid of "white line" in some secondary menu took me half a day, and I've failed? 

      




  [1]: https://i.sstatic.net/dIdAT.png
  [2]: https://i.sstatic.net/U3Sh8.png