diff --git a/EngineDriver/src/main/java/jmri/enginedriver/threaded_application.java b/EngineDriver/src/main/java/jmri/enginedriver/threaded_application.java index 0faa9b90d..969a3c246 100644 --- a/EngineDriver/src/main/java/jmri/enginedriver/threaded_application.java +++ b/EngineDriver/src/main/java/jmri/enginedriver/threaded_application.java @@ -987,6 +987,7 @@ public String getServerDescription() { public void setServerDescription(String serverDescription) { this.serverDescription = serverDescription; } + @SuppressLint("DefaultLocale") public String getAboutInfo() { String s = ""; diff --git a/EngineDriver/src/main/java/jmri/enginedriver/throttle.java b/EngineDriver/src/main/java/jmri/enginedriver/throttle.java index dc54ec36b..13f18367b 100644 --- a/EngineDriver/src/main/java/jmri/enginedriver/throttle.java +++ b/EngineDriver/src/main/java/jmri/enginedriver/throttle.java @@ -6413,14 +6413,19 @@ void set_function_labels_and_listeners_for_view(int whichThrottle) { b.setText(bt); b.setVisibility(View.VISIBLE); // if there is a long first word or the total length is long, reduce the font size - if ((bt.indexOf(" ")>8) || (bt.length()>16)) { - b.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14); - if ((bt.indexOf(" ")>10) || (bt.length()>20)) { - b.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); - if ((bt.indexOf(" ")>12) || (bt.length()>24)) { - b.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10); + if (((bt + " ").indexOf(" ")>8) || (bt.length()>15)) { + b.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16); + if (((bt + " ").indexOf(" ")>10) || (bt.length()>18)) { + b.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14); + if (((bt + " ").indexOf(" ")>12) || (bt.length()>21)) { + b.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); + if (((bt + " ").indexOf(" ")>14) || (bt.length()>24)) { + b.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10); + } } } + } else { + b.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18); } b.setEnabled(false); // start out with everything disabled } else {