Skip to content

Commit 89ef44e

Browse files
committed
Added Platform.getSystemDPI() API
1 parent b00185e commit 89ef44e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/src/processing/app/Theme.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static public int getScale() {
122122
return scale;
123123
} catch (NumberFormatException ignore) {
124124
}
125-
return 100;
125+
return BaseNoGui.getPlatform().getSystemDPI() * 100 / 96;
126126
}
127127

128128
static public int scale(int size) {

arduino-core/src/processing/app/Platform.java

+5
Original file line numberDiff line numberDiff line change
@@ -333,4 +333,9 @@ public void chmod(File file, int mode) throws IOException, InterruptedException
333333
public void fixSettingsLocation() throws Exception {
334334
//noop
335335
}
336+
337+
public int getSystemDPI() {
338+
return 96;
339+
}
340+
336341
}

0 commit comments

Comments
 (0)