Skip to content

Commit bdb507f

Browse files
committed
Scale external program icons to 16x16
GTK3 API gtk_icon_theme_lookup_by_gicon() returns 48x48 icons, despite specifying size 16x16 in the arguments. This change scales the retrieved icon to 16x16, to avoid unexpected program icon sizes. Fixes: #3003
1 parent 990d506 commit bdb507f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program

bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ public ImageData getImageData(int zoom) {
204204
}
205205
}
206206
data.alphaData = alphaData;
207+
ImageData scaled = data.scaledTo(16, 16);
208+
data = scaled;
207209
} else {
208210
PaletteData palette = new PaletteData(0xFF0000, 0xFF00, 0xFF);
209211
data = new ImageData(width, height, 24, palette, 4, srcData);

0 commit comments

Comments
 (0)