diff options
| -rw-r--r-- | CHANGES | 4 | ||||
| -rw-r--r-- | documentation/Makefile | 1 | ||||
| -rw-r--r-- | fluid/align_widget.cxx | 52 |
3 files changed, 43 insertions, 14 deletions
@@ -1,6 +1,8 @@ CHANGES IN FLTK 1.1.7 - - Documentation fixes (STR #648, STR #692) + - Documentation fixes (STR #648, STR #692, STR #745) + - Using the layout alignment controls on a menu widget + would cause FLUID to crash (STR #742) - Added QNX bug workaround for menu handling (STR #704) - Added Greg Ercolano's simple Fl_Input_Choice widget which is a combination of the Fl_Input and diff --git a/documentation/Makefile b/documentation/Makefile index 48e90c28f..a8434510a 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -86,6 +86,7 @@ HTMLFILES = \ Fl_Image.html \ Fl_Input.html \ Fl_Input_.html \ + Fl_Input_Choice.html \ Fl_Int_Input.html \ Fl_JPEG_Image.html \ Fl_Light_Button.html \ diff --git a/fluid/align_widget.cxx b/fluid/align_widget.cxx index a4cd7be56..07dcc910f 100644 --- a/fluid/align_widget.cxx +++ b/fluid/align_widget.cxx @@ -57,13 +57,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(left, w->y(), w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize(left, w->y(), w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -87,13 +89,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize((center2-w->w())/2, w->y(), w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize((center2-w->w())/2, w->y(), w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -114,13 +118,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(right-w->w(), w->y(), w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize(right-w->w(), w->y(), w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -140,13 +146,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), top, w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize(w->x(), top, w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -170,13 +178,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), (center2-w->h())/2, w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize(w->x(), (center2-w->h())/2, w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -197,13 +207,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize( w->x(), bot-w->h(), w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize( w->x(), bot-w->h(), w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -231,13 +243,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(left+wsum+wdt*cnt/n, w->y(), w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize(left+wsum+wdt*cnt/n, w->y(), w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); cnt++; @@ -267,13 +281,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), top+hsum+hgt*cnt/n, w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize(w->x(), top+hsum+hgt*cnt/n, w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); cnt++; @@ -297,13 +313,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), w->y(), wdt, w->h()); } else { // Otherwise, just do the widget... w->resize(w->x(), w->y(), wdt, w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -323,13 +341,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize( w->x(), w->y(), w->w(), hgt); } else { // Otherwise, just do the widget... w->resize( w->x(), w->y(), w->w(), hgt); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -351,13 +371,15 @@ void align_widget_cb(Fl_Widget*, long how) if (o->selected && o->is_widget()) { Fl_Widget *w = ((Fl_Widget_Type *)o)->o; - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize( w->x(), w->y(), wdt, hgt); } else { // Otherwise, just do the widget... w->resize( w->x(), w->y(), wdt, hgt); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -374,13 +396,15 @@ void align_widget_cb(Fl_Widget*, long how) if (w->window() == p) center2 = p->w(); else center2 = 2*p->x()+p->w(); - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button() && !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize((center2-w->w())/2, w->y(), w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize((center2-w->w())/2, w->y(), w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } @@ -396,13 +420,15 @@ void align_widget_cb(Fl_Widget*, long how) if (w->window() == p) center2 = p->h(); else center2 = 2*p->y()+p->h(); - if (o->next && o->next->level > o->level && !o->next->selected) { + if (o->next && o->next->level > o->level && !o->next->selected && + !o->is_menu_button()) { // When resizing a group, make sure we also move the children... ((igroup *)w)->full_resize(w->x(), (center2-w->h())/2, w->w(), w->h()); } else { // Otherwise, just do the widget... w->resize(w->x(), (center2-w->h())/2, w->w(), w->h()); } + modflag=1; w->redraw(); if (w->window()) w->window()->redraw(); } |
