aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Walther2013-02-11 13:17:49 (EST)
committerEric Moffatt2013-02-11 13:18:28 (EST)
commit5d257381db57a05fe00b8e484c53d67a78dd2a01 (patch)
treedbd82f778a1963025c1e885b8bf5596bb408f046
parentf5158dd77a576504dbf92e2c1f7884ce8d257991 (diff)
downloadeclipse.platform.ui-5d257381db57a05fe00b8e484c53d67a78dd2a01.zip
eclipse.platform.ui-5d257381db57a05fe00b8e484c53d67a78dd2a01.tar.gz
eclipse.platform.ui-5d257381db57a05fe00b8e484c53d67a78dd2a01.tar.bz2
Fix for Bug 399458 - Layout overlap in line-wrapped trim barv20130211-181828
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java
index a8c39cc..f4e0b1b 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Christian Walther (Indel AG) - Bug 399458: Fix layout overlap in line-wrapped trim bar
*******************************************************************************/
package org.eclipse.e4.ui.workbench.renderers.swt;
@@ -242,10 +243,12 @@ public class TrimBarLayout extends Layout {
int extra = curLine.extraSpace / curLine.spacerCount--;
if (horizontal) {
ctrlSize.x += extra;
- ctrl.setBounds(curX, curY, ctrlSize.x, bounds.height - 4);
+ // leave out 4 pixels at the bottom to avoid overlapping the
+ // 1px bottom border of the toolbar (bug 389941)
+ ctrl.setBounds(curX, curY, ctrlSize.x, curLine.minor - 4);
} else {
ctrlSize.y += extra;
- ctrl.setBounds(curX, curY, bounds.width, extra);
+ ctrl.setBounds(curX, curY, curLine.minor, extra);
}
zeroSize = false;
curLine.extraSpace -= extra;