summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-02-16 08:34:32 -0600
committerBen Loftis <ben@harrisonconsoles.com>2018-02-17 09:23:48 -0600
commited459ab70a4bbfbb771bb87fa26273a9c449199e (patch)
tree36417bfe949e1df92c00b2182dc596ff1cbf0738 /gtk2_ardour
parent33bee4128841ef5d3fb04a42d7c9623beb126e9c (diff)
Reverse the drawing of DSP indicator to match other displays.
(note: this gets reverted in 76b7d1)
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour_gauge.cc4
-rw-r--r--gtk2_ardour/dsp_load_indicator.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/ardour_gauge.cc b/gtk2_ardour/ardour_gauge.cc
index 80249ac3c8..7387b86b38 100644
--- a/gtk2_ardour/ardour_gauge.cc
+++ b/gtk2_ardour/ardour_gauge.cc
@@ -43,7 +43,7 @@ ArdourGauge::on_size_request (Gtk::Requisition* req)
int w, h;
_layout->get_pixel_size (w, h);
- req->width = std::max (req->width, 50 /*std::max (20, w + PADDING) */);
+ req->width = std::max (req->width, 80 /*std::max (20, w + PADDING) */);
req->height = std::max (req->height, std::max (12, h + PADDING));
}
@@ -99,7 +99,7 @@ ArdourGauge::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t
const float lvl = level ();
int bw = (width - PADDING - PADDING) * lvl;
- cairo_rectangle (cr, width-PADDING-bw, PADDING, bw, height-PADDING);
+ cairo_rectangle (cr, PADDING, PADDING, bw, height-PADDING);
switch (indicator ()) {
case Level_OK:
diff --git a/gtk2_ardour/dsp_load_indicator.cc b/gtk2_ardour/dsp_load_indicator.cc
index 379307da1e..1149c7d6a5 100644
--- a/gtk2_ardour/dsp_load_indicator.cc
+++ b/gtk2_ardour/dsp_load_indicator.cc
@@ -52,13 +52,13 @@ DspLoadIndicator::set_dsp_load (const double load)
_dsp_load = load;
char buf[64];
- snprintf (buf, sizeof (buf), "%.1f%%", _dsp_load);
+ snprintf (buf, sizeof (buf), "DSP %.1f%%", _dsp_load);
update (std::string (buf));
}
float
DspLoadIndicator::level () const {
- return _dsp_load / 100.f;
+ return (100.0-_dsp_load) / 100.f;
}
bool