~hp/midi_matrix.lv2

73413fe1c39534e3cc4e0d1ef1b8b86a593e4eac — Hanspeter Portner 2 years ago be7e0b2
nk: fix last commit.
2 files changed, 21 insertions(+), 23 deletions(-)

M VERSION
M midi_matrix_channel_filter_nk.c
M VERSION => VERSION +1 -1
@@ 1,1 1,1 @@
0.29.9
0.29.11

M midi_matrix_channel_filter_nk.c => midi_matrix_channel_filter_nk.c +20 -22
@@ 194,27 194,6 @@ 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 * scale;
	cfg->height = 640 * scale;
	cfg->resizable = true;
	cfg->fixed_aspect = true;
	cfg->ignore = false;
	cfg->class = "channel_filter";
	cfg->title = "Channel Filter";
	cfg->parent = (intptr_t)parent;
	cfg->host_resize = host_resize;
	cfg->data = handle;
	cfg->expose = _expose;

	if(asprintf(&cfg->font.face, "%sCousine-Regular.ttf", bundle_path) == -1)
		cfg->font.face= NULL;
	cfg->font.size = 13 * scale;

	*(intptr_t *)widget = nk_pugl_init(&handle->win);

	const LV2_URID ui_scaleFactor = handle->map->map(handle->map->handle,
		LV2_UI__scaleFactor);



@@ 230,9 209,28 @@ instantiate(const LV2UI_Descriptor *descriptor,

	if(handle->scale == 0.f)
	{
		handle->scale = nk_pugl_get_scale(&handle->win);
		handle->scale = nk_pugl_get_scale();
	}

	nk_pugl_config_t *cfg = &handle->win.cfg;
	cfg->width = 640 * handle->scale;
	cfg->height = 640 * handle->scale;
	cfg->resizable = true;
	cfg->fixed_aspect = true;
	cfg->ignore = false;
	cfg->class = "channel_filter";
	cfg->title = "Channel Filter";
	cfg->parent = (intptr_t)parent;
	cfg->host_resize = host_resize;
	cfg->data = handle;
	cfg->expose = _expose;

	if(asprintf(&cfg->font.face, "%sCousine-Regular.ttf", bundle_path) == -1)
		cfg->font.face= NULL;
	cfg->font.size = 13 * handle->scale;

	*(intptr_t *)widget = nk_pugl_init(&handle->win);

	nk_pugl_show(&handle->win);

	nk_patcher_init(&handle->patch, 0.8f);