Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-03-10 11:34:06 +0000
committerJean Michel-Lemieux2004-03-10 11:34:06 +0000
commit695cfb4db0b2fa048f5b485c385f560f772f2828 (patch)
tree1c7383d5c65d63c3de0b10eb106d5d7fd751a6e8
parentf12a881dd38fade3de9035a29e2214d3fb9d2001 (diff)
downloadeclipse.platform.team-695cfb4db0b2fa048f5b485c385f560f772f2828.tar.gz
eclipse.platform.team-695cfb4db0b2fa048f5b485c385f560f772f2828.tar.xz
eclipse.platform.team-695cfb4db0b2fa048f5b485c385f560f772f2828.zip
Make flat look for status contributions.
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
index 06a76c05e..da68d4cf6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
@@ -13,9 +13,11 @@ package org.eclipse.team.internal.ui.synchronize.actions;
import org.eclipse.jface.action.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
public class StatusLineCLabelContribution extends ContributionItem {
@@ -27,7 +29,8 @@ public class StatusLineCLabelContribution extends ContributionItem {
private Image image;
private String text = ""; //$NON-NLS-1$
private int widthHint = -1;
-
+ private int heightHint = -1;
+
private Listener listener;
private int eventType;
private String tooltip;
@@ -43,13 +46,16 @@ public class StatusLineCLabelContribution extends ContributionItem {
}
public void fill(Composite parent) {
- label = new CLabel(parent, SWT.SHADOW_IN);
+ Label sep = new Label(parent, SWT.SEPARATOR);
+ label = new CLabel(parent, SWT.SHADOW_NONE);
StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData();
if (widthHint < 0) {
GC gc = new GC(parent);
gc.setFont(parent.getFont());
- widthHint = gc.getFontMetrics().getAverageCharWidth() * charWidth;
+ FontMetrics fm = gc.getFontMetrics();
+ widthHint = fm.getAverageCharWidth() * charWidth;
+ heightHint = fm.getHeight();
gc.dispose();
}
@@ -62,7 +68,11 @@ public class StatusLineCLabelContribution extends ContributionItem {
}
if(tooltip != null) {
label.setToolTipText(tooltip);
- }
+ }
+
+ statusLineLayoutData = new StatusLineLayoutData();
+ statusLineLayoutData.heightHint = heightHint;
+ sep.setLayoutData(statusLineLayoutData);
}
public void addListener(int eventType, Listener listener) {

Back to the top