X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTProgressBar.java;h=38f03373b7c8d5d08f323f0e56fa34bac1516048;hb=12b90437b5f22c2ae6e9b9b14c3b62b60f6143e5;hp=6ed5ccf752dbb8553bf7308be4165c165f6a8b43;hpb=e307b724e4e1c5d26043dd9425d13108292c5915;p=nikiroo-utils.git diff --git a/src/jexer/TProgressBar.java b/src/jexer/TProgressBar.java index 6ed5ccf..38f0337 100644 --- a/src/jexer/TProgressBar.java +++ b/src/jexer/TProgressBar.java @@ -123,6 +123,12 @@ public class TProgressBar extends TWidget { */ @Override public void draw() { + + if (getWidth() <= 2) { + // Bail out, we are too narrow to draw anything. + return; + } + CellAttributes completeColor = getTheme().getColor("tprogressbar.complete"); CellAttributes incompleteColor = getTheme().getColor("tprogressbar.incomplete");