diff options
author | Robin Gareus <robin@gareus.org> | 2013-07-02 02:15:04 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-07-10 15:27:04 +0200 |
commit | 3823ffc942e426590b43f72e86ca875a8306b2c7 (patch) | |
tree | 94848323dd4366be800560fe7d01e844dcbe49d5 /libs | |
parent | e4d754390e8df60a169b5a51695fd0b045da9fcc (diff) |
configurable meter background color
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/fastmeter.cc | 12 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/fastmeter.h | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/libs/gtkmm2ext/fastmeter.cc b/libs/gtkmm2ext/fastmeter.cc index 2cc9fa105b..4a96353b1e 100644 --- a/libs/gtkmm2ext/fastmeter.cc +++ b/libs/gtkmm2ext/fastmeter.cc @@ -41,7 +41,9 @@ int FastMeter::max_pattern_metric_size = 1024; FastMeter::PatternMap FastMeter::v_pattern_cache; FastMeter::PatternMap FastMeter::h_pattern_cache; -FastMeter::FastMeter (long hold, unsigned long dimen, Orientation o, int len, int clr0, int clr1, int clr2, int clr3) +FastMeter::FastMeter (long hold, unsigned long dimen, Orientation o, int len, + int clr0, int clr1, int clr2, int clr3, + int bgc0, int bgc1, int bgc2, int bgc3) { orientation = o; hold_cnt = hold; @@ -56,10 +58,10 @@ FastMeter::FastMeter (long hold, unsigned long dimen, Orientation o, int len, in _clr2 = clr2; _clr3 = clr3; - _bgc0 = 0x111111ff; - _bgc1 = 0x333333ff; - _bgc2 = 0x333333ff; - _bgc3 = 0x444444ff; + _bgc0 = bgc0; + _bgc1 = bgc1; + _bgc2 = bgc2; + _bgc3 = bgc3; set_events (BUTTON_PRESS_MASK|BUTTON_RELEASE_MASK); diff --git a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h index 3be8a957ff..06ddb4817b 100644 --- a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h +++ b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h @@ -36,7 +36,10 @@ class FastMeter : public Gtk::DrawingArea { Vertical }; - FastMeter (long hold_cnt, unsigned long width, Orientation, int len=0, int clrb0=0x00ff00, int clr1=0xffff00, int clr2=0xffaa00, int clr3=0xff0000); + FastMeter (long hold_cnt, unsigned long width, Orientation, int len=0, + int clr0=0x00ff00, int clr1=0xffff00, int clr2=0xffaa00, int clr3=0xff0000, + int bgc0=0x111111ff, int bgc1=0x333333ff, int bgc2=0x333333ff, int bgc3=0x444444ff + ); virtual ~FastMeter (); void set (float level); |