summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-10 22:29:26 +0000
committerDavid Robillard <d@drobilla.net>2008-01-10 22:29:26 +0000
commit821e4763fdf4c0b669f45a71093b30ebe87202e6 (patch)
tree68c08b81147668b32601390d9293cc632fe04c97 /libs
parent8a2e30816ee392b871c5918f769f68cc0196a893 (diff)
Merge with 2.0-ongoing R2885.
git-svn-id: svn://localhost/ardour2/trunk@2886 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/gtkmm2ext/fastmeter.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/gtkmm2ext/fastmeter.cc b/libs/gtkmm2ext/fastmeter.cc
index 5c76c98e12..60fb35b969 100644
--- a/libs/gtkmm2ext/fastmeter.cc
+++ b/libs/gtkmm2ext/fastmeter.cc
@@ -351,7 +351,12 @@ FastMeter::vertical_expose (GdkEventExpose* ev)
GdkRectangle background;
top_of_meter = (gint) floor (pixheight * current_level);
+
+ /* reset the height & origin of the rect that needs to show the pixbuf
+ */
+
pixrect.height = top_of_meter;
+ pixrect.y = pixheight - top_of_meter;
background.x = 0;
background.y = 0;
@@ -363,12 +368,12 @@ FastMeter::vertical_expose (GdkEventExpose* ev)
intersection.x, intersection.y,
intersection.width, intersection.height);
}
-
+
if (gdk_rectangle_intersect (&pixrect, &ev->area, &intersection)) {
// draw the part of the meter image that we need. the area we draw is bounded "in reverse" (top->bottom)
get_window()->draw_pixbuf(get_style()->get_fg_gc(get_state()), pixbuf,
- intersection.x, pixheight - top_of_meter,
- intersection.x, pixheight - top_of_meter,
+ intersection.x, intersection.y,
+ intersection.x, intersection.y,
intersection.width, intersection.height,
Gdk::RGB_DITHER_NONE, 0, 0);
}