summaryrefslogtreecommitdiff
path: root/libs/widgets
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-02-17 16:46:04 -0600
committerBen Loftis <ben@harrisonconsoles.com>2018-02-17 16:46:04 -0600
commit4c7ad5db4dd3774bdf4acfed4a03c70891f9aa20 (patch)
treef4580dc7777a3bcfe17fd1e31e9c25681894a57d /libs/widgets
parentfcb822c45c06d94eff9d72ce399788080b3dad3a (diff)
Fix long-standing bug in spacer expose+render.
Diffstat (limited to 'libs/widgets')
-rw-r--r--libs/widgets/widgets/ardour_spacer.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/widgets/widgets/ardour_spacer.h b/libs/widgets/widgets/ardour_spacer.h
index 520ad670af..b2668f19d7 100644
--- a/libs/widgets/widgets/ardour_spacer.h
+++ b/libs/widgets/widgets/ardour_spacer.h
@@ -31,9 +31,12 @@ public:
ArdourVSpacer (float r = 0.75f);
protected:
- void render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t* r) {
- float h = r->height * ratio;
- float t = .5f * (r->height - h);
+ void render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t*) {
+
+ float height = get_height();
+
+ float h = height * ratio;
+ float t = .5f * (height - h);
ctx->rectangle (0, t, 1, h);
ctx->set_source_rgb (0, 0, 0);
ctx->fill ();