Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_notebook2.c
Log Message:
- change the preferred size of the notebook based on it's children
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_notebook2.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_notebook2.c 3 Feb 2006 21:38:28 -0000 1.9
+++ ewl_notebook2.c 3 Feb 2006 22:27:59 -0000 1.10
@@ -123,6 +123,8 @@
void
ewl_notebook2_tabbar_position_set(Ewl_Notebook2 *n, Ewl_Position pos)
{
+ int t, pw, ph;
+
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("n", n);
DCHECK_TYPE("n", n, "notebook2");
@@ -139,6 +141,13 @@
EWL_ORIENTATION_HORIZONTAL);
ewl_box_orientation_set(EWL_BOX(n->body.tabbar),
EWL_ORIENTATION_VERTICAL);
+
+ t =
ewl_object_preferred_w_get(EWL_OBJECT(n->body.tabbar));
+ ewl_object_preferred_size_get(EWL_OBJECT(n->body.pages),
+ &pw,
&ph);
+
+ ewl_object_preferred_inner_size_set(EWL_OBJECT(n), t +
pw, ph);
+
break;
case EWL_POSITION_TOP:
case EWL_POSITION_BOTTOM:
@@ -147,6 +156,12 @@
EWL_ORIENTATION_VERTICAL);
ewl_box_orientation_set(EWL_BOX(n->body.tabbar),
EWL_ORIENTATION_HORIZONTAL);
+
+ t =
ewl_object_preferred_h_get(EWL_OBJECT(n->body.tabbar));
+ ewl_object_preferred_size_get(EWL_OBJECT(n->body.pages),
+ &pw,
&ph);
+
+ ewl_object_preferred_inner_size_set(EWL_OBJECT(n), pw,
ph + t);
break;
}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs