Browse Source

Fix carla-vst GUI for macOS retina displays

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.6
falkTX 1 year ago
parent
commit
6c10e2fc7c
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      source/plugin/ui_launcher.cpp

+ 5
- 0
source/plugin/ui_launcher.cpp View File

@@ -158,6 +158,11 @@ void getUILauncherSize(CarlaUILauncher* const ui, VstRect* const rect)
{ {
rect->right = ui->window.getWidth(); rect->right = ui->window.getWidth();
rect->bottom = ui->window.getHeight(); rect->bottom = ui->window.getHeight();
#ifdef DISTRHO_OS_MAC
const double scaleFactor = ui->window.getScaleFactor();
rect->right /= scaleFactor;
rect->bottom /= scaleFactor;
#endif
} }


void idleUILauncher(CarlaUILauncher* const ui) void idleUILauncher(CarlaUILauncher* const ui)


Loading…
Cancel
Save