mirror of
https://github.com/eclipse-cdt/cdt
synced 2024-10-28 03:59:40 +01:00
Fix cursor behavior in memory view on HiDPI (#645)
Cursor not behaving correctly in memory view editor while chaging variable value on Hi-DPI #641 Used GC.textExtent() method for getting width of a character as it handles zooming factor Fixes https://github.com/eclipse-cdt/cdt/issues/641
This commit is contained in:
parent
533125c6d4
commit
93c136de3c
5 changed files with 5 additions and 5 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.cdt.debug.ui.memory.floatingpoint;singleton:=true
|
||||
Bundle-Version: 1.2.0.qualifier
|
||||
Bundle-Version: 1.2.100.qualifier
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.debug.core;bundle-version="3.7.100",
|
||||
org.eclipse.debug.ui;bundle-version="3.8.1",
|
||||
|
|
|
@ -774,7 +774,7 @@ public abstract class FPAbstractPane extends Canvas {
|
|||
if (fCharacterWidth == -1) {
|
||||
GC gc = new GC(this);
|
||||
gc.setFont(fRendering.getFont());
|
||||
fCharacterWidth = gc.getAdvanceWidth('F');
|
||||
fCharacterWidth = gc.textExtent("F").x; //$NON-NLS-1$
|
||||
gc.dispose();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.cdt.debug.ui.memory.traditional;singleton:=true
|
||||
Bundle-Version: 1.7.0.qualifier
|
||||
Bundle-Version: 1.7.100.qualifier
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.debug.core,
|
||||
org.eclipse.debug.ui,
|
||||
|
|
|
@ -742,7 +742,7 @@ public abstract class AbstractPane extends Canvas {
|
|||
if (fCharacterWidth == -1) {
|
||||
GC gc = new GC(this);
|
||||
gc.setFont(fRendering.getFont());
|
||||
fCharacterWidth = gc.getAdvanceWidth('F');
|
||||
fCharacterWidth = gc.textExtent("F").x; //$NON-NLS-1$
|
||||
gc.dispose();
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class TextPane extends AbstractPane {
|
|||
protected int getCellWidth() {
|
||||
GC gc = new GC(this);
|
||||
gc.setFont(fRendering.getFont());
|
||||
int width = gc.getAdvanceWidth('F');
|
||||
int width = gc.textExtent("F").x; //$NON-NLS-1$
|
||||
gc.dispose();
|
||||
|
||||
return fRendering.getBytesPerColumn() / fRendering.getBytesPerCharacter() * width;
|
||||
|
|
Loading…
Reference in a new issue