- int xs10 = xS(10), xs15 = xS(15), xs20 = xS(20);
- int ys10 = yS(10), ys25 = yS(25);
- int x0 = xs10, y0 = ys10;
- int y1 = y0 + ys25;
- int y2 = y1 + ys25;
- BC_Title *title = new BC_Title(x0, y1, _("Scale:"));
- add_tool(title);
- int x1 = x0 + title->get_w() + xs10;
- add_tool(use_scale = new ScaleUseScale(this, client, x1, y1));
- int x2 = x1 + use_scale->get_w() + xs10;
- x_factor = new ScaleXFactor(this, client, x2, y1);
- x_factor->create_objects();
- int x3 = x2 + x_factor->get_w() + xs20;
- y_factor = new ScaleYFactor(this, client, x3, y1);
- y_factor->create_objects();
- add_tool(constrain = new ScaleConstrain(client, x1, y2));
-
-
- add_tool(new BC_Title(x0, y0, _("Size:")));
- add_tool(use_size = new ScaleUseSize(this, client, x1, y0));
- width = new ScaleWidth(this, client, x2, y0);
- width->create_objects();
- int x = x2 + width->get_w() + xS(3);
- add_tool(new BC_Title(x, y0, _("x")));
- height= new ScaleHeight(this, client, x3, y0);
- height->create_objects();
- int x4 = x3 + height->get_w() + xs15;
+ int xs10 = xS(10), xs20 = xS(20), xs200 = xS(200);
+ int ys10 = yS(10), ys20 = yS(20), ys30 = yS(30), ys40 = yS(40);
+ int x2 = xS(60), 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;
+
+
+// Scale section
+ add_subwindow(title_bar = new BC_TitleBar(x, y, get_w()-2*x, xs20, xs10, _("Scale")));
+ y += ys20;
+ add_tool(use_scale = new ScaleUseScale(this, client, x, y));
+ int xa= x*2 + use_scale->get_w();
+ add_tool(new BC_Title(xa, y, _("X:")));
+ x_factor_text = new ScaleXFactorText(this, client, (x + x2), y);
+ x_factor_text->create_objects();
+ x_factor_slider = new ScaleXFactorSlider(this, client, x3, y, xs200);
+ add_subwindow(x_factor_slider);
+ clr_x = x3 + x_factor_slider->get_w() + x;
+ add_subwindow(x_factor_clr = new ScaleClr(this, client, clr_x, y, RESET_X_FACTOR));
+ y += ys30;
+ add_tool(new BC_Title(xa, y, _("Y:")));
+ y_factor_text = new ScaleYFactorText(this, client, (x + x2), y);
+ y_factor_text->create_objects();
+ y_factor_slider = new ScaleYFactorSlider(this, client, x3, y, xs200);
+ add_subwindow(y_factor_slider);
+ add_subwindow(y_factor_clr = new ScaleClr(this, client, clr_x, y, RESET_Y_FACTOR));
+ y += ys30;
+ add_tool(constrain = new ScaleConstrain(this, client, (x + x2), y));
+ y += ys40;
+
+// Size section
+ add_subwindow(title_bar = new BC_TitleBar(x, y, get_w()-2*x, xs20, xs10, _("Size")));
+ y += ys20;
+ add_tool(use_size = new ScaleUseSize(this, client, x, y));
+ add_tool(new BC_Title(xa, y, _("W:")));
+ width_text = new ScaleWidthText(this, client, (x + x2), y);
+ width_text->create_objects();
+ width_slider = new ScaleWidthSlider(this, client, x3, y, xs200);
+ add_subwindow(width_slider);
+ add_subwindow(width_clr = new ScaleClr(this, client, clr_x, y, RESET_WIDTH));
+ int ya = y;
+ y += ys30;
+ add_tool(new BC_Title(xa, y, _("H:")));
+ height_text = new ScaleHeightText(this, client, (x + x2), y);
+ height_text->create_objects();
+ height_slider = new ScaleHeightSlider(this, client, x3, y, xs200);
+ add_subwindow(height_slider);
+ add_subwindow(height_clr = new ScaleClr(this, client, clr_x, y, RESET_HEIGHT));
+
+ int x4 = x + x2 + height_text->get_w();