Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_scrollpane.c ewl_scrollpane.h
Log Message:
Some work towards a cleaner looking scrollpane.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollpane.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- ewl_scrollpane.c 24 Mar 2004 16:24:34 -0000 1.33
+++ ewl_scrollpane.c 6 Apr 2004 04:28:44 -0000 1.34
@@ -46,13 +46,15 @@
ewl_object_set_fill_policy(EWL_OBJECT(s), EWL_FLAG_FILL_FILL |
EWL_FLAG_FILL_SHRINK);
+ s->overlay = ewl_overlay_new();
+ ewl_object_set_fill_policy(EWL_OBJECT(s->overlay), EWL_FLAG_FILL_ALL);
+
/*
* Create the container to hold the contents and it's configure
* callback to position it's child.
*/
s->box = ewl_vbox_new();
- ewl_object_set_fill_policy(EWL_OBJECT(s->box), EWL_FLAG_FILL_SHRINK |
- EWL_FLAG_FILL_FILL);
+ ewl_object_set_fill_policy(EWL_OBJECT(s->box), EWL_FLAG_FILL_NONE);
/*
* Create the scrollbars for the scrollpane.
@@ -63,14 +65,17 @@
/*
* Add the parts to the scrollpane
*/
- ewl_container_append_child(EWL_CONTAINER(s), s->box);
+ ewl_container_append_child(EWL_CONTAINER(s), s->overlay);
+ ewl_container_append_child(EWL_CONTAINER(s->overlay), s->box);
ewl_container_append_child(EWL_CONTAINER(s), s->hscrollbar);
ewl_container_append_child(EWL_CONTAINER(s), s->vscrollbar);
+ ewl_widget_set_internal(s->overlay, TRUE);
ewl_widget_set_internal(s->box, TRUE);
ewl_widget_set_internal(s->hscrollbar, TRUE);
ewl_widget_set_internal(s->vscrollbar, TRUE);
+ ewl_widget_show(s->overlay);
ewl_widget_show(s->box);
ewl_widget_show(s->hscrollbar);
ewl_widget_show(s->vscrollbar);
@@ -340,6 +345,9 @@
* Now move the box into position. For the scrollpane to work we move
* the box relative to the scroll value.
*/
+ ewl_object_request_geometry(EWL_OBJECT(s->overlay),
+ CURRENT_X(w), CURRENT_Y(w),
+ content_w, content_h);
ewl_object_request_geometry(EWL_OBJECT(s->box),
CURRENT_X(w) - b_width,
CURRENT_Y(w) - b_height,
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollpane.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_scrollpane.h 24 Mar 2004 16:24:34 -0000 1.12
+++ ewl_scrollpane.h 6 Apr 2004 04:28:44 -0000 1.13
@@ -35,7 +35,8 @@
{
Ewl_Container container; /**< Inherit from Ewl_Container */
- Ewl_Widget *box; /**< The area displaying the enclosed widget */
+ Ewl_Widget *overlay; /**< The area displaying the enclosed widget */
+ Ewl_Widget *box; /**< The area laying out enclosed widget */
Ewl_Widget *hscrollbar; /**< Horizontal scrollbar */
Ewl_Widget *vscrollbar; /**< Vertical scrollbar */
};
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs