git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
07d4259
)
JAL-3833 Allow setHiDPI and setHiDPIScale to work more usefully in real life
author
Ben Soares
<b.soares@dundee.ac.uk>
Thu, 22 Apr 2021 14:20:41 +0000
(15:20 +0100)
committer
Ben Soares
<b.soares@dundee.ac.uk>
Thu, 22 Apr 2021 14:20:41 +0000
(15:20 +0100)
src/jalview/bin/HiDPISetting.java
patch
|
blob
|
history
diff --git
a/src/jalview/bin/HiDPISetting.java
b/src/jalview/bin/HiDPISetting.java
index
7a22607
..
38b7587
100644
(file)
--- a/
src/jalview/bin/HiDPISetting.java
+++ b/
src/jalview/bin/HiDPISetting.java
@@
-68,8
+68,17
@@
public class HiDPISetting
// get and use command line property values first
String setHiDPIProperty = System.getProperty(setHiDPIPropertyName);
// get and use command line property values first
String setHiDPIProperty = System.getProperty(setHiDPIPropertyName);
- setHiDPI = setHiDPIProperty != null
- && setHiDPIProperty.equalsIgnoreCase("true");
+ boolean setHiDPIPropertyBool = Boolean.parseBoolean(setHiDPIProperty);
+
+ // allow -DsetHiDPI=false to turn off HiDPI scaling
+ if (setHiDPIProperty != null && !setHiDPIPropertyBool)
+ {
+ clear();
+ doneInit = true;
+ return;
+ }
+
+ setHiDPI = setHiDPIProperty != null && setHiDPIPropertyBool;
String setHiDPIScaleProperty = System
.getProperty(setHiDPIScalePropertyName);
String setHiDPIScaleProperty = System
.getProperty(setHiDPIScalePropertyName);
@@
-78,6
+87,12
@@
public class HiDPISetting
try
{
setHiDPIScale = Integer.parseInt(setHiDPIScaleProperty);
try
{
setHiDPIScale = Integer.parseInt(setHiDPIScaleProperty);
+ // if setHiDPIScale property is validly set and setHiDPI property wasn't
+ // attempted to be set we assume setHiDPIScale to be true
+ if (setHiDPIProperty == null)
+ {
+ setHiDPI = true;
+ }
} catch (NumberFormatException e)
{
System.err.println(setHiDPIScalePropertyName + " property give ("
} catch (NumberFormatException e)
{
System.err.println(setHiDPIScalePropertyName + " property give ("