diff options
author | Markus Keller | 2012-04-18 17:02:00 +0000 |
---|---|---|
committer | Markus Keller | 2012-04-18 17:02:00 +0000 |
commit | 7471537879c56f83c4621f57bb29a96e53743f50 (patch) | |
tree | 70d6185d2bac9c2e6998c982844bf841f55841ce /org.eclipse.ui.editors/src | |
parent | 266c1b8718ae1ad4a13c26f5cf0f0913250b1855 (diff) | |
download | eclipse.platform.text-7471537879c56f83c4621f57bb29a96e53743f50.tar.gz eclipse.platform.text-7471537879c56f83c4621f57bb29a96e53743f50.tar.xz eclipse.platform.text-7471537879c56f83c4621f57bb29a96e53743f50.zip |
workaround for Bug 377109: Discrepancy between StyledText#getLineHeight() and FontMetrics#getHeight()v20120418-1702
Diffstat (limited to 'org.eclipse.ui.editors/src')
-rw-r--r-- | org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java index 5de5b32d4cd..e0dee289f8d 100644 --- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java +++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2012 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 @@ -530,7 +530,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio GC gc= new GC(fText); gc.setFont(fTextFont); int width= gc.getFontMetrics().getAverageCharWidth(); - int height = gc.getFontMetrics().getHeight(); + int height= fText.getLineHeight(); gc.dispose(); return new Point (widthInChars * width, heightInChars * height); |