View Single Post
12-15-18, 03:39 AM   #3
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
If your display, or if writing a public addon, the user's display, is greater than 1920x1080, you need to do two things:
  1. Set the CVar scale to 768/height
  2. Set UIParent's scale to 768/height
This is because WoW won't let you set a CVar scale lower than 0.64 which won't look correct on monitors with a resolution greater than 1080p.

If the height is equal to or less than 1920, only do the first thing. Now here are the hard parts:
  1. Scale your frame initially by the above scale, in which it will look tiny with unreadable text.
  2. Increase the height and/or width of the frame until it looks good, but leave the scale alone.
  3. As mentioned, you need to place your newly scaled frame on an even pixel, unless that isn't centered. You'll have to figure that out frame by frame.
  4. Assuming you let the user set a scale, which is a bad idea at this point, wrap your "user scale" instead in height or width adjustments providing the illusion of scaling up or down. A better idea is to not provide a scaling option and go straight for height or width.
  5. Place the adjusted frame again so it sits evenly.
  Reply With Quote