Community
Participate
Working Groups
Created attachment 287478 [details] Screenshot under Windows A Button with a larger font is sized correctly on Windows but not on Mac. I assume this is a bug, both implementation should behave the same. Windows seems to be correct in its behavior. I attach the result of the snippet under Windows and Mac. package org.eclipse.swt.snippets; /* * GridLayout with large sized button * * For a list of all SWT example snippets see * http://www.eclipse.org/swt/snippets/ * */ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class Snippet379 { public static void main (String [] args) { var display = new Display (); var shell = new Shell (display); shell.setText("Snippet 379"); shell.setLayout(new GridLayout()); var c = new Composite(shell, SWT.NONE); GridLayout layout = new GridLayout(1, false); c.setLayout(layout); Button b = new Button(c, SWT.PUSH); b.setText("Button "); FontData fontData = new FontData(); fontData.height = 80; Font font = new Font(display, fontData); b.setFont(font); shell.setSize(800, 400); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } }
Created attachment 287482 [details] Screenshot under Mac
Lakshmi, can you have a look?