summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_button.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-09-04 18:12:46 +0200
committerRobin Gareus <robin@gareus.org>2014-09-04 18:12:46 +0200
commitd717a0680ac71b46e0dce0f3497ff58f6b7cbe8c (patch)
treef03fb5a584acc44024887a53ff6a183731f32d2c /gtk2_ardour/ardour_button.cc
parent795451a697c82e8537eb710b659375777aa4c831 (diff)
properly centered text..
..at the risk of blurring some text with some fonts when the text is shifted by 0.5px.
Diffstat (limited to 'gtk2_ardour/ardour_button.cc')
-rw-r--r--gtk2_ardour/ardour_button.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc
index eab462f902..3d5ab4c994 100644
--- a/gtk2_ardour/ardour_button.cc
+++ b/gtk2_ardour/ardour_button.cc
@@ -400,9 +400,9 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
* TODO this should be generalized incl rotation.
* currently only 'user' of this API is meter_strip.cc
*/
- if (_xalign < 0) xa = .5 + (ww * fabs(_xalign) + text_margin);
+ if (_xalign < 0) xa = ceil(.5 + (ww * fabs(_xalign) + text_margin));
- cairo_move_to (cr, rint(xa), rint(ya));
+ cairo_move_to (cr, xa, ya);
pango_cairo_update_layout(cr, _layout->gobj());
pango_cairo_show_layout (cr, _layout->gobj());
cairo_restore (cr);