X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fyuv%2Fyuv.C;h=6e6bd86f30c03bb4abb2e62b294b56fcdfe2095b;hb=ae9b00c3f960e5bd9f74a9d9103e332f4c288ab4;hp=845ca48aabb7d171340e9310c2479b1e31a45fe3;hpb=c905fabd0678fcc8ab9e32e4443ad8709adafefd;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/yuv/yuv.C b/cinelerra-5.1/plugins/yuv/yuv.C index 845ca48a..6e6bd86f 100644 --- a/cinelerra-5.1/plugins/yuv/yuv.C +++ b/cinelerra-5.1/plugins/yuv/yuv.C @@ -27,6 +27,7 @@ #include "language.h" #include "bccolors.h" #include "pluginvclient.h" +#include "theme.h" #include "vframe.h" #include @@ -79,7 +80,7 @@ public: YUVWindow *window; }; -class YUVSliderClr : public BC_GenericButton +class YUVSliderClr : public BC_Button { public: YUVSliderClr(YUVEffect *plugin, YUVWindow *window, int x, int y, int w, int clear); @@ -189,8 +190,8 @@ YUVLevel::YUVLevel(YUVEffect *plugin, float *output, int x, int y) : BC_FSlider(x, y, 0, - 200, - 200, + xS(200), + yS(200), -MAXVALUE, MAXVALUE, *output) @@ -226,7 +227,7 @@ int YUVReset::handle_event() YUVSliderClr::YUVSliderClr(YUVEffect *plugin, YUVWindow *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; @@ -248,32 +249,34 @@ int YUVSliderClr::handle_event() YUVWindow::YUVWindow(YUVEffect *plugin) - : PluginClientWindow(plugin, 310, 135, 310, 135, 0) + : PluginClientWindow(plugin, xS(310), yS(135), xS(310), yS(135), 0) { this->plugin = plugin; } void YUVWindow::create_objects() { - int x = 10, y = 10, x1 = 40; - int x2 = 0; int clrBtn_w = 50; + int xs10 = xS(10), xs40 = xS(40), xs50 = xS(50); + int ys10 = yS(10), ys30 = yS(30), ys35 = yS(35); + int x = xs10, y = ys10, x1 = xs40; + int x2 = 0; int clrBtn_w = xs50; add_subwindow(new BC_Title(x, y, _("Y:"))); add_subwindow(this->y = new YUVLevel(plugin, &plugin->config.y, x1, y)); - x2 = x1 + this->y->get_w() + 10; + x2 = x1 + this->y->get_w() + xs10; add_subwindow(yClr = new YUVSliderClr(plugin, this, x2, y, clrBtn_w, RESET_Y_SLIDER)); - y += 30; + y += ys30; add_subwindow(new BC_Title(x, y, _("U:"))); add_subwindow(u = new YUVLevel(plugin, &plugin->config.u, x1, y)); add_subwindow(uClr = new YUVSliderClr(plugin, this, x2, y, clrBtn_w, RESET_U_SLIDER)); - y += 30; + y += ys30; add_subwindow(new BC_Title(x, y, _("V:"))); add_subwindow(v = new YUVLevel(plugin, &plugin->config.v, x1, y)); add_subwindow(vClr = new YUVSliderClr(plugin, this, x2, y, clrBtn_w, RESET_V_SLIDER)); - y += 35; + y += ys35; add_subwindow(reset = new YUVReset(plugin, this, x, y)); show_window();