Skip to content

Commit eb573ba

Browse files
author
jossonsmith
committed
Fixed a bug that SashForm.z.js is registered in the wrong location.
Fixed a bug that the Sash's bounds, attaching to the selection event when dragging, is wrong
1 parent 26b7e18 commit eb573ba

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/package.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ if (!isDebugging) {
9898
"$.Table",
9999
"$wt.internal.dnd.TableColumnDND"
100100
]);
101-
ClazzLoader.jarClasspath (wPath + "SashForm.z.js", [
101+
102+
var cPath = ClazzLoader.getClasspathFor ("org.eclipse.swt.custom.*");
103+
ClazzLoader.jarClasspath (cPath + "SashForm.z.js", [
102104
"$wt.internal.dnd.SashDND",
103105
w + "Sash",
104106
"$wt.custom.SashFormData",
105107
"$.SashFormLayout",
106108
"$.SashForm"
107109
]);
108-
109-
var cPath = ClazzLoader.getClasspathFor ("org.eclipse.swt.custom.*");
110110
var c = "$wt.custom.";
111111
ClazzLoader.jarClasspath (cPath + "CBanner.z.js", [
112112
c + "CBannerLayout",
@@ -193,4 +193,4 @@ if (!isDebugging) {
193193

194194

195195
/* private */
196-
window["org.eclipse.swt.registered"] = true;
196+
window["org.eclipse.swt.registered"] = true;

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/Sash.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ public boolean dragEnded(DragEvent e) {
186186
event.y = lastY; //e.currentY; //Integer.parseInt(thumb.style.top); //lastY;
187187
Point size = getSize();
188188
int delta = 0;
189-
if ((style & SWT.BORDER) != 0) {
190-
delta = 6;
191-
}
189+
// if ((style & SWT.BORDER) != 0) {
190+
// delta = 6;
191+
// }
192192
int width = size.x + delta;
193193
if (width < 2) {
194194
width = 2;
@@ -231,9 +231,9 @@ public boolean dragging(DragEvent e) {
231231
}
232232
Point size = getSize();
233233
int delta = 0;
234-
if ((style & SWT.BORDER) != 0) {
235-
delta = 6;
236-
}
234+
// if ((style & SWT.BORDER) != 0) {
235+
// delta = 4;
236+
// }
237237
int width = size.x + delta;
238238
if (width < 2) {
239239
width = 2;

0 commit comments

Comments
 (0)