summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-05-06 13:42:39 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:18:10 -0400
commit8c41a412c1d74f256d8fe19feb3e5323c177ca79 (patch)
tree69850ed4f18ded5cb4b1c053c952058cd09f1e49 /libs/gtkmm2ext
parente1bd9401d562732c0d89c401515d08208afab48c (diff)
fix up waves_fastmeter.cc code to work with current fastmeter API
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r--libs/gtkmm2ext/waves_fastmeter.cc37
1 files changed, 6 insertions, 31 deletions
diff --git a/libs/gtkmm2ext/waves_fastmeter.cc b/libs/gtkmm2ext/waves_fastmeter.cc
index 680fca2833..fa8cba9f7b 100644
--- a/libs/gtkmm2ext/waves_fastmeter.cc
+++ b/libs/gtkmm2ext/waves_fastmeter.cc
@@ -111,13 +111,13 @@ FastMeter::FastMeter (long hold, unsigned long dimen, Orientation o, int len,
pixheight = len;
pixwidth = dimen;
fgpattern = request_vertical_meter(pixwidth, pixheight, _clr, _stp, _styleflags);
- bgpattern = request_vertical_background (pixwidth, pixheight, _bgc);
+ bgpattern = request_vertical_background (pixwidth, pixheight, _bgc, false);
} else {
pixheight = dimen;
pixwidth = len;
fgpattern = request_horizontal_meter(pixwidth, pixheight, _clr, _stp, _styleflags);
- bgpattern = request_horizontal_background (pixwidth, pixheight, _bgc);
+ bgpattern = request_horizontal_background (pixwidth, pixheight, _bgc, false);
}
pixrect.width = pixwidth;
@@ -522,7 +522,7 @@ FastMeter::vertical_size_allocate (Gtk::Allocation &alloc)
if (pixheight != h) {
fgpattern = request_vertical_meter (request_width, h, _clr, _stp, _styleflags);
- bgpattern = request_vertical_background (request_width, h, highlight ? _bgh : _bgc);
+ bgpattern = request_vertical_background (request_width, h, highlight ? _bgh : _bgc, false);
pixheight = h;
pixwidth = request_width;
}
@@ -547,7 +547,7 @@ FastMeter::horizontal_size_allocate (Gtk::Allocation &alloc)
if (pixwidth != w) {
fgpattern = request_horizontal_meter (w, request_height, _clr, _stp, _styleflags);
- bgpattern = request_horizontal_background (w, request_height, highlight ? _bgh : _bgc);
+ bgpattern = request_horizontal_background (w, request_height, highlight ? _bgh : _bgc, false);
pixwidth = w;
pixheight = request_height;
}
@@ -650,9 +650,6 @@ void
FastMeter::horizontal_expose (cairo_t* cr, cairo_rectangle_t* area)
{
gint right_of_meter;
- GdkRectangle intersection;
- GdkRectangle background;
- GdkRectangle eventarea;
//cairo_set_source_rgb (cr, 0, 0, 0); // black
//rounded_rectangle (cr, 0, 0, pixwidth + 2, pixheight + 2, 2);
@@ -665,28 +662,6 @@ FastMeter::horizontal_expose (cairo_t* cr, cairo_rectangle_t* area)
pixrect.width = right_of_meter;
- background.x = 1 + right_of_meter;
- background.y = 1;
- background.width = pixwidth - right_of_meter;
- background.height = pixheight;
-
- eventarea.x = area->x;
- eventarea.y = area->y;
- eventarea.width = area->width;
- eventarea.height = area->height;
-
- // if (gdk_rectangle_intersect (&background, &eventarea, &intersection)) {
- // cairo_set_source (cr, bgpattern->cobj());
- // cairo_rectangle (cr, intersection.x, intersection.y, intersection.width, intersection.height);
- // cairo_fill (cr);
- // }
-
- // if (gdk_rectangle_intersect (&pixrect, &eventarea, &intersection)) {
- // cairo_set_source (cr, fgpattern->cobj());
- // cairo_rectangle (cr, intersection.x, intersection.y, intersection.width, intersection.height);
- // cairo_fill (cr);
- // }
-
// draw peak bar
if (hold_state) {
@@ -918,9 +893,9 @@ FastMeter::set_highlight (bool onoff)
}
highlight = onoff;
if (orientation == Vertical) {
- bgpattern = request_vertical_background (pixwidth + 2, pixheight + 2, highlight ? _bgh : _bgc);
+ bgpattern = request_vertical_background (pixwidth + 2, pixheight + 2, highlight ? _bgh : _bgc, false);
} else {
- bgpattern = request_horizontal_background (pixwidth + 2, pixheight + 2, highlight ? _bgh : _bgc);
+ bgpattern = request_horizontal_background (pixwidth + 2, pixheight + 2, highlight ? _bgh : _bgc, false);
}
queue_draw ();
}