Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_menu_base.c ewl_object.c ewl_scrollbar.c ewl_scrollbar.h
ewl_scrollpane.c
Log Message:
Fix a query on object geometry, a little more progress on the scrollpane.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu_base.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_menu_base.c 23 Jun 2003 05:59:19 -0000 1.10
+++ ewl_menu_base.c 24 Jun 2003 05:09:57 -0000 1.11
@@ -104,17 +104,17 @@
ewl_widget_set_appearance(EWL_WIDGET(item), "menuitem");
ewl_object_set_fill_policy(EWL_OBJECT(item), EWL_FILL_POLICY_NONE);
- ewl_container_notify_callback(EWL_CONTAINER(item),
+ ewl_container_intercept_callback(EWL_CONTAINER(item),
EWL_CALLBACK_CLICKED);
- ewl_container_notify_callback(EWL_CONTAINER(item),
+ ewl_container_intercept_callback(EWL_CONTAINER(item),
EWL_CALLBACK_MOUSE_DOWN);
- ewl_container_notify_callback(EWL_CONTAINER(item),
+ ewl_container_intercept_callback(EWL_CONTAINER(item),
EWL_CALLBACK_MOUSE_UP);
- ewl_container_notify_callback(EWL_CONTAINER(item),
+ ewl_container_intercept_callback(EWL_CONTAINER(item),
EWL_CALLBACK_MOUSE_MOVE);
- ewl_container_notify_callback(EWL_CONTAINER(item),
+ ewl_container_intercept_callback(EWL_CONTAINER(item),
EWL_CALLBACK_SELECT);
- ewl_container_notify_callback(EWL_CONTAINER(item),
+ ewl_container_intercept_callback(EWL_CONTAINER(item),
EWL_CALLBACK_DESELECT);
/*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_object.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- ewl_object.c 9 Jun 2003 05:55:13 -0000 1.37
+++ ewl_object.c 24 Jun 2003 05:09:58 -0000 1.38
@@ -606,7 +606,7 @@
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR_RET("o", o, 0);
- if (o->flags & EWL_FILL_POLICY_HSHRINK)
+ if (o->flags & EWL_FILL_POLICY_HSHRINK || MINIMUM_W(o) > PREFERRED_W(o))
val = MINIMUM_W(o);
else
val = PREFERRED_W(o);
@@ -628,7 +628,7 @@
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR_RET("o", o, 0);
- if (o->flags & EWL_FILL_POLICY_VSHRINK)
+ if (o->flags & EWL_FILL_POLICY_VSHRINK || MINIMUM_H(o) > PREFERRED_H(o))
val = MINIMUM_H(o);
else
val = PREFERRED_H(o);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollbar.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_scrollbar.c 21 Jun 2003 22:50:13 -0000 1.18
+++ ewl_scrollbar.c 24 Jun 2003 05:09:58 -0000 1.19
@@ -266,6 +266,40 @@
}
/**
+ * ewl_scrollbar_get_step - get the current step size of the scrollbar
+ * @s: the scrollbar to retrieve step size
+ *
+ * Returns the current step size of the scrollbar.
+ */
+double
+ewl_scrollbar_get_step(Ewl_Scrollbar *s)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+
+ DCHECK_PARAM_PTR_RET("s", s, 0);
+
+ DRETURN_INT(ewl_seeker_get_step(EWL_SEEKER(s->seeker)), DLEVEL_STABLE);
+}
+
+/**
+ * ewl_scrollbar_set_step - change the step size of a scrollbar
+ * @s: the scrollbar to change step size
+ * @v: the new step size of the scrollbar
+ *
+ * Returns no value. Changes the step size of the scrollbar @s to @v.
+ */
+void ewl_scrollbar_set_step(Ewl_Scrollbar *s, double v)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+
+ DCHECK_PARAM_PTR("s", s);
+
+ ewl_seeker_set_step(EWL_SEEKER(s->seeker), v);
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
* ewl_scrollbar_set_flag - set the flag mask for a scrollbar
* @s: the scrollbar to set the flags
* @f: the flags to set for the scrollbar
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollbar.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_scrollbar.h 21 Jun 2003 22:50:13 -0000 1.6
+++ ewl_scrollbar.h 24 Jun 2003 05:09:58 -0000 1.7
@@ -28,6 +28,9 @@
double ewl_scrollbar_get_value(Ewl_Scrollbar * s);
void ewl_scrollbar_set_value(Ewl_Scrollbar * s, double v);
+double ewl_scrollbar_get_step(Ewl_Scrollbar *s);
+void ewl_scrollbar_set_step(Ewl_Scrollbar * s, double v);
+
void ewl_scrollbar_set_flag(Ewl_Scrollbar * s,
Ewl_ScrollBar_Flags f);
Ewl_ScrollBar_Flags ewl_scrollbar_get_flag(Ewl_Scrollbar * s);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollpane.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_scrollpane.c 21 Jun 2003 22:50:13 -0000 1.16
+++ ewl_scrollpane.c 24 Jun 2003 05:09:58 -0000 1.17
@@ -186,8 +186,6 @@
int hs_height = 0;
int content_w, content_h;
- /* Ewl_ScrollBar_Flags hf, vf; */
-
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("w", w);
@@ -223,8 +221,20 @@
* A rare case where we need to know the preferred size over the
* minimum size.
*/
- b_width = ewl_object_get_preferred_w(EWL_OBJECT(s->box));
- b_height = ewl_object_get_preferred_h(EWL_OBJECT(s->box));
+ b_width = ewl_object_get_preferred_w(EWL_OBJECT(s->box)) - content_w;
+ if (b_width < 0)
+ b_width = 0;
+ b_height = ewl_object_get_preferred_h(EWL_OBJECT(s->box)) - content_h;
+ if (b_height < 0)
+ b_height = 0;
+
+ /*
+ * Adjust the scrollbar internal stepping to match the contents.
+ */
+ ewl_scrollbar_set_step(EWL_SCROLLBAR(s->vscrollbar),
+ b_width / content_w);
+ ewl_scrollbar_set_step(EWL_SCROLLBAR(s->vscrollbar),
+ b_height / content_h);
b_width = (int)(ewl_scrollbar_get_value(EWL_SCROLLBAR(s->hscrollbar)) *
(double)(b_width));
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs