using namespace Gtk;
using namespace Gtkmm2ext;
-static const int pos_box_size = 9;
+static const int pos_box_size = 8;
static const int lr_box_size = 15;
static const int step_down = 10;
static const int top_step = 2;
double pos = position_control->get_value (); /* 0..1 */
double swidth = width_control->get_value (); /* -1..+1 */
double fswidth = fabs (swidth);
- uint32_t o, f, t, b;
+ uint32_t o, f, t, b, r;
State state;
const double corner_radius = 5.0;
f = colors[state].fill;
t = colors[state].text;
b = colors[state].background;
+ r = colors[state].rule;
/* background */
left = center - pan_spread; // center of left box
right = center + pan_spread; // center of right box
+ /* center line */
+
+ context->set_line_width (1.0);
+ context->move_to ((usable_width + lr_box_size)/2.0, 0);
+ context->rel_line_to (0, height);
+ context->set_source_rgba (UINT_RGBA_R_FLT(r), UINT_RGBA_G_FLT(r), UINT_RGBA_B_FLT(r), UINT_RGBA_A_FLT(r));
+ context->stroke ();
+
/* compute & draw the line through the box */
context->set_line_width (2);
/* draw the central box */
- double spos = (pos_box_size/2.0) + (usable_width * pos);
-
context->set_line_width (2.0);
- context->move_to (spos + (pos_box_size/2.0), top_step); /* top right */
+ context->move_to (center + (pos_box_size/2.0), top_step); /* top right */
context->rel_line_to (0.0, pos_box_size); /* lower right */
context->rel_line_to (-pos_box_size/2.0, 4.0); /* bottom point */
context->rel_line_to (-pos_box_size/2.0, -4.0); /* lower left */