@@ -1 +1 @@ | |||||
Subproject commit 5709c0e4e573921e3fe90a54113f57885f4e4340 | |||||
Subproject commit 2e508c73e95ef50947e3ed6e941b67b1f6b5bed4 |
@@ -101,6 +101,9 @@ PowerJuiceUI::PowerJuiceUI() | |||||
// set default values | // set default values | ||||
programLoaded(0); | programLoaded(0); | ||||
// automatically-scale | |||||
setGeometryConstraints(PowerJuiceArtwork::backgroundWidth, PowerJuiceArtwork::backgroundHeight, true, true); | |||||
} | } | ||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
@@ -153,7 +156,7 @@ void PowerJuiceUI::imageButtonClicked(ImageButton* button, int) | |||||
if (button != fButtonAbout) | if (button != fButtonAbout) | ||||
return; | return; | ||||
fAboutWindow.exec(); | |||||
fAboutWindow.runAsModal(); | |||||
} | } | ||||
void PowerJuiceUI::imageKnobDragStarted(ImageKnob* knob) | void PowerJuiceUI::imageKnobDragStarted(ImageKnob* knob) | ||||
@@ -213,7 +216,9 @@ void PowerJuiceUI::uiIdle() | |||||
void PowerJuiceUI::onDisplay() | void PowerJuiceUI::onDisplay() | ||||
{ | { | ||||
fImgBackground.draw(); | |||||
const GraphicsContext& context(getGraphicsContext()); | |||||
fImgBackground.draw(context); | |||||
if (dsp == nullptr) | if (dsp == nullptr) | ||||
return; | return; | ||||
@@ -101,6 +101,9 @@ PowerJuiceX2UI::PowerJuiceX2UI() | |||||
// set default values | // set default values | ||||
programLoaded(0); | programLoaded(0); | ||||
// automatically-scale | |||||
setGeometryConstraints(PowerJuiceX2Artwork::backgroundWidth, PowerJuiceX2Artwork::backgroundHeight, true, true); | |||||
} | } | ||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
@@ -153,7 +156,7 @@ void PowerJuiceX2UI::imageButtonClicked(ImageButton* button, int) | |||||
if (button != fButtonAbout) | if (button != fButtonAbout) | ||||
return; | return; | ||||
fAboutWindow.exec(); | |||||
fAboutWindow.runAsModal(); | |||||
} | } | ||||
void PowerJuiceX2UI::imageKnobDragStarted(ImageKnob* knob) | void PowerJuiceX2UI::imageKnobDragStarted(ImageKnob* knob) | ||||
@@ -213,7 +216,9 @@ void PowerJuiceX2UI::uiIdle() | |||||
void PowerJuiceX2UI::onDisplay() | void PowerJuiceX2UI::onDisplay() | ||||
{ | { | ||||
fImgBackground.draw(); | |||||
const GraphicsContext& context(getGraphicsContext()); | |||||
fImgBackground.draw(context); | |||||
if (dsp == nullptr) | if (dsp == nullptr) | ||||
return; | return; | ||||
@@ -81,6 +81,9 @@ StutterJuiceUI::StutterJuiceUI() | |||||
// set default values | // set default values | ||||
programLoaded(0); | programLoaded(0); | ||||
// automatically-scale | |||||
setGeometryConstraints(StutterJuiceArtwork::backgroundWidth, StutterJuiceArtwork::backgroundHeight, true, true); | |||||
} | } | ||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
@@ -112,7 +115,7 @@ void StutterJuiceUI::imageButtonClicked(ImageButton* button, int) | |||||
if (button != fButtonAbout) | if (button != fButtonAbout) | ||||
return; | return; | ||||
fAboutWindow.exec(); | |||||
fAboutWindow.runAsModal(); | |||||
} | } | ||||
void StutterJuiceUI::imageSliderDragStarted(ImageSlider* slider) | void StutterJuiceUI::imageSliderDragStarted(ImageSlider* slider) | ||||
@@ -132,10 +135,12 @@ void StutterJuiceUI::imageSliderValueChanged(ImageSlider* slider, float value) | |||||
void StutterJuiceUI::onDisplay() | void StutterJuiceUI::onDisplay() | ||||
{ | { | ||||
fImgBackground.draw(); | |||||
const GraphicsContext& context(getGraphicsContext()); | |||||
fImgBackground.draw(context); | |||||
drawLFOs(); | drawLFOs(); | ||||
fImgOverlay.draw(); | |||||
fImgOverlay.draw(context); | |||||
} | } | ||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
@@ -98,6 +98,9 @@ TriggerJuiceUI::TriggerJuiceUI() | |||||
// set default values | // set default values | ||||
programLoaded(0); | programLoaded(0); | ||||
// automatically-scale | |||||
setGeometryConstraints(TriggerJuiceArtwork::backgroundWidth, TriggerJuiceArtwork::backgroundHeight, true, true); | |||||
} | } | ||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
@@ -25,11 +25,9 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
VectorJuiceUI::VectorJuiceUI() | VectorJuiceUI::VectorJuiceUI() | ||||
: UI(), | |||||
: UI(VectorJuiceArtwork::backgroundWidth, VectorJuiceArtwork::backgroundHeight), | |||||
fAboutWindow(this) | fAboutWindow(this) | ||||
{ | { | ||||
setSize(VectorJuiceArtwork::backgroundWidth, VectorJuiceArtwork::backgroundHeight); | |||||
// xy params | // xy params | ||||
paramX = paramY = 0.5f; | paramX = paramY = 0.5f; | ||||
@@ -186,6 +184,9 @@ VectorJuiceUI::VectorJuiceUI() | |||||
// set default values | // set default values | ||||
programLoaded(0); | programLoaded(0); | ||||
// automatically-scale | |||||
setGeometryConstraints(VectorJuiceArtwork::backgroundWidth, VectorJuiceArtwork::backgroundHeight, true, true); | |||||
} | } | ||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
@@ -303,7 +304,7 @@ void VectorJuiceUI::imageButtonClicked(ImageButton* button, int) | |||||
if (button != fButtonAbout) | if (button != fButtonAbout) | ||||
return; | return; | ||||
fAboutWindow.exec(); | |||||
fAboutWindow.runAsModal(); | |||||
} | } | ||||
void VectorJuiceUI::imageKnobDragStarted(ImageKnob* knob) | void VectorJuiceUI::imageKnobDragStarted(ImageKnob* knob) | ||||
@@ -338,7 +339,9 @@ void VectorJuiceUI::imageSliderValueChanged(ImageSlider* slider, float value) | |||||
void VectorJuiceUI::onDisplay() | void VectorJuiceUI::onDisplay() | ||||
{ | { | ||||
fImgBackground.draw(); | |||||
const GraphicsContext& context(getGraphicsContext()); | |||||
fImgBackground.draw(context); | |||||
// get x, y mapped to XY area | // get x, y mapped to XY area | ||||
int x = fCanvasArea.getX() + paramX*fCanvasArea.getWidth() - fImgRoundlet.getWidth()/2; | int x = fCanvasArea.getX() + paramX*fCanvasArea.getWidth() - fImgRoundlet.getWidth()/2; | ||||
@@ -23,11 +23,9 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
WobbleJuiceUI::WobbleJuiceUI() | WobbleJuiceUI::WobbleJuiceUI() | ||||
: UI(), | |||||
: UI(WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight), | |||||
fAboutWindow(this) | fAboutWindow(this) | ||||
{ | { | ||||
setSize(WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight); | |||||
// background | // background | ||||
fImgBackground = Image(WobbleJuiceArtwork::backgroundData, WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight, kImageFormatBGR); | fImgBackground = Image(WobbleJuiceArtwork::backgroundData, WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight, kImageFormatBGR); | ||||
@@ -102,6 +100,9 @@ WobbleJuiceUI::WobbleJuiceUI() | |||||
// set default values | // set default values | ||||
programLoaded(0); | programLoaded(0); | ||||
// automatically-scale | |||||
setGeometryConstraints(WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight, true, true); | |||||
} | } | ||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
@@ -154,7 +155,7 @@ void WobbleJuiceUI::imageButtonClicked(ImageButton* button, int) | |||||
if (button != fButtonAbout) | if (button != fButtonAbout) | ||||
return; | return; | ||||
fAboutWindow.exec(); | |||||
fAboutWindow.runAsModal(); | |||||
} | } | ||||
void WobbleJuiceUI::imageKnobDragStarted(ImageKnob* knob) | void WobbleJuiceUI::imageKnobDragStarted(ImageKnob* knob) | ||||