diff options
author | Lars Vogel | 2019-12-05 21:06:54 +0000 |
---|---|---|
committer | Lars Vogel | 2019-12-10 17:44:49 +0000 |
commit | 4300a4e04ab57ecf5b2cf8f829726c5918645108 (patch) | |
tree | 6ef7c2d7d83603b388b9fd16be80119c081c08e2 | |
parent | 2be749e9206ed8ad2128046a9e872397d179e5a1 (diff) | |
download | eclipse.platform.ua-4300a4e04ab57ecf5b2cf8f829726c5918645108.tar.gz eclipse.platform.ua-4300a4e04ab57ecf5b2cf8f829726c5918645108.tar.xz eclipse.platform.ua-4300a4e04ab57ecf5b2cf8f829726c5918645108.zip |
Bug 446171 - [Intro] Remove usage of isPlain() method in IntroLaunchBar
Change-Id: I0ed8f528ef31e0e6eec3529174c41031ee333709
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java index f8b19938e..9083b5e6c 100644 --- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java +++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/presentations/IntroLaunchBar.java @@ -137,8 +137,8 @@ public class IntroLaunchBar { @Override protected Point computeSize(Composite composite, int wHint, int hHint, boolean changed) { boolean vertical = (getOrientation() & SWT.VERTICAL) != 0; - int marginWidth = vertical | isPlain() ? 1 : simple ? 3 : 7; - int marginHeight = !vertical | isPlain() ? 1 : simple ? 3 : 7; + int marginWidth = vertical ? 1 : simple ? 3 : 7; + int marginHeight = !vertical ? 1 : simple ? 3 : 7; int width = 0; int height = 0; @@ -164,8 +164,8 @@ public class IntroLaunchBar { @Override protected void layout(Composite composite, boolean changed) { boolean vertical = (getOrientation() & SWT.VERTICAL) != 0; - int marginWidth = vertical | isPlain() ? 1 : simple ? 4 : 7; - int marginHeight = !vertical | isPlain() ? 1 : simple ? 4 : 7; + int marginWidth = vertical ? 1 : simple ? 4 : 7; + int marginHeight = !vertical ? 1 : simple ? 4 : 7; Point tsize = toolBarManager.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT, changed); Rectangle carea = composite.getClientArea(); @@ -299,15 +299,6 @@ public class IntroLaunchBar { settings.put(S_STORED_LOCATION, toSWT(getLocation())); } - /** - * Not supported anymore as of the removal of the presentation API - * TODO remove usage, see Bug 446171 - * - * @return - */ - protected boolean isPlain() { - return true; - } public void createControl(Composite parent) { container = new Composite(parent, SWT.NULL); @@ -367,25 +358,9 @@ public class IntroLaunchBar { gc.setForeground(color); if (bg != null) gc.setBackground(bg); - if (isPlain()) { - Point size = container.getSize(); - gc.fillRectangle(0, 0, size.x, size.y); - gc.drawRectangle(0, 0, size.x - 1, size.y - 1); - } else { - switch (getLocation()) { - case LEFT: - paintLeft(gc); - break; - case RIGHT: - paintRight(gc); - break; - case BOTTOM: - paintBottom(gc); - break; - case TOP: - break; - } - } + Point size = container.getSize(); + gc.fillRectangle(0, 0, size.x, size.y); + gc.drawRectangle(0, 0, size.x - 1, size.y - 1); } private void paintLeft(GC gc) { |