Cabbage Logo
Back to Cabbage Site

High-res graphics issue for presets menu

Sorry to bother with small problems, especially during that busy times of changes. But I discovered an ‘inconvenience’ which is maybe easy to fix. When I open the new presets menu in a VST3 plugin, the menu items are only half the size of the other text and I did not find an option to change the fontsize in presetbuttons:

Of course that may depend on a lot of factors, so may not happen to everyone. Here are the conditions:

  • Windows 10 Pro
  • Resolution 3840x2160
  • Does not happen when started directly from Cabbage.

I know that REAPER has some issues with high-res especially for older plugins. But here I have the hope that it can be fixed because it does not happen for the normal text, just the menu items.

How are you changing the font size for buttons?

Actually, in this project I did not change any fontsizes. So everything else is just the font size derived from the widget height.
In other projects I did it, but only with nsliders, like nslider fontsize(20), bounds(182, 94, 31, 60), channel("B"), range(0, 2, 0, 1, 1), text("B").

The complete code where the small fonts show: quasi.csd (5.2 KB)

What version of Cabbage are you using? When I try your code the preset menu items match that of the presetbutton :thinking:

Version 2.9.216

The font size reduction only happens if I use the code as a plugin (and maybe only in REAPER, I did not yet try another DAW). So it is probably a fault of REAPER’s high-res handling. But until now I only encountered plugins which were scaled-down completely by 50%, graphics and all texts. But here all other items are scaled correctly, just the menu items are small. That’s why I have the hope that there is some difference in the way the font size is defined for the text in the button and the text in the menu items, and by changing the latter to the former the problem can be solved.

I just loaded this into Reaper and I still no difference in height between the presetbutton label and the menu items. :thinking: I’m testing on a Mac if that makes any difference?

How do you scale down a plugin in Reaper if its not an option within the plugin itself? I couldn’t find any way to do this and I see no resizing option in the code you posted…

What I meant is that for the older plugins REAPER simply creates the user interface pixelwise. Because pixels on the hi-res screen are only half the size they were common at the time the plugin was designed, the whole UI is physically scaled down by 50%.

For more modern plugins REAPER tries something which I think is called “resolution awareness”. The physical size of the UI is independent of the screen resolution.

So what I meant is not the scaling like you have it for Vital, where the user specifies a factor in the plugin settings.

I did some more tests:

Mac OS, REAPER: After jumping through the codesign hoop once again it fully works. All font sizes are the same and reasonably large.

Windows, Waveform: Waveform seems to simply assign 2x2 pixels to one pixel of the Cabbage UI. That works, but is a bit blurry (like the compatibility mode of Windows).

So it seems the fact that the ‘resolution awareness’ of REAPER does not cover the menu items of the presetbutton is again an awkwardness of my specific configuration. (as many before :wink: )

Thanks for the update :slight_smile: