Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_box.c ewl_calendar.c ewl_cell.c ewl_colorpicker.c ewl_combo.c ewl_dialog.c ewl_enums.h ewl_filepicker.c ewl_menubar.c ewl_object.c ewl_object.h ewl_progressbar.c ewl_scrollbar.c ewl_scrollpane.c ewl_scrollpane.h ewl_seeker.c ewl_separator.c ewl_shadow.c ewl_spinner.c ewl_statusbar.c ewl_table.c ewl_toolbar.c ewl_tree.c ewl_widget.c Log Message: add shrinkable fill flag (bug 178) and fix bug 20 This will slightly change the meaning of the shrink flag: 'shrink': the widget wishes to be smaller then its preferred size 'shrinkable': the widget can be smaller then its preferred size For more information see the discussion in bug 178. If you are using the (old) shrink fill policy in your application, you may want to check if it still does what you want it to. Or if 'shrinkable' isn't better for the job. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_box.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- ewl_box.c 7 May 2008 13:38:23 -0000 1.57 +++ ewl_box.c 11 Jun 2008 23:04:45 -0000 1.58 @@ -1079,7 +1079,7 @@ * These are the valid fill policies for this widget. */ ewl_box_vertical->f_policy = - EWL_FLAG_FILL_VSHRINK | EWL_FLAG_FILL_VFILL; + EWL_FLAG_FILL_VSHRINKABLE | EWL_FLAG_FILL_VFILL; /* * This sets the aligments for the non-filling direction. @@ -1120,7 +1120,7 @@ * These are the valid fill policies for this widget. */ ewl_box_horizontal->f_policy = - EWL_FLAG_FILL_HSHRINK | EWL_FLAG_FILL_HFILL; + EWL_FLAG_FILL_HSHRINKABLE | EWL_FLAG_FILL_HFILL; /* * This sets the aligments for the non-filling direction. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_calendar.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -3 -r1.37 -r1.38 --- ewl_calendar.c 7 May 2008 13:38:23 -0000 1.37 +++ ewl_calendar.c 11 Jun 2008 23:04:45 -0000 1.38 @@ -92,7 +92,7 @@ o = ewl_icon_new(); ewl_container_child_append(EWL_CONTAINER(top_hbox), o); - ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_SHRINK); + ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_SHRINKABLE); ewl_object_alignment_set(EWL_OBJECT(o), EWL_FLAG_ALIGN_LEFT); icon = ewl_icon_theme_icon_path_get(EWL_ICON_GO_PREVIOUS, EWL_ICON_SIZE_SMALL); @@ -106,14 +106,14 @@ ib->month_label = ewl_label_new(); ewl_object_fill_policy_set(EWL_OBJECT(ib->month_label), EWL_FLAG_FILL_HFILL | - EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_VSHRINKABLE); ewl_object_alignment_set(EWL_OBJECT(ib->month_label), EWL_FLAG_ALIGN_CENTER); ewl_container_child_append(EWL_CONTAINER(top_hbox), ib->month_label); ewl_widget_show(ib->month_label); o = ewl_icon_new(); - ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_SHRINK); + ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_SHRINKABLE); ewl_object_alignment_set(EWL_OBJECT(o), EWL_FLAG_ALIGN_RIGHT); ewl_container_child_append(EWL_CONTAINER(top_hbox), o); icon = ewl_icon_theme_icon_path_get(EWL_ICON_GO_NEXT, =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_cell.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- ewl_cell.c 7 May 2008 13:38:23 -0000 1.23 +++ ewl_cell.c 11 Jun 2008 23:04:45 -0000 1.24 @@ -47,7 +47,7 @@ DRETURN_INT(FALSE, DLEVEL_STABLE); ewl_object_fill_policy_set(EWL_OBJECT(cell), EWL_FLAG_FILL_FILL | - EWL_FLAG_FILL_HSHRINK); + EWL_FLAG_FILL_HSHRINKABLE); ewl_widget_appearance_set(EWL_WIDGET(cell), EWL_CELL_TYPE); ewl_widget_inherit(EWL_WIDGET(cell), EWL_CELL_TYPE); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_colorpicker.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -3 -r1.48 -r1.49 --- ewl_colorpicker.c 7 May 2008 13:38:23 -0000 1.48 +++ ewl_colorpicker.c 11 Jun 2008 23:04:45 -0000 1.49 @@ -201,7 +201,7 @@ ewl_object_padding_set(EWL_OBJECT(o), 2, 2, 2, 2); ewl_object_minimum_h_set(EWL_OBJECT(o), 20); ewl_object_fill_policy_set(EWL_OBJECT(o), - EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINKABLE); cp->preview.current = o; ewl_widget_show(o); @@ -220,7 +220,7 @@ ewl_object_padding_set(EWL_OBJECT(o), 2, 2, 2, 2); ewl_object_minimum_h_set(EWL_OBJECT(o), 20); ewl_object_fill_policy_set(EWL_OBJECT(o), - EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINKABLE); ewl_callback_append(o, EWL_CALLBACK_CLICKED, ewl_colorpicker_cb_previous_clicked, cp); cp->preview.previous = o; @@ -230,7 +230,7 @@ vbox = ewl_vbox_new(); ewl_widget_internal_set(vbox, TRUE); ewl_container_child_append(EWL_CONTAINER(cp), vbox); - ewl_object_fill_policy_set(EWL_OBJECT(vbox), EWL_FLAG_FILL_SHRINK); + ewl_object_fill_policy_set(EWL_OBJECT(vbox), EWL_FLAG_FILL_SHRINKABLE); ewl_widget_show(vbox); /* setup the spinners and radiobuttons */ =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_combo.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -3 -r1.69 -r1.70 --- ewl_combo.c 7 May 2008 13:38:23 -0000 1.69 +++ ewl_combo.c 11 Jun 2008 23:04:45 -0000 1.70 @@ -171,7 +171,7 @@ scroll = ewl_scrollpane_new(); ewl_object_fill_policy_set(EWL_OBJECT(scroll), EWL_FLAG_FILL_HFILL - | EWL_FLAG_FILL_SHRINK); + | EWL_FLAG_FILL_SHRINKABLE); ewl_object_maximum_h_set(EWL_OBJECT(scroll), max_h); ewl_widget_show(scroll); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_dialog.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- ewl_dialog.c 7 May 2008 13:38:23 -0000 1.25 +++ ewl_dialog.c 11 Jun 2008 23:04:45 -0000 1.26 @@ -313,7 +313,7 @@ ewl_container_child_insert(EWL_CONTAINER(dialog->vbox), dialog->separator, n); ewl_object_fill_policy_set(EWL_OBJECT(dialog->separator), - EWL_FLAG_FILL_SHRINK); + EWL_FLAG_FILL_SHRINKABLE); ewl_widget_show(dialog->separator); } else if (!has_sep && (dialog->separator != NULL)) { =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_enums.h,v retrieving revision 1.89 retrieving revision 1.90 diff -u -3 -r1.89 -r1.90 --- ewl_enums.h 4 Jun 2008 20:18:26 -0000 1.89 +++ ewl_enums.h 11 Jun 2008 23:04:45 -0000 1.90 @@ -104,14 +104,19 @@ * stretched to fill available space or keep their current size. */ EWL_FLAG_FILL_NONE = 0, /**< Do not fill or shrink in any direction */ - EWL_FLAG_FILL_HSHRINK = 0x10, /**< Horizontally shrink bit */ - EWL_FLAG_FILL_VSHRINK = 0x20, /**< Horizontally shrink bit */ - EWL_FLAG_FILL_SHRINK = - EWL_FLAG_FILL_HSHRINK | EWL_FLAG_FILL_VSHRINK, /**< Shrink bit */ + EWL_FLAG_FILL_HSHRINKABLE = 0x10, /**< Horizontally shrink bit */ + EWL_FLAG_FILL_VSHRINKABLE = 0x20, /**< Vertical shrink bit */ + EWL_FLAG_FILL_SHRINKABLE = + EWL_FLAG_FILL_HSHRINKABLE | EWL_FLAG_FILL_VSHRINKABLE, /**< Shrink bit */ EWL_FLAG_FILL_HFILL = 0x40, /**< Horizontal fill bit */ EWL_FLAG_FILL_VFILL = 0x80, /**< Vertical fill bit */ EWL_FLAG_FILL_FILL = EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VFILL, /**< Fill bit */ - EWL_FLAG_FILL_ALL = EWL_FLAG_FILL_FILL | EWL_FLAG_FILL_SHRINK /**< Shrunk and fill bit */ + EWL_FLAG_FILL_ALL = EWL_FLAG_FILL_FILL | EWL_FLAG_FILL_SHRINKABLE, /**< Shrunk and fill bit */ + EWL_FLAG_FILL_HSHRINK = 0x100 | EWL_FLAG_FILL_HSHRINKABLE, + /**< Horizontal unfold bit */ + EWL_FLAG_FILL_VSHRINK = 0x200 | EWL_FLAG_FILL_VSHRINKABLE, + /**< Horizontal unfold bit */ + EWL_FLAG_FILL_SHRINK = EWL_FLAG_FILL_HSHRINK | EWL_FLAG_FILL_VSHRINK }; /** @@ -132,8 +137,8 @@ * @def EWL_FLAGS_FILL_MASK * The fill mask */ -#define EWL_FLAGS_FILL_MASK (EWL_FLAG_FILL_NONE | EWL_FLAG_FILL_SHRINK | \ - EWL_FLAG_FILL_FILL) +#define EWL_FLAGS_FILL_MASK (EWL_FLAG_FILL_NONE | EWL_FLAG_FILL_SHRINKABLE | \ + EWL_FLAG_FILL_FILL | EWL_FLAG_FILL_SHRINK) /** * @enum Ewl_Widget_Flags =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filepicker.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -3 -r1.53 -r1.54 --- ewl_filepicker.c 7 May 2008 13:38:23 -0000 1.53 +++ ewl_filepicker.c 11 Jun 2008 23:04:45 -0000 1.54 @@ -117,7 +117,8 @@ ewl_callback_prepend(EWL_WIDGET(fp), EWL_CALLBACK_DESTROY, ewl_filepicker_cb_destroy, NULL); - ewl_object_preferred_inner_size_set(EWL_OBJECT(fp), 400, 300); + /* FIXME that's the wrong way to do it */ + ewl_object_preferred_inner_size_set(EWL_OBJECT(fp), 300, 100); fp->mvc_path.model = ewl_model_new(); ewl_model_data_fetch_set(fp->mvc_path.model, @@ -165,7 +166,7 @@ EWL_CALLBACK_VALUE_CHANGED, ewl_filepicker_cb_path_change, fp); ewl_object_fill_policy_set(EWL_OBJECT(fp->mvc_path.combo), - EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINKABLE); ewl_widget_show(fp->mvc_path.combo); o = ewl_hbox_new(); @@ -175,7 +176,7 @@ fp->favorites_box = ewl_vbox_new(); ewl_container_child_append(EWL_CONTAINER(o), fp->favorites_box); ewl_object_fill_policy_set(EWL_OBJECT(fp->favorites_box), - EWL_FLAG_FILL_HSHRINK | EWL_FLAG_FILL_VFILL); + EWL_FLAG_FILL_HSHRINKABLE | EWL_FLAG_FILL_VFILL); ewl_filepicker_favorites_populate(fp); ewl_filepicker_show_favorites_set(fp, FALSE); @@ -194,7 +195,7 @@ box = ewl_vbox_new(); ewl_container_child_append(EWL_CONTAINER(o), box); ewl_object_fill_policy_set(EWL_OBJECT(o), - EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINKABLE); ewl_widget_show(box); fp->file_entry = ewl_entry_new(); @@ -228,12 +229,12 @@ ewl_container_child_append(EWL_CONTAINER(box), fp->mvc_filters.combo); ewl_object_fill_policy_set(EWL_OBJECT(fp->mvc_filters.combo), - EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINKABLE); ewl_widget_show(fp->mvc_filters.combo); box = ewl_vbox_new(); ewl_container_child_append(EWL_CONTAINER(o), box); - ewl_object_fill_policy_set(EWL_OBJECT(box), EWL_FLAG_FILL_SHRINK); + ewl_object_fill_policy_set(EWL_OBJECT(box), EWL_FLAG_FILL_SHRINKABLE); ewl_widget_show(box); fp->ret_button = ewl_button_new(); @@ -242,7 +243,7 @@ ewl_callback_append(fp->ret_button, EWL_CALLBACK_CLICKED, ewl_filepicker_cb_button_clicked, fp); ewl_object_fill_policy_set(EWL_OBJECT(fp->ret_button), - EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINKABLE); ewl_widget_show(fp->ret_button); o = ewl_button_new(); @@ -250,7 +251,7 @@ ewl_stock_type_set(EWL_STOCK(o), EWL_STOCK_CANCEL); ewl_callback_append(o, EWL_CALLBACK_CLICKED, ewl_filepicker_cb_button_clicked, fp); - ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_SHRINK); + ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_SHRINKABLE); ewl_widget_show(o); /* Set up filelist */ =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_menubar.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- ewl_menubar.c 7 May 2008 13:38:25 -0000 1.24 +++ ewl_menubar.c 11 Jun 2008 23:04:45 -0000 1.25 @@ -132,7 +132,7 @@ ewl_menu_from_info(EWL_MENU(menu), info[i].menu); ewl_container_child_append(EWL_CONTAINER(mb), menu); ewl_object_fill_policy_set(EWL_OBJECT(menu), - EWL_FLAG_FILL_HSHRINK | EWL_FLAG_FILL_VFILL); + EWL_FLAG_FILL_HSHRINKABLE | EWL_FLAG_FILL_VFILL); ewl_widget_show(menu); } =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_object.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- ewl_object.c 4 Jun 2008 20:18:27 -0000 1.29 +++ ewl_object.c 11 Jun 2008 23:04:45 -0000 1.30 @@ -137,7 +137,7 @@ w = MINIMUM_W(o); if (w < PREFERRED_W(o) && !(ewl_object_fill_policy_get(o) & - EWL_FLAG_FILL_HSHRINK)) + EWL_FLAG_FILL_HSHRINKABLE)) w = PREFERRED_W(o); if (w > MAXIMUM_W(o)) @@ -167,7 +167,7 @@ h = MINIMUM_H(o); if (h < PREFERRED_H(o) && !(ewl_object_fill_policy_get(o) & - EWL_FLAG_FILL_VSHRINK)) + EWL_FLAG_FILL_VSHRINKABLE)) h = PREFERRED_H(o); if (h > MAXIMUM_H(o)) @@ -215,8 +215,7 @@ void ewl_object_preferred_inner_w_set(Ewl_Object *o, int w) { - int old_size; - unsigned int resize, fill; + int size; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(o); @@ -224,25 +223,12 @@ /* * Store the previous size. */ - old_size = PREFERRED_W(o); - + size = ewl_object_preferred_w_get(o); o->preferred.w = w; + size = ewl_object_preferred_w_get(o) - size; - if (CURRENT_W(o) < PREFERRED_W(o)) - fill = EWL_FLAG_FILL_HSHRINK; - else if (CURRENT_W(o) > PREFERRED_W(o)) - fill = EWL_FLAG_FILL_HFILL; - else - fill = 0; - - resize = ewl_object_fill_policy_get(EWL_OBJECT(o)); - - /* - * Now update the widgets parent of the change in size if necessary. - */ - if (!(resize & fill)) - ewl_container_child_resize(EWL_WIDGET(o), - PREFERRED_W(o) - old_size, + if (size) + ewl_container_child_resize(EWL_WIDGET(o), size, EWL_ORIENTATION_HORIZONTAL); DLEAVE_FUNCTION(DLEVEL_STABLE); @@ -260,34 +246,20 @@ void ewl_object_preferred_inner_h_set(Ewl_Object *o, int h) { - int old_size; - unsigned int resize, fill; + int size; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(o); /* - * Store the previous size + * Store the previous size. */ - old_size = PREFERRED_H(o); - + size = ewl_object_preferred_h_get(o); o->preferred.h = h; + size = ewl_object_preferred_h_get(o) - size; - if (CURRENT_H(o) < PREFERRED_H(o)) - fill = EWL_FLAG_FILL_VSHRINK; - else if (CURRENT_H(o) > PREFERRED_H(o)) - fill = EWL_FLAG_FILL_VFILL; - else - fill = 0; - - resize = ewl_object_fill_policy_get(EWL_OBJECT(o)); - - /* - * Now update the widgets parent of the change in size if necessary. - */ - if (!(resize & fill)) - ewl_container_child_resize(EWL_WIDGET(o), - PREFERRED_H(o) - old_size, + if (size) + ewl_container_child_resize(EWL_WIDGET(o), size, EWL_ORIENTATION_VERTICAL); DLEAVE_FUNCTION(DLEVEL_STABLE); @@ -330,7 +302,8 @@ add = INSET_HORIZONTAL(o) + PADDING_HORIZONTAL(o); - if (PREFERRED_W(o) < MINIMUM_W(o)) + if ((o->flags & (EWL_FLAG_FILL_HSHRINK & ~EWL_FLAG_FILL_HSHRINKABLE)) + || PREFERRED_W(o) < MINIMUM_W(o)) temp = MINIMUM_W(o); else if (PREFERRED_W(o) > MAXIMUM_W(o)) temp = MAXIMUM_W(o); @@ -357,7 +330,8 @@ add = INSET_VERTICAL(o) + PADDING_VERTICAL(o); - if (PREFERRED_H(o) < MINIMUM_H(o)) + if ((o->flags & (EWL_FLAG_FILL_VSHRINK & ~EWL_FLAG_FILL_VSHRINKABLE)) + || PREFERRED_H(o) < MINIMUM_H(o)) temp = MINIMUM_H(o); else if (PREFERRED_H(o) > MAXIMUM_H(o)) temp = MAXIMUM_H(o); @@ -562,7 +536,7 @@ /* * Bound the width by the preferred size first. */ - if ((w < o->preferred.w && !(o->flags & EWL_FLAG_FILL_HSHRINK)) + if ((w < o->preferred.w && !(o->flags & EWL_FLAG_FILL_HSHRINKABLE)) || (w > o->preferred.w && !(o->flags & EWL_FLAG_FILL_HFILL))) w = o->preferred.w; @@ -602,7 +576,7 @@ /* * Bound the width by the preferred size first. */ - if ((h < o->preferred.h && !(o->flags & EWL_FLAG_FILL_VSHRINK)) + if ((h < o->preferred.h && !(o->flags & EWL_FLAG_FILL_VSHRINKABLE)) || (h > o->preferred.h && !(o->flags & EWL_FLAG_FILL_VFILL))) h = o->preferred.h; @@ -656,7 +630,7 @@ void ewl_object_minimum_w_set(Ewl_Object *o, int w) { - int old_size, new_size; + int size; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(o); @@ -667,15 +641,12 @@ if (w > EWL_OBJECT_MAX_SIZE) w = EWL_OBJECT_MAX_SIZE; - old_size = MINIMUM_W(o); - new_size = o->minimum.w = w; - - if (MAXIMUM_W(o) < w) - o->minimum.w = w; + size = ewl_object_preferred_w_get(o); + o->minimum.w = w; + size = ewl_object_preferred_w_get(o) - size; - if (PREFERRED_W(o) < MINIMUM_W(o)) - ewl_container_child_resize(EWL_WIDGET(o), - MINIMUM_W(o) - PREFERRED_W(o), + if (size) + ewl_container_child_resize(EWL_WIDGET(o), size, EWL_ORIENTATION_HORIZONTAL); if (CURRENT_W(o) < w) @@ -697,7 +668,7 @@ void ewl_object_minimum_h_set(Ewl_Object *o, int h) { - int old_size, new_size; + int size; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(o); @@ -708,15 +679,12 @@ if (h > EWL_OBJECT_MAX_SIZE) h = EWL_OBJECT_MAX_SIZE; - old_size = MINIMUM_H(o); - new_size = o->minimum.h = h; - - if (MAXIMUM_H(o) < h) - o->minimum.h = h; + size = ewl_object_preferred_h_get(o); + o->minimum.h = h; + size = ewl_object_preferred_h_get(o) - size; - if (PREFERRED_H(o) < MINIMUM_H(o)) - ewl_container_child_resize(EWL_WIDGET(o), - MINIMUM_H(o) - PREFERRED_H(o), + if (size) + ewl_container_child_resize(EWL_WIDGET(o), size, EWL_ORIENTATION_VERTICAL); if (CURRENT_H(o) < h) @@ -738,7 +706,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(o, 0); - if (o->flags & EWL_FLAG_FILL_HSHRINK || MINIMUM_W(o) > PREFERRED_W(o)) + if (o->flags & EWL_FLAG_FILL_HSHRINKABLE || MINIMUM_W(o) > PREFERRED_W(o)) val = MINIMUM_W(o); else val = PREFERRED_W(o); @@ -760,7 +728,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(o, 0); - if (o->flags & EWL_FLAG_FILL_VSHRINK || MINIMUM_H(o) > PREFERRED_H(o)) + if (o->flags & EWL_FLAG_FILL_VSHRINKABLE || MINIMUM_H(o) > PREFERRED_H(o)) val = MINIMUM_H(o); else val = PREFERRED_H(o); @@ -827,6 +795,8 @@ void ewl_object_maximum_w_set(Ewl_Object *o, int w) { + int size; + DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(o); @@ -836,13 +806,13 @@ if (w > EWL_OBJECT_MAX_SIZE) w = EWL_OBJECT_MAX_SIZE; + size = ewl_object_preferred_w_get(o); o->maximum.w = w; + size = ewl_object_preferred_w_get(o) - size; - if (MINIMUM_W(o) > w) - o->maximum.w = w; - - if (PREFERRED_W(o) > MAXIMUM_W(o)) - ewl_object_preferred_inner_w_set(o, PREFERRED_W(o)); + if (size) + ewl_container_child_resize(EWL_WIDGET(o), size, + EWL_ORIENTATION_HORIZONTAL); if (CURRENT_W(o) > w) ewl_object_h_request(o, w); @@ -863,6 +833,8 @@ void ewl_object_maximum_h_set(Ewl_Object *o, int h) { + int size; + DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(o); @@ -872,13 +844,13 @@ if (h > EWL_OBJECT_MAX_SIZE) h = EWL_OBJECT_MAX_SIZE; + size = ewl_object_preferred_h_get(o); o->maximum.h = h; + size = ewl_object_preferred_h_get(o) - size; - if (MINIMUM_H(o) > h) - o->minimum.h = h; - - if (PREFERRED_H(o) > MAXIMUM_H(o)) - ewl_object_preferred_inner_h_set(o, PREFERRED_H(o)); + if (size) + ewl_container_child_resize(EWL_WIDGET(o), size, + EWL_ORIENTATION_VERTICAL); if (CURRENT_H(o) > h) ewl_object_h_request(o, h); @@ -1285,15 +1257,16 @@ * * Stores the new fill policy value into the object for use when laying out * the object. Possible values for the fill policy are EWL_FLAG_FILL_NONE, - * EWL_FLAG_FILL_HSHRINK, EWL_FLAG_FILL_VSHRINK, EWL_FLAG_FILL_SHRINK, + * EWL_FLAG_FILL_HSHRINKABLE, EWL_FLAG_FILL_VSHRINKABLE, EWL_FLAG_FILL_SHRINKABLE, * EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_VFILL and EWL_FLAG_FILL_FILL. You can * combine those with a bitwise OR, e.g. EWL_FLAG_FILL_VFILL - * | EWL_FLAG_FILL_HSHRINK. + * | EWL_FLAG_FILL_HSHRINKABLE. */ void ewl_object_fill_policy_set(Ewl_Object *o, unsigned int fill) { - unsigned int old_mask; + unsigned int size_update; + int w, h; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(o); @@ -1301,9 +1274,28 @@ if ((o->flags & EWL_FLAGS_FILL_MASK) == fill) DRETURN(DLEVEL_STABLE); - old_mask = o->flags; + size_update = (o->flags ^ fill) + & (EWL_FLAG_FILL_SHRINK & ~EWL_FLAG_FILL_SHRINKABLE); + + if (size_update) + ewl_object_preferred_size_get(o, &w, &h); + ewl_object_flags_remove(o, EWL_FLAGS_FILL_MASK, EWL_FLAGS_FILL_MASK); ewl_object_flags_add(o, fill, EWL_FLAGS_FILL_MASK); + + /* if it was unfold or is now we need to update the preferred size */ + if (size_update) + { + w = ewl_object_preferred_w_get(o) - w; + h = ewl_object_preferred_h_get(o) - h; + + if (w) + ewl_container_child_resize(EWL_WIDGET(o), w, + EWL_ORIENTATION_HORIZONTAL); + if (h) + ewl_container_child_resize(EWL_WIDGET(o), h, + EWL_ORIENTATION_VERTICAL); + } if (EWL_WIDGET(o)->parent) ewl_widget_configure(EWL_WIDGET(o)->parent); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_object.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- ewl_object.h 4 Jun 2008 20:18:27 -0000 1.33 +++ ewl_object.h 11 Jun 2008 23:04:45 -0000 1.34 @@ -54,7 +54,7 @@ * * As illustrated, the fill policy determines how much space an object will * use when the request for a specific size is made. When the fill policy - * contains EWL_FLAG_FILL_HSHRINK, EWL_FLAG_FILL_VSHRINK or both, the + * contains EWL_FLAG_FILL_HSHRINKABLE, EWL_FLAG_FILL_VSHRINKABLE or both, the * Ewl_Object can be resized down to it's minimum size in width, height or both * respectively. * @@ -333,7 +333,7 @@ ewl_object_maximum_w_set(o, w); \ ewl_object_minimum_w_set(o, w); \ ewl_object_fill_policy_set(o, ewl_object_fill_policy_get(o) & \ - ~(EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINK)); \ + ~(EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINKABLE)); \ } /** @@ -347,7 +347,7 @@ ewl_object_maximum_h_set(o, h); \ ewl_object_minimum_h_set(o, h); \ ewl_object_fill_policy_set(o, ewl_object_fill_policy_get(o) & \ - ~(EWL_FLAG_FILL_VFILL | EWL_FLAG_FILL_VSHRINK)); \ + ~(EWL_FLAG_FILL_VFILL | EWL_FLAG_FILL_VSHRINKABLE)); \ } /** =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_progressbar.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- ewl_progressbar.c 7 May 2008 13:38:25 -0000 1.25 +++ ewl_progressbar.c 11 Jun 2008 23:04:45 -0000 1.26 @@ -83,7 +83,7 @@ ewl_progressbar_cb_value_changed, NULL); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_HFILL | - EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_VSHRINKABLE); DRETURN_INT(TRUE, DLEVEL_STABLE); } =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_scrollbar.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- ewl_scrollbar.c 7 May 2008 13:38:25 -0000 1.25 +++ ewl_scrollbar.c 11 Jun 2008 23:04:45 -0000 1.26 @@ -100,7 +100,7 @@ ewl_widget_appearance_set(w, "hscrollbar"); ewl_widget_inherit(w, EWL_SCROLLBAR_TYPE); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_HFILL | - EWL_FLAG_FILL_HSHRINK); + EWL_FLAG_FILL_HSHRINKABLE); /* * Create the basic widgets that are contained in the scrollbar. @@ -237,6 +237,7 @@ DRETURN(DLEVEL_STABLE); ewl_box_orientation_set(EWL_BOX(s), o); + ewl_seeker_orientation_set(EWL_SEEKER(s->seeker), o); /* * Swap scroll direction on orientation change @@ -246,14 +247,14 @@ if (o == EWL_ORIENTATION_HORIZONTAL) { ewl_widget_appearance_set(EWL_WIDGET(s), "hscrollbar"); ewl_object_fill_policy_set(EWL_OBJECT(s), - EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINK); + EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINKABLE); ewl_object_fill_policy_set(EWL_OBJECT(s->seeker), EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINK); } else { ewl_widget_appearance_set(EWL_WIDGET(s), "vscrollbar"); ewl_object_fill_policy_set(EWL_OBJECT(s), - EWL_FLAG_FILL_VFILL | EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_VFILL | EWL_FLAG_FILL_VSHRINKABLE); ewl_object_fill_policy_set(EWL_OBJECT(s->seeker), EWL_FLAG_FILL_VFILL | EWL_FLAG_FILL_VSHRINK); } @@ -267,8 +268,6 @@ ewl_container_child_remove(EWL_CONTAINER(s), s->decrement); ewl_container_child_remove(EWL_CONTAINER(s), s->increment); ewl_container_child_remove(EWL_CONTAINER(s), s->seeker); - - ewl_seeker_orientation_set(EWL_SEEKER(s->seeker), o); /* * Setup a few orientation specific variables, such as appearance and =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_scrollpane.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -3 -r1.41 -r1.42 --- ewl_scrollpane.c 7 May 2008 13:38:25 -0000 1.41 +++ ewl_scrollpane.c 11 Jun 2008 23:04:45 -0000 1.42 @@ -12,6 +12,7 @@ #define HIST_NUM 20 +static void ewl_scrollpane_preferred_size_calc(Ewl_Scrollpane *s); /* Normal scrolling functions */ static void ewl_scrollpane_cb_mouse_down_normal(Ewl_Widget *w, void *ev, void *data); static void ewl_scrollpane_cb_mouse_up_normal(Ewl_Widget *w, void *ev, void *data); @@ -111,11 +112,19 @@ ewl_widget_appearance_set(w, EWL_SCROLLPANE_TYPE); ewl_widget_inherit(w, EWL_SCROLLPANE_TYPE); ewl_widget_focusable_set(EWL_WIDGET(s), TRUE); - ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_ALL); + ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_FILL + | EWL_FLAG_FILL_SHRINK); ewl_container_callback_notify(EWL_CONTAINER(s), EWL_CALLBACK_FOCUS_IN); ewl_container_callback_notify(EWL_CONTAINER(s), EWL_CALLBACK_FOCUS_OUT); + /* get informed about the children size */ + ewl_container_show_notify_set(EWL_CONTAINER(s), + ewl_scrollpane_cb_child_show); + ewl_container_resize_notify_set(EWL_CONTAINER(s), + ewl_scrollpane_cb_child_resize); + + /* Remove the default focus out callback and replace with our own */ ewl_callback_del(w, EWL_CALLBACK_FOCUS_OUT, ewl_widget_cb_focus_out); ewl_callback_append(w, EWL_CALLBACK_FOCUS_OUT, @@ -131,6 +140,12 @@ ewl_widget_internal_set(s->overlay, TRUE); ewl_widget_show(s->overlay); + /* override the notify callbacks of the overlay */ + ewl_container_show_notify_set(EWL_CONTAINER(s->overlay), + ewl_scrollpane_cb_overlay_child_show); + ewl_container_resize_notify_set(EWL_CONTAINER(s->overlay), + ewl_scrollpane_cb_overlay_child_resize); + /* * Create the container to hold the contents and it's configure * callback to position it's child. @@ -167,7 +182,7 @@ ewl_scrollpane_cb_focus_jump, NULL); /* - * We need to know whent he scrollbars have value changes in order to + * We need to know when he scrollbars have value changes in order to * know when to scroll. */ ewl_callback_append(s->hscrollbar, EWL_CALLBACK_VALUE_CHANGED, @@ -311,7 +326,7 @@ unsigned int fill; fill = ewl_object_fill_policy_get(EWL_OBJECT(s->box)); ewl_object_fill_policy_set(EWL_OBJECT(s->box), - fill | EWL_FLAG_FILL_HSHRINK); + fill | EWL_FLAG_FILL_HSHRINKABLE); } ewl_widget_configure(EWL_WIDGET(s)); @@ -340,7 +355,7 @@ unsigned int fill; fill = ewl_object_fill_policy_get(EWL_OBJECT(s->box)); ewl_object_fill_policy_set(EWL_OBJECT(s->box), - fill | EWL_FLAG_FILL_VSHRINK); + fill | EWL_FLAG_FILL_VSHRINKABLE); } ewl_widget_configure(EWL_WIDGET(s)); @@ -518,17 +533,6 @@ content_h = CURRENT_H(w); /* - * FIXME: This is exposing box internals, should probably just make a - * dumb box for the scrollpane. - * Force the box to recalculate preferred size to work around children - * with shrink fill policies. - */ - ewl_container_largest_prefer(EWL_CONTAINER(s->box), - EWL_ORIENTATION_HORIZONTAL); - ewl_container_sum_prefer(EWL_CONTAINER(s->box), - EWL_ORIENTATION_VERTICAL); - - /* * Get the preferred size of contents to scroll correctly. */ b_width = ewl_object_preferred_w_get(EWL_OBJECT(s->box)); @@ -550,7 +554,7 @@ s->hflag == EWL_SCROLLPANE_FLAG_AUTO_VISIBLE)) ewl_widget_show(s->hscrollbar); else { - box_fill |= EWL_FLAG_FILL_HSHRINK; + box_fill |= EWL_FLAG_FILL_HSHRINKABLE; ewl_widget_hide(s->hscrollbar); } @@ -559,7 +563,7 @@ s->vflag == EWL_SCROLLPANE_FLAG_AUTO_VISIBLE)) ewl_widget_show(s->vscrollbar); else { - box_fill |= EWL_FLAG_FILL_VSHRINK; + box_fill |= EWL_FLAG_FILL_VSHRINKABLE; ewl_widget_hide(s->vscrollbar); } @@ -638,6 +642,128 @@ * Reset the default fill policy on the box to get updated sizes.. */ ewl_object_fill_policy_set(EWL_OBJECT(s->box), old_fill); + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +/** + * @internal + * @param p: The scrollbar to work with + * @param w: The now visible child + * @return Returns no value + */ +void +ewl_scrollpane_cb_child_show(Ewl_Container *p, Ewl_Widget *c __UNUSED__) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(p); + DCHECK_TYPE(p, EWL_SCROLLPANE_TYPE); + + ewl_scrollpane_preferred_size_calc(EWL_SCROLLPANE(p)); + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +/** + * @internal + * @param p: The scrollbar to work with + * @param w: The resized child (unused) + * @param size: unused + * @param o: unused + * @return Returns no value + */ +void +ewl_scrollpane_cb_child_resize(Ewl_Container *p, Ewl_Widget *c __UNUSED__, + int size __UNUSED__, + Ewl_Orientation o __UNUSED__) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(p); + DCHECK_TYPE(p, EWL_SCROLLPANE_TYPE); + + ewl_scrollpane_preferred_size_calc(EWL_SCROLLPANE(p)); + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +/** + * @internal + * @param p: The overlay to work with + * @param w: The now visible child + * @return Returns no value + */ +void +ewl_scrollpane_cb_overlay_child_show(Ewl_Container *p, Ewl_Widget *c) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(p); + DCHECK_TYPE(p, EWL_OVERLAY_TYPE); + DCHECK_PARAM_PTR(c); + DCHECK_TYPE(c, EWL_WIDGET_TYPE); + + ewl_overlay_cb_child_show(p, c); + ewl_scrollpane_preferred_size_calc(EWL_SCROLLPANE(EWL_WIDGET(p)->parent)); + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +/** + * @internal + * @param p: The scrollbar to work with + * @param w: The resized child (unused) + * @param size: unused + * @param o: unused + * @return Returns no value + */ +void +ewl_scrollpane_cb_overlay_child_resize(Ewl_Container *p, Ewl_Widget *c, + int size, Ewl_Orientation o) +{ + Ewl_Scrollpane *s; + + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(p); + DCHECK_TYPE(p, EWL_OVERLAY_TYPE); + s = EWL_SCROLLPANE(EWL_WIDGET(p)->parent); + DCHECK_PARAM_PTR(s); + DCHECK_PARAM_PTR(c); + DCHECK_TYPE(c, EWL_WIDGET_TYPE); + DCHECK_TYPE(s, EWL_SCROLLPANE_TYPE); + + ewl_overlay_cb_child_resize(p, c, size, o); + + if (o == EWL_ORIENTATION_VERTICAL) + ewl_object_preferred_inner_h_set(EWL_OBJECT(s), + PREFERRED_H(s) + size); + else + ewl_object_preferred_inner_w_set(EWL_OBJECT(s), + PREFERRED_W(s) + size); + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +static void +ewl_scrollpane_preferred_size_calc(Ewl_Scrollpane *s) +{ + int hs_w = 0, hs_h = 0, vs_w = 0, vs_h = 0; + + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR(s); + DCHECK_TYPE(s, EWL_SCROLLPANE_TYPE); + + if (s->hflag != EWL_SCROLLPANE_FLAG_ALWAYS_HIDDEN) + ewl_object_preferred_size_get(EWL_OBJECT(s->hscrollbar), + &hs_w, &hs_h); + if (s->vflag != EWL_SCROLLPANE_FLAG_ALWAYS_HIDDEN) + ewl_object_preferred_size_get(EWL_OBJECT(s->vscrollbar), + &vs_w, &vs_h); + + ewl_object_minimum_h_set(EWL_OBJECT(s), hs_h + vs_h); + ewl_object_minimum_w_set(EWL_OBJECT(s), hs_w + vs_w); + ewl_object_preferred_inner_h_set(EWL_OBJECT(s), + ewl_object_preferred_h_get(EWL_OBJECT(s->box)) + hs_h); + ewl_object_preferred_inner_w_set(EWL_OBJECT(s), + ewl_object_preferred_w_get(EWL_OBJECT(s->box)) + vs_w); DLEAVE_FUNCTION(DLEVEL_STABLE); } =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_scrollpane.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- ewl_scrollpane.h 7 May 2008 13:38:25 -0000 1.25 +++ ewl_scrollpane.h 11 Jun 2008 23:04:45 -0000 1.26 @@ -130,6 +130,13 @@ void ewl_scrollpane_cb_wheel_scroll(Ewl_Widget *w, void *ev_data, void *user_data); +void ewl_scrollpane_cb_child_show(Ewl_Container *p, Ewl_Widget *c); +void ewl_scrollpane_cb_child_resize(Ewl_Container *p, Ewl_Widget *c, int size, + Ewl_Orientation o); +void ewl_scrollpane_cb_overlay_child_show(Ewl_Container *p, Ewl_Widget *c); +void ewl_scrollpane_cb_overlay_child_resize(Ewl_Container *p, Ewl_Widget *c, + int size, Ewl_Orientation o); + /** * @} */ =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_seeker.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- ewl_seeker.c 4 Jun 2008 20:18:27 -0000 1.33 +++ ewl_seeker.c 11 Jun 2008 23:04:45 -0000 1.34 @@ -99,7 +99,7 @@ ewl_widget_appearance_set(w, "hseeker"); ewl_widget_inherit(w, EWL_SEEKER_TYPE); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_HFILL | - EWL_FLAG_FILL_HSHRINK); + EWL_FLAG_FILL_HSHRINKABLE); ewl_container_show_notify_set(EWL_CONTAINER(w), ewl_seeker_cb_child_show); @@ -177,13 +177,13 @@ ewl_widget_appearance_set(EWL_WIDGET(s), "hseeker"); ewl_widget_appearance_set(s->button, "hbutton"); ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_HFILL | - EWL_FLAG_FILL_HSHRINK); + EWL_FLAG_FILL_HSHRINKABLE); } else { ewl_widget_appearance_set(EWL_WIDGET(s), "vseeker"); ewl_widget_appearance_set(s->button, "vbutton"); ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_VFILL | - EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_VSHRINKABLE); } DLEAVE_FUNCTION(DLEVEL_STABLE); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_separator.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- ewl_separator.c 7 May 2008 13:38:25 -0000 1.19 +++ ewl_separator.c 11 Jun 2008 23:04:45 -0000 1.20 @@ -89,7 +89,7 @@ ewl_widget_inherit(w, EWL_SEPARATOR_TYPE); ewl_widget_appearance_set(EWL_WIDGET(s), "hseparator"); ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_HFILL | - EWL_FLAG_FILL_SHRINK); + EWL_FLAG_FILL_SHRINKABLE); ewl_object_alignment_set(EWL_OBJECT(s), EWL_FLAG_ALIGN_LEFT); @@ -122,13 +122,13 @@ ewl_widget_appearance_set(EWL_WIDGET(s), "hseparator"); ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_HFILL | - EWL_FLAG_FILL_HSHRINK); + EWL_FLAG_FILL_HSHRINKABLE); } else { ewl_widget_appearance_set(EWL_WIDGET(s), "vseparator"); ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_VFILL | - EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_VSHRINKABLE); } ewl_widget_configure(EWL_WIDGET(s)); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_shadow.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- ewl_shadow.c 7 May 2008 13:38:25 -0000 1.10 +++ ewl_shadow.c 11 Jun 2008 23:04:45 -0000 1.11 @@ -44,7 +44,7 @@ DRETURN_INT(FALSE, DLEVEL_STABLE); ewl_box_orientation_set(EWL_BOX(s), EWL_ORIENTATION_VERTICAL); - ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_SHRINK); + ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_SHRINKABLE); ewl_widget_appearance_set(EWL_WIDGET(s), EWL_SHADOW_TYPE); ewl_widget_inherit(EWL_WIDGET(s), EWL_SHADOW_TYPE); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_spinner.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -3 -r1.37 -r1.38 --- ewl_spinner.c 7 May 2008 13:38:25 -0000 1.37 +++ ewl_spinner.c 11 Jun 2008 23:04:45 -0000 1.38 @@ -59,7 +59,7 @@ ewl_widget_appearance_set(w, EWL_SPINNER_TYPE); ewl_widget_inherit(w, EWL_SPINNER_TYPE); - ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_HSHRINK | + ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_HSHRINKABLE | EWL_FLAG_FILL_HFILL); ewl_callback_append(w, EWL_CALLBACK_REALIZE, @@ -83,7 +83,7 @@ ewl_text_text_set(EWL_TEXT(s->entry), "0"); ewl_container_child_append(EWL_CONTAINER(s), s->entry); ewl_object_fill_policy_set(EWL_OBJECT(s->entry), EWL_FLAG_FILL_HFILL | - EWL_FLAG_FILL_HSHRINK); + EWL_FLAG_FILL_HSHRINKABLE); ewl_object_alignment_set(EWL_OBJECT(s->entry), EWL_FLAG_ALIGN_LEFT); ewl_widget_internal_set(EWL_WIDGET(s->entry), TRUE); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_statusbar.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- ewl_statusbar.c 7 May 2008 13:38:25 -0000 1.19 +++ ewl_statusbar.c 11 Jun 2008 23:04:45 -0000 1.20 @@ -49,7 +49,7 @@ } ewl_object_fill_policy_set(EWL_OBJECT(w), - EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINK); + EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINKABLE); ewl_box_orientation_set(EWL_BOX(sb), EWL_ORIENTATION_HORIZONTAL); ewl_widget_appearance_set(w, EWL_STATUSBAR_TYPE); @@ -58,7 +58,7 @@ sb->left = ewl_hbox_new(); ewl_container_child_append(EWL_CONTAINER(sb), sb->left); ewl_widget_internal_set(EWL_WIDGET(sb->left), TRUE); - ewl_object_fill_policy_set(EWL_OBJECT(sb->left), EWL_FLAG_FILL_SHRINK); + ewl_object_fill_policy_set(EWL_OBJECT(sb->left), EWL_FLAG_FILL_SHRINKABLE); ewl_widget_show(sb->left); sb->status = ewl_hbox_new(); @@ -70,7 +70,7 @@ sb->right = ewl_hbox_new(); ewl_container_child_append(EWL_CONTAINER(sb), sb->right); ewl_widget_internal_set(EWL_WIDGET(sb->right), TRUE); - ewl_object_fill_policy_set(EWL_OBJECT(sb->right), EWL_FLAG_FILL_SHRINK); + ewl_object_fill_policy_set(EWL_OBJECT(sb->right), EWL_FLAG_FILL_SHRINKABLE); ewl_object_alignment_set(EWL_OBJECT(sb->right), EWL_FLAG_ALIGN_RIGHT); ewl_widget_show(sb->right); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_table.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- ewl_table.c 7 May 2008 13:38:25 -0000 1.33 +++ ewl_table.c 11 Jun 2008 23:04:45 -0000 1.34 @@ -89,7 +89,7 @@ ewl_widget_disable(button); ewl_container_child_append(EWL_CONTAINER(cell), button); ewl_object_fill_policy_set(EWL_OBJECT(cell), - EWL_FLAG_FILL_VSHRINK | EWL_FLAG_FILL_HFILL); + EWL_FLAG_FILL_VSHRINKABLE | EWL_FLAG_FILL_HFILL); ewl_container_child_append(EWL_CONTAINER(t->grid), EWL_WIDGET(cell)); ewl_grid_child_position_set(t->grid, EWL_WIDGET(cell), =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_toolbar.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- ewl_toolbar.c 7 May 2008 13:38:25 -0000 1.11 +++ ewl_toolbar.c 11 Jun 2008 23:04:45 -0000 1.12 @@ -84,7 +84,7 @@ ewl_widget_appearance_set(w, "htoolbar"); ewl_object_fill_policy_set(EWL_OBJECT(t), EWL_FLAG_FILL_HFILL | - EWL_FLAG_FILL_SHRINK); + EWL_FLAG_FILL_SHRINKABLE); ewl_object_alignment_set(EWL_OBJECT(t), EWL_FLAG_ALIGN_LEFT | EWL_FLAG_ALIGN_TOP); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_tree.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -3 -r1.72 -r1.73 --- ewl_tree.c 7 May 2008 13:38:25 -0000 1.72 +++ ewl_tree.c 11 Jun 2008 23:04:45 -0000 1.73 @@ -768,7 +768,7 @@ /* XXX is this really a good idea to override the user's flags ? */ ewl_object_fill_policy_set(EWL_OBJECT(c), - EWL_FLAG_FILL_HSHRINK | EWL_FLAG_FILL_HFILL); + EWL_FLAG_FILL_HSHRINKABLE | EWL_FLAG_FILL_HFILL); ewl_container_child_append(box, c); ewl_widget_show(c); @@ -794,7 +794,7 @@ state_str = "default"; ewl_widget_state_set(c, state_str, EWL_STATE_PERSISTENT); - ewl_object_fill_policy_set(EWL_OBJECT(c), EWL_FLAG_FILL_SHRINK); + ewl_object_fill_policy_set(EWL_OBJECT(c), EWL_FLAG_FILL_SHRINKABLE); ewl_object_alignment_set(EWL_OBJECT(c), EWL_FLAG_ALIGN_RIGHT); ewl_widget_show(c); } @@ -1250,7 +1250,7 @@ ewl_mvc_cb_data_unref); ewl_object_fill_policy_set(EWL_OBJECT(node), - EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINK); + EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINKABLE); ewl_callback_del(EWL_WIDGET(node), EWL_CALLBACK_CONFIGURE, ewl_box_cb_configure); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_widget.c,v retrieving revision 1.164 retrieving revision 1.165 diff -u -3 -r1.164 -r1.165 --- ewl_widget.c 4 Jun 2008 20:18:27 -0000 1.164 +++ ewl_widget.c 11 Jun 2008 23:04:45 -0000 1.165 @@ -1539,13 +1539,13 @@ printf(" NONE"); else { - if (flags & EWL_FLAG_FILL_HSHRINK) + if (flags & EWL_FLAG_FILL_HSHRINKABLE) printf(" HSHRINK"); if (flags & EWL_FLAG_FILL_HFILL) printf(" HFILL"); - if (flags & EWL_FLAG_FILL_VSHRINK) + if (flags & EWL_FLAG_FILL_VSHRINKABLE) printf(" VSHRINK"); if (flags & EWL_FLAG_FILL_VFILL) ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs