Dropdown problem with using UI Scaling

AiScripts
2 min readFeb 9, 2022

--

In October 2018, Illustrator CC 2019 introduced a slider that scales the interface for high-resolution displays.

UI Scaling in Preferences

I saw a bug in ScriptUI. If you insert dropdownlistin the script interface and run the script in Illustrator, where the UI Scaling is not small, the text in the lines is distorted.

Dropdown comparison of Illustrator 2019 (v.23) and 2020 (v.24)

In Adobe Community there was a report that the borders of the dropdown are cut off, similarly seen in my example. One of the participants said that he encountered this when he had scaled the interface of Illustrator.

When Illustrator CC 2020 came out, they fixed the bugs because the dropdown in ScriptUI looks correct at all UI scales. In the meantime, some users who are still working in CC 2019 with UI scaling may encounter this problem. As a solution, you can introduce a check for the version of Illustrator and the current UI scale value when you run the script.

var aiVersion = parseInt(app.version);
var scalePref = app.preferences.getRealPreference('UIPreferences/appScaleFactor');
var scaleErr = 'If you have a problem displaying the dropdown list, disable the UI scaling in Ai prefs';
if (aiVersion == 23 && scalePref > 1) alert(scaleErr);

--

--

AiScripts
AiScripts

Written by AiScripts

Sergey Osokin. Product Illustrator, Icon Designer, Script Developer (Ai, Ps). Writing about bugs and tricks in Adobe Illustrator scripts

No responses yet