aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2021-04-13 23:56:45 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2021-04-13 23:56:45 +0200
commitbe7e0b2b59b2b89ba31f5bb97e4d3b44e354199d (patch)
tree6f2b27d61f70e83a10d8240d07295a46f6bb5311
parent31c2497bc6b54edb486877742104602c090bdb4a (diff)
downloadmidi_matrix.lv2-be7e0b2b59b2b89ba31f5bb97e4d3b44e354199d.tar.xz
nk: use new scale API.
-rw-r--r--VERSION2
-rw-r--r--midi_matrix_channel_filter_nk.c8
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);