Skip to content

Commit bb37696

Browse files
committed
[GTK][HiDpi] Code cleanup for removal of non-cairo scale path.
Fixes #1300
1 parent f8cdb6a commit bb37696

File tree

1 file changed

+2
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics

1 file changed

+2
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
670670
if (ascentInPoints != -1 && descentInPoints != -1) {
671671
height = Math.max (height, ascentInPoints + descentInPoints);
672672
}
673-
height += getSpacingInPixels();
673+
height += getSpacing();
674674
int width = (flags & SWT.FULL_SELECTION) != 0 ? 0x7fff : height / 3;
675675
Cairo.cairo_rectangle(cairo, lineX, lineY, width, height);
676676
Cairo.cairo_fill(cairo);
@@ -701,7 +701,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
701701
selectionEnd = translateOffset(selectionEnd);
702702
if (selectionForeground == null) selectionForeground = device.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT);
703703
if (selectionBackground == null) selectionBackground = device.getSystemColor(SWT.COLOR_LIST_SELECTION);
704-
int yExtent = extent ? getSpacingInPixels() : 0;
704+
int yExtent = extent ? getSpacing() : 0;
705705
boolean fullSelection = selectionStart == 0 && selectionEnd == length - 1;
706706
if (fullSelection) {
707707
long ptr = OS.pango_layout_get_text(layout);

0 commit comments

Comments
 (0)