From 260e0c284c39cd12e589cc070388563747d85c17 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Tue, 17 Apr 2018 14:53:38 +0200 Subject: [PATCH] Abbreviate Theme name to max 40 characters --- app/src/processing/app/Theme.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/Theme.java b/app/src/processing/app/Theme.java index 3f7e147e4..9367a8267 100644 --- a/app/src/processing/app/Theme.java +++ b/app/src/processing/app/Theme.java @@ -64,6 +64,7 @@ import org.apache.batik.transcoder.TranscoderInput; import org.apache.batik.transcoder.TranscoderOutput; import org.apache.batik.transcoder.image.PNGTranscoder; import org.apache.commons.compress.utils.IOUtils; +import org.apache.commons.lang3.StringUtils; import processing.app.helpers.OSUtils; import processing.app.helpers.PreferencesHelper; import processing.app.helpers.PreferencesMap; @@ -267,7 +268,8 @@ public class Theme { } public String toString() { - return String.format("%s %s (%s)", this.getName(), this.getVersion(), this.file.getName()); + String description = String.format("%s %s (%s)", this.getName(), this.getVersion(), this.file.getName()); + return StringUtils.abbreviate(description, 40); } /**