- int x = 10, y = 10;
- int x1 = 0; int clrBtn_w = 50;
- int defaultBtn_w = 100;
-
- add_subwindow(new BC_Title(x, y, _("Radius")));
- y += 20;
- add_subwindow(radius = new WhirlRadius(plugin, x, y));
- x1 = x + radius->get_w() + 10;
- add_subwindow(radiusClr = new WhirlSliderClr(plugin, this, x1, y, clrBtn_w, RESET_RADIUS));
-
- y += 30;
- add_subwindow(new BC_Title(x, y, _("Pinch")));
- y += 20;
- add_subwindow(pinch = new WhirlPinch(plugin, x, y));
- add_subwindow(pinchClr = new WhirlSliderClr(plugin, this, x1, y, clrBtn_w, RESET_PINCH));
-
- y += 30;
- add_subwindow(new BC_Title(x, y, _("Angle")));
- y += 20;
- add_subwindow(angle = new WhirlAngle(plugin, x, y));
- add_subwindow(angleClr = new WhirlSliderClr(plugin, this, x1, y, clrBtn_w, RESET_ANGLE));
-
- y += 35;
+ int xs10 = xS(10), xs100 = xS(100);
+ int ys10 = yS(10), ys30 = yS(30), ys40 = yS(40);
+ int x = xs10, y = ys10;
+ int x2 = xS(80), x3 = xS(180);
+ int clr_x = get_w()-x - xS(22); // note: clrBtn_w = 22
+ int defaultBtn_w = xs100;
+
+ BC_Bar *bar;
+
+ y += ys10;
+ add_subwindow(new BC_Title(x, y, _("Radius:")));
+ radius_text = new WhirlFText(this, plugin,
+ 0, &plugin->config.radius, (x + x2), y, RADIUS_MIN, RADIUS_MAX);
+ radius_text->create_objects();
+ radius_slider = new WhirlFSlider(plugin,
+ radius_text, &plugin->config.radius, x3, y, RADIUS_MIN, RADIUS_MAX);
+ add_subwindow(radius_slider);
+ radius_text->slider = radius_slider;
+ clr_x = x3 + radius_slider->get_w() + x;
+ add_subwindow(radius_Clr = new WhirlClr(plugin, this, clr_x, y, RESET_RADIUS));
+ y += ys30;
+
+ add_subwindow(new BC_Title(x, y, _("Pinch:")));
+ pinch_text = new WhirlFText(this, plugin,
+ 0, &plugin->config.pinch, (x + x2), y, PINCH_MIN, PINCH_MAX);
+ pinch_text->create_objects();
+ pinch_slider = new WhirlFSlider(plugin,
+ pinch_text, &plugin->config.pinch, x3, y, PINCH_MIN, PINCH_MAX);
+ add_subwindow(pinch_slider);
+ pinch_text->slider = pinch_slider;
+ add_subwindow(pinch_Clr = new WhirlClr(plugin, this, clr_x, y, RESET_PINCH));
+ y += ys30;
+
+ add_subwindow(new BC_Title(x, y, _("Angle:")));
+ angle_text = new WhirlFText(this, plugin,
+ 0, &plugin->config.angle, (x + x2), y, ANGLE_MIN, ANGLE_MAX);
+ angle_text->create_objects();
+ angle_slider = new WhirlFSlider(plugin,
+ angle_text, &plugin->config.angle, x3, y, ANGLE_MIN, ANGLE_MAX);
+ add_subwindow(angle_slider);
+ angle_text->slider = angle_slider;
+ add_subwindow(angle_Clr = new WhirlClr(plugin, this, clr_x, y, RESET_ANGLE));
+ y += ys40;
+
+// Reset section
+ add_subwindow(bar = new BC_Bar(x, y, get_w()-2*x));
+ y += ys10;