()
| 1091 | |
| 1092 | |
| 1093 | static private float parseZoom() { |
| 1094 | if (Preferences.getBoolean("editor.zoom.auto")) { |
| 1095 | float newZoom = Platform.getSystemZoom(); |
| 1096 | String percentSel = ((int) (newZoom*100)) + "%"; |
| 1097 | Preferences.set("editor.zoom", percentSel); |
| 1098 | return newZoom; |
| 1099 | |
| 1100 | } else { |
| 1101 | String zoomSel = Preferences.get("editor.zoom"); |
| 1102 | if (zoomOptions.hasValue(zoomSel)) { |
| 1103 | // shave off the % symbol at the end |
| 1104 | zoomSel = zoomSel.substring(0, zoomSel.length() - 1); |
| 1105 | return PApplet.parseInt(zoomSel, 100) / 100f; |
| 1106 | |
| 1107 | } else { |
| 1108 | Preferences.set("editor.zoom", "100%"); |
| 1109 | return 1; |
| 1110 | } |
| 1111 | } |
| 1112 | } |
| 1113 | |
| 1114 | |
| 1115 | static BasicStroke zoomStroke; |
no test coverage detected