clean up GUI scaling
[ardour.git] / gtk2_ardour / mono_panner.cc
index 43bdc9f711afdee837be21be1846bed3bfa406f0..fd789ed0357d6175e0d3b5c691994de1657a7c05 100644 (file)
@@ -135,12 +135,11 @@ MonoPanner::on_expose_event (GdkEventExpose*)
        width = get_width();
        height = get_height ();
 
-       const double scale = ARDOUR_UI::config()->get_font_scale() / 102400.;
        const int step_down = rint(height / 3.5);
        const int lr_box_size = height - 2 * step_down;
        const int pos_box_size = (int)(rint(step_down * .8)) | 1;
        const int top_step = step_down - pos_box_size;
-       const double corner_radius = 5 * scale;
+       const double corner_radius = 5 * ARDOUR_UI::ui_scale;
 
        o = colors.outline;
        f = colors.fill;
@@ -255,8 +254,8 @@ MonoPanner::on_expose_event (GdkEventExpose*)
        context->set_line_width (2.0);
        context->move_to (spos + (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 * scale); /* bottom point */
-       context->rel_line_to (-pos_box_size/2.0, -4.0 * scale); /* lower left */
+       context->rel_line_to (-pos_box_size/2.0, 4.0 * ARDOUR_UI::ui_scale); /* bottom point */
+       context->rel_line_to (-pos_box_size/2.0, -4.0 * ARDOUR_UI::ui_scale); /* lower left */
        context->rel_line_to (0.0, -pos_box_size); /* upper left */
        context->close_path ();
 
@@ -268,7 +267,7 @@ MonoPanner::on_expose_event (GdkEventExpose*)
 
        /* marker line */
        context->set_line_width (1.0);
-       context->move_to (spos, 1 + top_step + pos_box_size + 4.0 * scale);
+       context->move_to (spos, 1 + top_step + pos_box_size + 4.0 * ARDOUR_UI::ui_scale);
        context->line_to (spos, half_lr_box + step_down + lr_box_size - 1);
        context->set_source_rgba (UINT_RGBA_R_FLT(po), UINT_RGBA_G_FLT(po), UINT_RGBA_B_FLT(po), UINT_RGBA_A_FLT(po));
        context->stroke ();