diff options
author | Boris Shingarov | 2002-03-16 00:25:50 +0000 |
---|---|---|
committer | Boris Shingarov | 2002-03-16 00:25:50 +0000 |
commit | 0a0d68ccc965d964425467b0f4596a46bebec755 (patch) | |
tree | e86f33187120ba3fbe1baaaddd785896d20eda03 | |
parent | 9a5b69adce33938b387850904714726e573a3c17 (diff) | |
download | eclipse.platform.swt-0a0d68ccc965d964425467b0f4596a46bebec755.tar.gz eclipse.platform.swt-0a0d68ccc965d964425467b0f4596a46bebec755.tar.xz eclipse.platform.swt-0a0d68ccc965d964425467b0f4596a46bebec755.zip |
*** empty log message ***
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/eclipsefixed.c | 45 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java | 5 |
2 files changed, 8 insertions, 42 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/eclipsefixed.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/eclipsefixed.c index 780c1bf40d..96af64270c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/eclipsefixed.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/eclipsefixed.c @@ -486,43 +486,14 @@ static void eclipse_fixed_size_request (GtkWidget *widget, GtkRequisition *requisition) { - EclipseFixed *fixed; - EclipseFixedChild *child; - GList *children; - GtkRequisition child_requisition; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_ECLIPSE_FIXED (widget)); - g_return_if_fail (requisition != NULL); - - fixed = ECLIPSE_FIXED (widget); - requisition->width = 0; - requisition->height = 0; - - children = fixed->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child->widget)) - { - int w, h; - - gtk_widget_size_request (child->widget, &child_requisition); - - w = child->width < 0 ? child_requisition.width : child->width; - h = child->height < 0 ? child_requisition.height : child->height; - - requisition->height = MAX (requisition->height, - child->y + h); - requisition->width = MAX (requisition->width, - child->x + w); - } - } - - requisition->height += GTK_CONTAINER (fixed)->border_width * 2; - requisition->width += GTK_CONTAINER (fixed)->border_width * 2; + /* Needed for determining the size of scrollbars. + * This is extremely tricky, but is actually guaranteed to work. + * It only matters to getScrollableTrim what this returns; + * In all other places, the fixed will be asked about its + * preferred minimum size, but nobody will listen to it. + */ + requisition->width = 100; + requisition->height = 100; } static void diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java index 67a929240a..802c0f3fdb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java @@ -612,11 +612,6 @@ public Shell [] getShells () { return result; } -public void layout (boolean changed) { - checkWidget(); - if (layout == null) return; - layout.layout (this, changed); -} /** * Moves the receiver to the top of the drawing order for |