fix use of widget allocation origin in Gtkm2mext::Pane
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 26 May 2016 14:46:07 +0000 (10:46 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:45 +0000 (15:30 -0400)
libs/gtkmm2ext/gtkmm2ext/pane.h
libs/gtkmm2ext/pane.cc

index ca3ce511a32b8189980888f5528ba127d759883c..e42806265d16e2cb187d0baf2cc309cea24e6d32 100644 (file)
@@ -28,8 +28,7 @@
 #include <gtkmm/container.h>
 #include <gtkmm/eventbox.h>
 
-//#include "gtkmm2ext/visibility.h"
-#define LIBGTKMM2EXT_API
+#include "gtkmm2ext/visibility.h"
 
 namespace Gtk {
        class Widget;
@@ -45,7 +44,7 @@ class LIBGTKMM2EXT_API Pane : public Gtk::Container
   public:
        Pane (bool horizontal);
        void set_divider (std::vector<float>::size_type divider, float fract);
-       float get_divider (std::vector<float>::size_type divider);
+       float get_divider (std::vector<float>::size_type divider = 0);
 
        GType child_type_vfunc() const;
 
index 07667a911506c4933c79c8ed83c1a26755f2aab5..8c13fe55d36a8a12c7bbc1d99c210320efe6b66e 100644 (file)
@@ -123,8 +123,8 @@ Pane::reallocate (Gtk::Allocation const & alloc)
 {
        Children::size_type n = 0;
         int remaining;
-        int xpos = 0;
-        int ypos = 0;
+        int xpos = alloc.get_x();
+        int ypos = alloc.get_y();
         float fract;
 
         if (children.empty()) {