diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-04-20 18:14:00 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-04-20 18:14:00 +0000 |
commit | 17b18acda3447214bd739107d9a46eecfaa6ef70 (patch) | |
tree | 695aa15c29117e101a0246ece8bbf25803b2cd67 /gtk2_ardour/gain_meter.cc | |
parent | d7e728476a18bc024ae18705aa9d32ea21a1c4af (diff) |
a) use ink extents in most places where we used to use logical extents
for text sizing
b) add back scroll-wheel functionality to plugin parameter controls
git-svn-id: svn://localhost/trunk/ardour2@460 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/gain_meter.cc')
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 55ffac2063..237e0787ea 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -230,8 +230,6 @@ GainMeter::render_metrics (Gtk::Widget& w) gint x, y, width, height, depth; int db_points[] = { -50, -40, -20, -30, -10, -3, 0, 4 }; char buf[32]; - int theight; - int twidth; win->get_geometry (x, y, width, height, depth); @@ -251,10 +249,14 @@ GainMeter::render_metrics (Gtk::Widget& w) snprintf (buf, sizeof (buf), "%d", abs (db_points[i])); layout->set_text (buf); - layout->get_pixel_size (twidth, theight); + + /* we want logical extents, not ink extents here */ + + int width, height; + layout->get_pixel_size (width, height); pixmap->draw_line (fg_gc, 0, pos, 4, pos); - pixmap->draw_layout (fg_gc, 6, pos - (theight/2), layout); + pixmap->draw_layout (fg_gc, 6, pos - (height/2), layout); } return pixmap; |