Skip to content

Commit f7f9efe

Browse files
committed
Revert changes to CoolItem for this PR
1 parent 61abd87 commit f7f9efe

File tree

1 file changed

+6
-10
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+6
-10
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -533,25 +533,21 @@ void setSizeInPixels (int width, int height) {
533533
height = Math.max (0, height);
534534
long hwnd = parent.handle;
535535
int cx, cyChild, cxIdeal;
536-
537-
REBARBANDINFO rbBand = new REBARBANDINFO ();
538-
rbBand.cbSize = REBARBANDINFO.sizeof;
539-
540-
/* Get the child size fields first so we don't overwrite them. */
541-
rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE;
542-
OS.SendMessage (hwnd, OS.RB_GETBANDINFO, index, rbBand);
543-
544536
if ((parent.style & SWT.VERTICAL) != 0) {
545537
cx = height;
546538
cyChild = width;
547-
rbBand.cyMaxChild = Math.max(rbBand.cyMaxChild, width);
548539
cxIdeal = Math.max (0, height - parent.getMargin (index));
549540
} else {
550541
cx = width;
551542
cyChild = height;
552-
rbBand.cyMaxChild = Math.max(rbBand.cyMaxChild, height);
553543
cxIdeal = Math.max (0, width - parent.getMargin (index));
554544
}
545+
REBARBANDINFO rbBand = new REBARBANDINFO ();
546+
rbBand.cbSize = REBARBANDINFO.sizeof;
547+
548+
/* Get the child size fields first so we don't overwrite them. */
549+
rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE;
550+
OS.SendMessage (hwnd, OS.RB_GETBANDINFO, index, rbBand);
555551

556552
/* Set the size fields we are currently modifying. */
557553
if (!ideal) rbBand.cxIdeal = cxIdeal;

0 commit comments

Comments
 (0)