diff options
author | Robin Gareus <robin@gareus.org> | 2015-04-22 21:34:27 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-04-22 21:40:43 +0200 |
commit | b38ab89d92a5f963c90da885409da541ad081a65 (patch) | |
tree | b29a21e7a8121f1e37c70d95ad71484d590ed43d /gtk2_ardour/mono_panner.cc | |
parent | 8d85afd29420a98148ac994f8dcb4e5412b7c2e2 (diff) |
clean up GUI scaling
Diffstat (limited to 'gtk2_ardour/mono_panner.cc')
-rw-r--r-- | gtk2_ardour/mono_panner.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gtk2_ardour/mono_panner.cc b/gtk2_ardour/mono_panner.cc index 43bdc9f711..fd789ed035 100644 --- a/gtk2_ardour/mono_panner.cc +++ b/gtk2_ardour/mono_panner.cc @@ -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 (); |