org.eclipse.swt.internal.DPIUtil Java Examples
The following examples show how to use
org.eclipse.swt.internal.DPIUtil.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RoundedCheckbox.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** * @see org.eclipse.swt.widgets.Control#computeSize(int, int, boolean) */ @Override public Point computeSize(int wHint, int hHint, boolean changed) { wHint = wHint != SWT.DEFAULT ? DPIUtil.autoScaleUp(wHint) : wHint; hHint = hHint != SWT.DEFAULT ? DPIUtil.autoScaleUp(hHint) : hHint; return DPIUtil.autoScaleDown(computeSizePixels(wHint, hHint, changed)); }
Example #2
Source File: Utils.java From BiglyBT with GNU General Public License v2.0 | 5 votes |
public static int getDeviceZoom() { if ( hasDPIUtils ) { return( DPIUtil.getDeviceZoom()); } return( 100 ); }