Support scaled UI again.
parent
7f92ee1565
commit
cd80d7701c
|
@ -19,26 +19,23 @@
|
|||
#include "ptap.h"
|
||||
|
||||
struct PTapUI : LV2PUi {
|
||||
int width;
|
||||
int height;
|
||||
|
||||
/* virtual */ void InitWidgets();
|
||||
};
|
||||
|
||||
void PTapUI::InitWidgets()
|
||||
{
|
||||
this->width = 250 + 50 * (NUM_TAPS + NUM_CHANNELS + 1);
|
||||
this->height = 660;
|
||||
int width = 250 + 50 * (NUM_TAPS + NUM_CHANNELS + 1);
|
||||
int height = 660;
|
||||
|
||||
char tmp[128];
|
||||
|
||||
scale = 1.0f;
|
||||
this->scale = 1.0f;
|
||||
|
||||
widget = new Container();
|
||||
widget->back = 1;
|
||||
widget->colour = Colour(1, 1, 1, 1);
|
||||
widget->w = this->width * scale;
|
||||
widget->h = this->height * scale;
|
||||
widget->w = width;
|
||||
widget->h = height;
|
||||
|
||||
int padding = 4;
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ void LV2PUi::Instantiate(
|
|||
|
||||
this->InitWidgets();
|
||||
|
||||
int w = this->widget->w;
|
||||
int h = this->widget->h;
|
||||
int w = this->widget->w / this->scale;
|
||||
int h = this->widget->h / this->scale;
|
||||
|
||||
this->view = puglCreate(parent, "Test", w, h, true);
|
||||
puglSetHandle(this->view, this);
|
||||
|
|
Loading…
Reference in New Issue