Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,14 @@ public void testButtonPointsAfterZooming() throws NoSuchMethodException, Illegal
int scaledZoom = zoom * 2;

shell.setBounds(0, 0, 100, 160);
shell.setLayout(new FillLayout());
shell.pack();

Button button = new Button(shell, SWT.PUSH);
button.setText("Button");
button.setBounds(0, 0, 100, 200);
Point sizeBeforeEvent = button.getSize();
Point p1 = button.computeSizeInPixels(sizeBeforeEvent.x, sizeBeforeEvent.y, false);
Point p1 = button.getSize();

DPITestUtil.changeDPIZoom(shell, scaledZoom);
Point sizeAfterEvent = button.getSize();
Point p2 = button.computeSizeInPixels(sizeAfterEvent.x, sizeAfterEvent.y, false);
Point p2 = button.getSize();

assertEquals("Width should be half in points after zooming to 200", p1.x / 2 , p2.x);
assertEquals("Height should be half in points after zooming to 200", p1.y / 2, p2.y);
Expand Down Expand Up @@ -134,8 +131,6 @@ public void testCoolItemAfterZooming() {


shell.setBounds(0, 0, 100, 160);
shell.setLayout(new FillLayout());
shell.pack();

CoolBar coolBar = new CoolBar(shell, SWT.NONE);
CoolItem item1 = new CoolItem(coolBar, SWT.NONE);
Expand Down Expand Up @@ -200,8 +195,6 @@ public void testTabFolderSizeAfterZooming() {
int scaledZoom = zoom * 2;

shell.setBounds(0, 0, 100, 160);
shell.setLayout(new FillLayout());
shell.pack();

TabFolder tabFolder = new TabFolder(shell, SWT.NONE);
tabFolder.setBounds(20, 20, 360, 240);
Expand Down
Loading