- if (isFullscreen()) {
- rootShell = new Shell(display, SWT.NO_TRIM);
- rootShell.setFullScreen(true);
- Rectangle bounds = display.getBounds();
- rootShell.setLocation(0, 0);
- rootShell.setSize(bounds.width, bounds.height);
- } else {
- rootShell = new Shell(display, SWT.CLOSE | SWT.RESIZE);
- Rectangle shellArea = rootShell.computeTrim(200, 200, 800, 480);
- rootShell.setSize(shellArea.width, shellArea.height);
- rootShell.setText(Display.getAppName());
- rootShell.setImage(images.terminalIcon);
- }
-
- rootShell.setLayout(noSpaceGridLayout(new GridLayout(2, false)));
- Composite toolBarArea = new Composite(rootShell, SWT.NONE);
- toolBarArea.setLayoutData(new GridData(toolBarSize, rootShell.getSize().y));
-
- ToolBar toolBar;
- if (isFullscreen()) {
- toolBarShell = new Shell(rootShell, SWT.NO_TRIM | SWT.ON_TOP);
- toolBar = new ToolBar(toolBarShell, SWT.VERTICAL | SWT.FLAT | SWT.BORDER);
- createDock(toolBar);
- toolBarShell.pack();
- toolBarArea.setLayoutData(new GridData(toolBar.getSize().x, toolBar.getSize().y));
- } else {
- toolBar = new ToolBar(toolBarArea, SWT.VERTICAL | SWT.FLAT | SWT.BORDER);
- createDock(toolBar);
- toolBarArea.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- }
+ ToolBar toolBar;
+ if (isFullscreen()) {
+ toolBarShell = new Shell(rootShell, SWT.NO_TRIM | SWT.ON_TOP);
+ toolBar = new ToolBar(toolBarShell, SWT.VERTICAL | SWT.FLAT | SWT.BORDER);
+ createDock(toolBar);
+ toolBarShell.pack();
+ toolBarArea.setLayoutData(new GridData(toolBar.getSize().x, toolBar.getSize().y));
+ } else {
+ toolBar = new ToolBar(toolBarArea, SWT.VERTICAL | SWT.FLAT | SWT.BORDER);
+ createDock(toolBar);
+ toolBarArea.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+ }