diff options
author | Robin Gareus <robin@gareus.org> | 2014-09-04 15:06:42 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-09-04 15:06:42 +0200 |
commit | dc4ee8196f3cd5c310307152e0ff479e65a808fa (patch) | |
tree | e84a3a1782483856cbc88484d50ccda863a18af6 | |
parent | 1f20be1571c9207f2583c0728178cd8c8041ef66 (diff) |
fix LED active area
-rw-r--r-- | gtk2_ardour/ardour_button.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index 3042796acc..eab462f902 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -890,15 +890,14 @@ ArdourButton::setup_led_rect () _led_rect = new cairo_rectangle_t; if (_elements & Text) { - int led_xoff = ceil(char_pixel_width() + _diameter * .5); if (_led_left) { - _led_rect->x = led_xoff; + _led_rect->x = char_pixel_width(); } else { - _led_rect->x = get_width() - led_xoff; + _led_rect->x = get_width() - char_pixel_width() + _diameter; } } else { /* centered */ - _led_rect->x = .5 * (get_width() - _diameter); + _led_rect->x = .5 * get_width() - _diameter; } _led_rect->y = .5 * (get_height() - _diameter); |