diff --git a/dpf b/dpf index 8e747ec..d49366d 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 8e747ec0d573d66396a4f81dbc7a167964494e07 +Subproject commit d49366db694fb9097210ba9665449f6a67025285 diff --git a/examples/demo-multi.cpp b/examples/demo-multi.cpp index 156b8c3..b2d2782 100644 --- a/examples/demo-multi.cpp +++ b/examples/demo-multi.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2018 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this diff --git a/examples/demo.cpp b/examples/demo.cpp index a3e861b..cc24c8c 100644 --- a/examples/demo.cpp +++ b/examples/demo.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2018 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -319,6 +319,8 @@ class DemoWindow : public Window, public LeftSideWidget::Callback { public: + static const int kSidebarWidth = 81; + DemoWindow(Application& app) : Window(app), wColor(*this), @@ -338,11 +340,11 @@ public: wText.hide(); //wPerf.hide(); - wColor.setAbsoluteX(81); - wImages.setAbsoluteX(81); - wRects.setAbsoluteX(81); - wShapes.setAbsoluteX(81); - wText.setAbsoluteX(81); + wColor.setAbsoluteX(kSidebarWidth); + wImages.setAbsoluteX(kSidebarWidth); + wRects.setAbsoluteX(kSidebarWidth); + wShapes.setAbsoluteX(kSidebarWidth); + wText.setAbsoluteX(kSidebarWidth); wLeft.setAbsolutePos(2, 2); wPerf.setAbsoluteY(5); @@ -354,14 +356,17 @@ public: void onReshape(uint width, uint height) override { - Size size(width-81, height); + if (width < kSidebarWidth) + return; + + Size size(width-kSidebarWidth, height); wColor.setSize(size); wImages.setSize(size); wRects.setSize(size); wShapes.setSize(size); wText.setSize(size); - wLeft.setSize(81-4, height-4); + wLeft.setSize(kSidebarWidth-4, height-4); //wRezHandle.setAbsoluteX(width-wRezHandle.getWidth()); //wRezHandle.setAbsoluteY(height-wRezHandle.getHeight()); diff --git a/examples/nanovg.cpp b/examples/nanovg.cpp index cf9f7f3..3563eef 100644 --- a/examples/nanovg.cpp +++ b/examples/nanovg.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2018 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -145,7 +145,7 @@ public: } protected: - void onReshape(int width, int height) + void onReshape(uint width, uint height) override { fDemo.setSize(width, height); //fDemo.setAbsolutePos(10, height-fDemo.getHeight()-50); diff --git a/examples/nanovg2.cpp b/examples/nanovg2.cpp index 87c3b67..fd2c59c 100644 --- a/examples/nanovg2.cpp +++ b/examples/nanovg2.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2018 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -202,7 +202,7 @@ public: } protected: - void onReshape(int width, int height) + void onReshape(uint width, uint height) override { fDemo.setSize(width, height); diff --git a/examples/nanovg_res/demo.c b/examples/nanovg_res/demo.c index 8664347..ffbfb1d 100644 --- a/examples/nanovg_res/demo.c +++ b/examples/nanovg_res/demo.c @@ -807,7 +807,7 @@ int loadDemoData(NVGcontext* vg, DemoData* data) for (i = 0; i < 12; i++) { char file[128]; - snprintf(file, 128, "../example/images/image%d.jpg", i+1); + snprintf(file, 128, "./nanovg_res/images/image%d.jpg", i+1); data->images[i] = nvgCreateImage(vg, file, 0); if (data->images[i] == 0) { printf("Could not load %s.\n", file); @@ -815,17 +815,17 @@ int loadDemoData(NVGcontext* vg, DemoData* data) } } - data->fontIcons = nvgCreateFont(vg, "icons", "../example/entypo.ttf"); + data->fontIcons = nvgCreateFont(vg, "icons", "./nanovg_res/entypo.ttf"); if (data->fontIcons == -1) { printf("Could not add font icons.\n"); return -1; } - data->fontNormal = nvgCreateFont(vg, "sans", "../example/Roboto-Regular.ttf"); + data->fontNormal = nvgCreateFont(vg, "sans", "./nanovg_res/Roboto-Regular.ttf"); if (data->fontNormal == -1) { printf("Could not add font italic.\n"); return -1; } - data->fontBold = nvgCreateFont(vg, "sans-bold", "../example/Roboto-Bold.ttf"); + data->fontBold = nvgCreateFont(vg, "sans-bold", "./nanovg_res/Roboto-Bold.ttf"); if (data->fontBold == -1) { printf("Could not add font bold.\n"); return -1;