- int x = 10, y = 10;
- BC_Title *title;
-
-
-
- add_tool(new BC_Title(x, y, _("Rotate")));
- x += 50;
- y += 20;
- add_tool(toggle0 = new RotateToggle(this,
- plugin,
- plugin->config.angle == 0,
- x,
- y,
- 0,
- "0"));
- x += RADIUS;
- y += RADIUS;
- add_tool(toggle90 = new RotateToggle(this,
- plugin,
- plugin->config.angle == 90,
- x,
- y,
- 90,
- "90"));
- x -= RADIUS;
- y += RADIUS;
- add_tool(toggle180 = new RotateToggle(this,
- plugin,
- plugin->config.angle == 180,
- x,
- y,
- 180,
- "180"));
- x -= RADIUS;
- y -= RADIUS;
- add_tool(toggle270 = new RotateToggle(this,
- plugin,
- plugin->config.angle == 270,
- x,
- y,
- 270,
- "270"));
-// add_subwindow(bilinear = new RotateInterpolate(plugin, 10, y + 60));
- x += 120;
- y -= 50;
- add_tool(fine = new RotateFine(this, plugin, x, y));
- y += fine->get_h() + 10;
- add_tool(text = new RotateText(this, plugin, x, y));
- y += 25;
- add_tool(new BC_Title(x, y, _("Degrees")));
-
-
-
-
-
- y += text->get_h() + 10;
- add_subwindow(title = new BC_Title(x, y, _("Pivot (x,y):")));
- y += title->get_h() + 10;
- add_subwindow(this->x = new RotateX(this, plugin, x, y));
- x += this->x->get_w() + 10;
- add_subwindow(this->y = new RotateY(this, plugin, x, y));
-
-// y += this->y->get_h() + 10;
- x = 10;
+ int xs10 = xS(10), xs20 = xS(20), xs64 = xS(64), xs200 = xS(200);
+ int ys10 = yS(10), ys20 = yS(20), ys30 = yS(30), ys40 = yS(40);
+ int x2 = xS(80), x3 = xS(180);
+ int x = xs10, y = ys10;
+ int clr_x = get_w()-x - xS(22); // note: clrBtn_w = 22
+
+ BC_TitleBar *title_bar;
+ BC_Bar *bar;
+
+// Angle section
+ add_subwindow(title_bar = new BC_TitleBar(x, y, get_w()-2*x, xs20, xs10, _("Rotation")));
+ x = xs10; y += ys20;
+ add_tool(new BC_Title(x, y, _("Preset:")));
+ x = x + x2;
+ add_tool(toggle180neg = new RotateToggle(this, plugin,
+ plugin->config.angle == -180, x, y, -180, "-180°"));
+ x += xs64;
+ add_tool(toggle90neg = new RotateToggle(this, plugin,
+ plugin->config.angle == -90, x, y, -90, "-90°"));
+ x += xs64;
+ add_tool(toggle0 = new RotateToggle(this, plugin,
+ plugin->config.angle == 0, x, y, 0, "0°"));
+ x += xs64;
+ add_tool(toggle90 = new RotateToggle(this, plugin,
+ plugin->config.angle == 90, x, y, 90, "+90°"));
+ x += xs64;
+ add_tool(toggle180 = new RotateToggle(this, plugin,
+ plugin->config.angle == 180, x, y, 180, "+180°"));
+// add_subwindow(bilinear = new RotateInterpolate(plugin, xs10, y + ys60));
+ x = xs10; y += ys30;
+ add_tool(new BC_Title(x, y, _("Angle:")));
+ rotate_angle_text = new RotateAngleText(this, plugin, (x + x2), y);
+ rotate_angle_text->create_objects();
+ add_tool(rotate_angle_slider = new RotateAngleSlider(this, plugin, x3, y, xs200));
+ add_tool(rotate_angle_clr = new RotateClr(this, plugin,
+ clr_x, y, RESET_ANGLE));
+ y += ys40;
+
+// Pivot section
+ add_subwindow(title_bar = new BC_TitleBar(x, y, get_w()-2*x, xs20, xs10, _("Pivot")));
+ y += ys20;