X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fwhirl%2Fwhirl.C;h=ac598991d75abeb9d93fc8aaff8a1466a60deae0;hb=eabda9cf447580a974fd3d67a3d0a26f09aeb523;hp=ff8eb44cda9f89f6d1cc4ddaaf78f4c7720cb21c;hpb=c905fabd0678fcc8ab9e32e4443ad8709adafefd;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/whirl/whirl.C b/cinelerra-5.1/plugins/whirl/whirl.C index ff8eb44c..ac598991 100644 --- a/cinelerra-5.1/plugins/whirl/whirl.C +++ b/cinelerra-5.1/plugins/whirl/whirl.C @@ -28,6 +28,7 @@ #include "language.h" #include "loadbalance.h" #include "pluginvclient.h" +#include "theme.h" #include "vframe.h" @@ -121,7 +122,7 @@ public: WhirlWindow *window; }; -class WhirlSliderClr : public BC_GenericButton +class WhirlSliderClr : public BC_Button { public: WhirlSliderClr(WhirlEffect *plugin, WhirlWindow *window, int x, int y, int w, int clear); @@ -288,7 +289,7 @@ void WhirlConfig::interpolate(WhirlConfig &prev, WhirlWindow::WhirlWindow(WhirlEffect *plugin) - : PluginClientWindow(plugin, 280, 195, 280, 195, 0) + : PluginClientWindow(plugin, xS(280), yS(195), xS(280), yS(195), 0) { this->plugin = plugin; } @@ -297,33 +298,34 @@ WhirlWindow::WhirlWindow(WhirlEffect *plugin) void WhirlWindow::create_objects() { - int x = 10, y = 10; - int x1 = 0; int clrBtn_w = 50; - int defaultBtn_w = 100; + int xs10 = xS(10), xs50 = xS(50), xs100 = xS(100); + int ys10 = yS(10), ys20 = yS(20), ys30 = yS(30), ys35 = yS(35); + int x = xs10, y = ys10; + int x1 = 0; int clrBtn_w = xs50; + int defaultBtn_w = xs100; add_subwindow(new BC_Title(x, y, _("Radius"))); - y += 20; + y += ys20; add_subwindow(radius = new WhirlRadius(plugin, x, y)); - x1 = x + radius->get_w() + 10; + x1 = x + radius->get_w() + xs10; add_subwindow(radiusClr = new WhirlSliderClr(plugin, this, x1, y, clrBtn_w, RESET_RADIUS)); - y += 30; + y += ys30; add_subwindow(new BC_Title(x, y, _("Pinch"))); - y += 20; + y += ys20; add_subwindow(pinch = new WhirlPinch(plugin, x, y)); add_subwindow(pinchClr = new WhirlSliderClr(plugin, this, x1, y, clrBtn_w, RESET_PINCH)); - y += 30; + y += ys30; add_subwindow(new BC_Title(x, y, _("Angle"))); - y += 20; + y += ys20; add_subwindow(angle = new WhirlAngle(plugin, x, y)); add_subwindow(angleClr = new WhirlSliderClr(plugin, this, x1, y, clrBtn_w, RESET_ANGLE)); - y += 35; + y += ys35; add_subwindow(reset = new WhirlReset(plugin, this, x, y)); add_subwindow(default_settings = new WhirlDefaultSettings(plugin, this, - (280 - 10 - defaultBtn_w), y, defaultBtn_w)); - + (xS(280) - xs10 - defaultBtn_w), y, defaultBtn_w)); show_window(); flush(); } @@ -363,8 +365,8 @@ WhirlAngle::WhirlAngle(WhirlEffect *plugin, int x, int y) : BC_FSlider(x, y, 0, - 200, - 200, + xS(200), + yS(200), (float)0, (float)360, plugin->config.angle) @@ -385,8 +387,8 @@ WhirlPinch::WhirlPinch(WhirlEffect *plugin, int x, int y) : BC_FSlider(x, y, 0, - 200, - 200, + xS(200), + yS(200), (float)0, (float)MAXPINCH, plugin->config.pinch) @@ -407,8 +409,8 @@ WhirlRadius::WhirlRadius(WhirlEffect *plugin, int x, int y) : BC_FSlider(x, y, 0, - 200, - 200, + xS(200), + yS(200), (float)0, (float)MAXRADIUS, plugin->config.radius) @@ -459,7 +461,7 @@ int WhirlDefaultSettings::handle_event() } WhirlSliderClr::WhirlSliderClr(WhirlEffect *plugin, WhirlWindow *window, int x, int y, int w, int clear) - : BC_GenericButton(x, y, w, _("⌂")) + : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button")) { this->plugin = plugin; this->window = window; @@ -879,8 +881,8 @@ void WhirlUnit::process_package(LoadPackage *package) double pinch = plugin->config.pinch / MAXPINCH; double cx, cy; int ix, iy; - double cen_x = (double)(w - 1) / 2.0; - double cen_y = (double)(h - 1) / 2.0; + double cen_x = (double)(w-1) / 2.0; + double cen_y = (double)(h-1) / 2.0; double radius = MAX(w, h); double radius3 = plugin->config.radius / MAXRADIUS; double radius2 = radius * radius * radius3;