fix use of widget allocation origin in Gtkm2mext::Pane

This commit is contained in:
Paul Davis
2016-05-26 10:46:07 -04:00
parent 29b9c4ecc3
commit 3c4503a849
2 changed files with 4 additions and 5 deletions

View 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;

View 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()) {