git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Expose system colors
[fanfix.git]
/
src
/
jexer
/
TImageWindow.java
diff --git
a/src/jexer/TImageWindow.java
b/src/jexer/TImageWindow.java
index 86b0d6d62811d201b902646fe2fcd5d6ab16133d..057f6ac18f9cd707fcad9b2d2ed4d340d0bb64f3 100644
(file)
--- a/
src/jexer/TImageWindow.java
+++ b/
src/jexer/TImageWindow.java
@@
-124,7
+124,10
@@
public class TImageWindow extends TScrollableWindow {
setWidth(imageField.getColumns() + 2);
}
setWidth(imageField.getColumns() + 2);
}
- hScroller = new THScroller(this, 17, getHeight() - 2, getWidth() - 20);
+ hScroller = new THScroller(this,
+ Math.min(Math.max(0, getWidth() - 17), 17),
+ getHeight() - 2,
+ getWidth() - Math.min(Math.max(0, getWidth() - 17), 17) - 3);
vScroller = new TVScroller(this, getWidth() - 2, 0, getHeight() - 2);
setTopValue(0);
setBottomValue(imageField.getRows() - imageField.getHeight());
vScroller = new TVScroller(this, getWidth() - 2, 0, getHeight() - 2);
setTopValue(0);
setBottomValue(imageField.getRows() - imageField.getHeight());