fix PixFader size allocation
authorRobin Gareus <robin@gareus.org>
Sat, 4 Jan 2014 04:29:06 +0000 (05:29 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 4 Jan 2014 04:42:31 +0000 (05:42 +0100)
previously faders in the processor box were only sized correctly
after the 2nd iteration: allocate -> request -> allocate

libs/gtkmm2ext/pixfader.cc

index 0185550259fa20f66bc3c51b4fe4096096d5a821..7007cf0efe8c9ee52ba72c6f42b8e0a6dc0ce9f2 100644 (file)
@@ -54,6 +54,12 @@ PixFader::PixFader (Gtk::Adjustment& adj, int orientation, int fader_length, int
 
        adjustment.signal_value_changed().connect (mem_fun (*this, &PixFader::adjustment_changed));
        adjustment.signal_changed().connect (mem_fun (*this, &PixFader::adjustment_changed));
+
+       if (_orien == VERT) {
+               DrawingArea::set_size_request(girth, span);
+       } else {
+               DrawingArea::set_size_request(span, girth);
+       }
 }
 
 PixFader::~PixFader ()