mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
parent
fcd88e6a43
commit
5427f94b9d
@ -1854,11 +1854,18 @@ public class Base {
|
||||
* Adjust font size
|
||||
*/
|
||||
public void handleFontSizeChange(int change) {
|
||||
String pieces[] = PApplet.split(PreferencesData.get("editor.font"), ',');
|
||||
String pieces[] = PreferencesData.get("editor.font").split(",");
|
||||
try {
|
||||
int newSize = Integer.parseInt(pieces[2]) + change;
|
||||
if (newSize < 4)
|
||||
newSize = 4;
|
||||
pieces[2] = String.valueOf(newSize);
|
||||
PreferencesData.set("editor.font", PApplet.join(pieces, ','));
|
||||
this.getEditors().forEach(processing.app.Editor::applyPreferences);
|
||||
} catch (NumberFormatException e) {
|
||||
// ignore
|
||||
return;
|
||||
}
|
||||
PreferencesData.set("editor.font", StringUtils.join(pieces, ','));
|
||||
getEditors().forEach(Editor::applyPreferences);
|
||||
}
|
||||
|
||||
// XXX: Remove this method and make librariesIndexer non-static
|
||||
|
Loading…
Reference in New Issue
Block a user