Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_box.c ewl_seeker.c ewl_scrollbar.c
Log Message:
Fixup some theme naming inconsistencies and improve theme flexibility in a few
of the widgets.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_box.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- ewl_box.c 29 Jan 2003 16:56:53 -0000 1.42
+++ ewl_box.c 13 Feb 2003 06:54:17 -0000 1.43
@@ -19,15 +19,15 @@
* Function pointers for getting the dimension of the widget that we
* care about.
*/
- int (*pref_fill_ask) (Ewl_Object * ob);
- void (*pref_fill_set) (Ewl_Object * ob, int size);
- int (*fill_ask) (Ewl_Object * ob);
- void (*fill_set) (Ewl_Object * ob, int size);
-
- int (*pref_align_ask) (Ewl_Object * ob);
- void (*pref_align_set) (Ewl_Object * ob, int size);
- int (*align_ask) (Ewl_Object * ob);
- void (*align_set) (Ewl_Object * ob, int size);
+ unsigned int (*pref_fill_ask) (Ewl_Object * ob);
+ void (*pref_fill_set) (Ewl_Object * ob, unsigned int size);
+ unsigned int (*fill_ask) (Ewl_Object * ob);
+ void (*fill_set) (Ewl_Object * ob, unsigned int size);
+
+ unsigned int (*pref_align_ask) (Ewl_Object * ob);
+ void (*pref_align_set) (Ewl_Object * ob, unsigned int size);
+ unsigned int (*align_ask) (Ewl_Object * ob);
+ void (*align_set) (Ewl_Object * ob, unsigned int size);
} Box_Orientation;
@@ -113,8 +113,12 @@
/*
* Initialize the container portion of the box
*/
- ewl_container_init(EWL_CONTAINER(b), "box", __ewl_box_add,
- __ewl_box_child_resize);
+ if (o == EWL_ORIENTATION_HORIZONTAL)
+ ewl_container_init(EWL_CONTAINER(b), "hbox", __ewl_box_add,
+ __ewl_box_child_resize);
+ else
+ ewl_container_init(EWL_CONTAINER(b), "vbox", __ewl_box_add,
+ __ewl_box_child_resize);
ewl_callback_prepend(w, EWL_CALLBACK_CONFIGURE, __ewl_box_configure,
NULL);
@@ -161,6 +165,10 @@
DRETURN(DLEVEL_STABLE);
b->orientation = o;
+ if (o == EWL_ORIENTATION_HORIZONTAL)
+ ewl_widget_set_appearance(w, "hbox");
+ else
+ ewl_widget_set_appearance(w, "vbox");
ewl_widget_configure(w);
@@ -469,8 +477,6 @@
* Move to the next position for the child.
*/
*fill += info->fill_ask(child) + b->spacing;
-
- ewl_widget_configure(EWL_WIDGET(child));
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_seeker.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- ewl_seeker.c 14 Jan 2003 21:45:04 -0000 1.31
+++ ewl_seeker.c 13 Feb 2003 06:54:17 -0000 1.32
@@ -74,16 +74,22 @@
* type
*/
if (orientation == EWL_ORIENTATION_HORIZONTAL) {
- ewl_container_init(EWL_CONTAINER(w), "/seeker/horizontal",
+ ewl_container_init(EWL_CONTAINER(w), "hseeker",
NULL, NULL);
- ewl_object_set_custom_h(EWL_OBJECT(w), 16);
ewl_object_set_preferred_h(EWL_OBJECT(w), 16);
+
+ ewl_object_set_fill_policy(EWL_OBJECT(w),
+ EWL_FILL_POLICY_HFILL |
+ EWL_FILL_POLICY_HSHRINK);
}
else {
ewl_container_init(EWL_CONTAINER(w),
- "/seeker/vertical", NULL, NULL);
- ewl_object_set_custom_w(EWL_OBJECT(w), 16);
+ "vseeker", NULL, NULL);
ewl_object_set_preferred_w(EWL_OBJECT(w), 16);
+
+ ewl_object_set_fill_policy(EWL_OBJECT(w),
+ EWL_FILL_POLICY_VFILL |
+ EWL_FILL_POLICY_VSHRINK);
}
/*
@@ -91,18 +97,6 @@
*/
s->dragbar = ewl_button_new(NULL);
ewl_container_append_child(EWL_CONTAINER(s), s->dragbar);
-
- /*
- * Override the buttons default appearance
- */
- if (orientation == EWL_ORIENTATION_HORIZONTAL)
- ewl_widget_set_appearance(s->dragbar,
- "/seeker/horizontal/dragbar");
- else
- ewl_widget_set_appearance(s->dragbar,
- "/seeker/vertical/dragbar");
-
- ewl_object_set_fill_policy(EWL_OBJECT(w), EWL_FILL_POLICY_FILL);
/*
* Set the starting orientation, range and values
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollbar.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_scrollbar.c 14 Aug 2002 02:05:36 -0000 1.12
+++ ewl_scrollbar.c 13 Feb 2003 06:54:17 -0000 1.13
@@ -122,26 +122,22 @@
ewl_seeker_set_step(EWL_SEEKER(s->seeker), 0.05);
/*
+ * Set the appearance strings for the parts of the scrollbar
+ */
+ ewl_widget_set_appearance(s->button_decrement, "button_increment");
+ ewl_widget_set_appearance(s->button_increment, "button_decrement");
+
+ /*
* Setup a few orientation specific variables, such as appearance and
* packing order.
*/
if (orientation == EWL_ORIENTATION_HORIZONTAL) {
/*
- * Set the appearance strings for the parts of the scrollbar
- */
- ewl_widget_set_appearance(s->button_decrement,
- "/scrollbar/horizontal/button_increment");
- ewl_widget_set_appearance(s->seeker,
- "/scrollbar/horizontal");
- ewl_widget_set_appearance(s->button_increment,
- "/scrollbar/horizontal/button_decrement");
-
- /*
* Set the alignment of the buttons to the seeker.
*/
s->buttons_alignment = ewl_theme_data_get_int(EWL_WIDGET(s),
-
"/scrollbar/horizontal/button_order");
+
+"/hscrollbar/button_order");
if (s->buttons_alignment & EWL_ALIGNMENT_LEFT) {
@@ -182,20 +178,10 @@
} else {
/*
- * Set the appearances for the parts of the scrollbar.
- */
- ewl_widget_set_appearance(s->button_decrement,
- "/scrollbar/vertical/button_increment");
- ewl_widget_set_appearance(s->seeker,
- "/scrollbar/vertical");
- ewl_widget_set_appearance(s->button_increment,
- "/scrollbar/vertical/button_decrement");
-
- /*
* Set the alignment of the buttons to the seeker.
*/
s->buttons_alignment = ewl_theme_data_get_int(EWL_WIDGET(s),
-
"/scrollbar/vertical/button_order");
+
+"/vscrollbar/button_order");
if (s->buttons_alignment & EWL_ALIGNMENT_TOP) {
@@ -467,8 +453,6 @@
* Request the new size for the dragbar.
*/
ewl_object_request_size(EWL_OBJECT(se->dragbar), req_w, req_h);
-
- ewl_widget_configure(se->dragbar);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs