X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=rcp%2Forg.argeo.minidesktop%2Fsrc%2Forg%2Fargeo%2Fminidesktop%2FMiniDesktopManager.java;h=4d7c03c62c0dc614ca14539ba5c83d28b3a6e53b;hb=e87681b3f907690a2aeefd4b88de058caed7fdc4;hp=6f7b7426cb86a9d8d61936028c29687b0522f3a0;hpb=1e9566f95fc5d791b31333d8ab8188a4bf713aa2;p=gpl%2Fargeo-slc.git diff --git a/rcp/org.argeo.minidesktop/src/org/argeo/minidesktop/MiniDesktopManager.java b/rcp/org.argeo.minidesktop/src/org/argeo/minidesktop/MiniDesktopManager.java index 6f7b7426c..4d7c03c62 100644 --- a/rcp/org.argeo.minidesktop/src/org/argeo/minidesktop/MiniDesktopManager.java +++ b/rcp/org.argeo.minidesktop/src/org/argeo/minidesktop/MiniDesktopManager.java @@ -52,6 +52,10 @@ public class MiniDesktopManager { throw new IllegalStateException("Already a display " + display); display = new Display(); + if (display.getTouchEnabled()) { + System.out.println("Touch enabled."); + } + images = new MiniDesktopImages(display); int toolBarSize = 48; @@ -60,6 +64,7 @@ public class MiniDesktopManager { 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); @@ -93,10 +98,6 @@ public class MiniDesktopManager { Color selectionBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION); tabFolder.setSelectionBackground(selectionBackground); -// tabFolder.setSelectionForeground(selectionBackground); -// tabFolder.setSelectionBackground( -// new Color[] { display.getSystemColor(SWT.COLOR_WHITE), display.getSystemColor(SWT.COLOR_BLUE) }, -// new int[] { 100 }, true); // background Control background = createBackground(tabFolder); @@ -106,17 +107,15 @@ public class MiniDesktopManager { homeTabItem.setControl(background); tabFolder.setFocus(); } else { - if (isFullscreen()) - createBackground(rootShell); - else - rootShell.pack(); + createBackground(rootShell); } rootShell.open(); // rootShell.layout(true, true); if (toolBarShell != null) { - toolBarShell.setLocation(new Point(0, 0)); + int toolBarShellY = (display.getBounds().height - toolBar.getSize().y) / 2; + toolBarShell.setLocation(0, toolBarShellY); toolBarShell.open(); } } @@ -224,7 +223,8 @@ public class MiniDesktopManager { item.setControl(appParent); return new AppContext(item); } else { - Shell shell = new Shell(rootShell.getDisplay(), SWT.SHELL_TRIM); + Shell shell = isFullscreen() ? new Shell(rootShell, SWT.SHELL_TRIM) + : new Shell(rootShell.getDisplay(), SWT.SHELL_TRIM); shell.setImage(icon); return new AppContext(shell); }