diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-05-16 13:57:33 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-05-16 13:57:33 -0400 |
commit | 96de97c92c0b4f0f98a0af7cc156a363a3d58e4b (patch) | |
tree | c083576b3f758c70a8355630babfd5a0c97347e0 /dw/fltkcomplexbutton.cc | |
parent | 5e6f834e45819ebbaccc0d3b4e529f3e89cfa5e4 (diff) |
ComplexButton: fix its content widget coordinates (absolute in fltk-1.3)
Diffstat (limited to 'dw/fltkcomplexbutton.cc')
-rw-r--r-- | dw/fltkcomplexbutton.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dw/fltkcomplexbutton.cc b/dw/fltkcomplexbutton.cc index f201d52b..211a37e8 100644 --- a/dw/fltkcomplexbutton.cc +++ b/dw/fltkcomplexbutton.cc @@ -73,8 +73,11 @@ void ComplexButton::draw() { if (Fl::focus() == this) draw_focus(); // ComplexButton is a Group; draw its children - for (int i = children () - 1; i >= 0; i--) + for (int i = children () - 1; i >= 0; i--) { + // set absolute coordinates for fltk-1.3 --jcid + child (i)->position(x()+(w()-child(i)->w())/2,y()+(h()-child(i)->h())/2); draw_child (*child (i)); + } } int ComplexButton::handle(int event) { |