Support scaled UI again.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user