Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 116251 Details for
Bug 237503
task editor does not allow comment text to flow to fill available space
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
optimizations
clipboard.txt (text/plain), 2.54 KB, created by
Steffen Pingel
on 2008-10-28 00:16:38 EDT
(
hide
)
Description:
optimizations
Filename:
MIME Type:
Creator:
Steffen Pingel
Created:
2008-10-28 00:16:38 EDT
Size:
2.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/FillWidthLayout.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/FillWidthLayout.java,v >retrieving revision 1.1 >diff -u -r1.1 FillWidthLayout.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/FillWidthLayout.java 1 Oct 2008 06:06:48 -0000 1.1 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/FillWidthLayout.java 28 Oct 2008 04:16:06 -0000 >@@ -42,10 +42,14 @@ > > private final int marginBottom; > >- private int widthHintMargin = 15; >+ private int widthHintMargin; > > private Composite layoutAdvisor; > >+ private int lastWidthHint; >+ >+ private Point lastComputedSize; >+ > /** > * create with 0 margins > * >@@ -94,8 +98,9 @@ > if (Platform.OS_MACOSX.equals(Platform.getOS())) { > widthHintMargin = 15; > } else { >- widthHintMargin = 25; >+ widthHintMargin = 20; > } >+ this.lastWidthHint = -1; > } > > /** >@@ -143,10 +148,10 @@ > > @Override > protected Point computeSize(Composite composite, int widthHint, int heightHint, boolean flushCache) { >- int resultX = 1; >- int resultY = 1; >- > Control[] children = composite.getChildren(); >+ if (children.length == 0) { >+ return new Point(0, 0); >+ } > > if (widthHint <= 0) { > widthHint = calculateWidthHint(composite); >@@ -157,21 +162,25 @@ > } > } > >- int horizontalMargin = marginLeft + marginRight; >- >- for (Control control : children) { >- Point sz = control.computeSize(widthHint - horizontalMargin, -1, flushCache); >+ if (lastComputedSize == null || widthHint != lastWidthHint) { >+ int horizontalMargin = marginLeft + marginRight; >+ int resultX = 1; >+ int resultY = 1; >+ for (Control control : children) { >+ Point sz = control.computeSize(widthHint - horizontalMargin, -1, flushCache); >+ resultX = Math.max(resultX, sz.x); >+ resultY = Math.max(resultY, sz.y); >+ } > >- resultX = Math.max(resultX, sz.x); >- resultY = Math.max(resultY, sz.y); >+ lastWidthHint = widthHint; >+ lastComputedSize = new Point(resultX + horizontalMargin, resultY + marginTop + marginBottom); > } > >- return new Point(resultX + horizontalMargin, resultY + marginTop + marginBottom); >+ return new Point(lastComputedSize.x, lastComputedSize.y); > } > > @Override > protected void layout(Composite composite, boolean flushCache) { >- > Rectangle area = composite.getClientArea(); > if (area.width == 0) { > area.width = calculateWidthHint(composite);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 237503
:
105187
|
105303
|
105304
|
105305
|
105557
|
105660
|
105661
|
105668
|
105673
|
105675
|
105676
|
105771
|
106983
|
106984
|
107152
|
107213
|
110406
|
110407
|
113955
|
113956
| 116251 |
116309