EA-87317 - IAE: UIUtil.createImageForGraphics
authorSergey Malenkov <sergey.malenkov@jetbrains.com>
Wed, 16 Nov 2016 09:42:43 +0000 (12:42 +0300)
committerSergey Malenkov <sergey.malenkov@jetbrains.com>
Wed, 16 Nov 2016 18:34:26 +0000 (21:34 +0300)
platform/platform-api/src/com/intellij/ui/paint/EffectPainter.java

index 80bd11388b7c7c2fdae2a1ab44af3e81d4ee7ce2..11dfdd5a777a4bbbd875854f520e0f850cebee13 100644 (file)
@@ -233,7 +233,7 @@ public enum EffectPainter implements RegionPainter<Font> {
 
       @Override
       int getPeriod(int height) {
-        return (Registry.is("ide.text.effect.new.metrics") ? height : getMaxHeight(height)) - 1;
+        return Math.max((Registry.is("ide.text.effect.new.metrics") ? height : getMaxHeight(height)) - 1, 1);
       }
 
       @Override