From be7e0b2b59b2b89ba31f5bb97e4d3b44e354199d Mon Sep 17 00:00:00 2001 From: Hanspeter Portner Date: Tue, 13 Apr 2021 23:56:45 +0200 Subject: [PATCH] nk: use new scale API. --- VERSION | 2 +- midi_matrix_channel_filter_nk.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 5540b6e..0fca64c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.29.3 +0.29.9 diff --git a/midi_matrix_channel_filter_nk.c b/midi_matrix_channel_filter_nk.c index 4aa6aca..2967d25 100644 --- a/midi_matrix_channel_filter_nk.c +++ b/midi_matrix_channel_filter_nk.c @@ -194,9 +194,11 @@ instantiate(const LV2UI_Descriptor *descriptor, handle->controller = controller; handle->writer = write_function; + const float scale = nk_pugl_get_scale(); + nk_pugl_config_t *cfg = &handle->win.cfg; - cfg->width = 640; - cfg->height = 640; + cfg->width = 640 * scale; + cfg->height = 640 * scale; cfg->resizable = true; cfg->fixed_aspect = true; cfg->ignore = false; @@ -209,7 +211,7 @@ instantiate(const LV2UI_Descriptor *descriptor, if(asprintf(&cfg->font.face, "%sCousine-Regular.ttf", bundle_path) == -1) cfg->font.face= NULL; - cfg->font.size = 13; + cfg->font.size = 13 * scale; *(intptr_t *)widget = nk_pugl_init(&handle->win); -- 2.38.5