mirror of
https://gitlab.com/AutumnMeowMeow/jexer
synced 2024-09-19 11:50:19 -06:00
#36 Use image scaling in example
This commit is contained in:
parent
b24414225e
commit
be528f1aa6
1 changed files with 2 additions and 6 deletions
|
@ -307,12 +307,8 @@ class ImageViewerDesktop extends TDesktop {
|
|||
imageWidget = new TImage(this, getWidth() - width,
|
||||
getHeight() - height, width, height, image, 0, 0, null);
|
||||
|
||||
// Resize the image down until it can fit within the pane.
|
||||
while ((imageWidget.getRows() > height)
|
||||
|| (imageWidget.getColumns() > width)
|
||||
) {
|
||||
imageWidget.onKeypress(new TKeypressEvent(kbAltDown));
|
||||
}
|
||||
// Resize the image to fit within the pane.
|
||||
imageWidget.setScaleType(TImage.Scale.SCALE);
|
||||
|
||||
imageWidget.setActive(false);
|
||||
activate(directoryList);
|
||||
|
|
Loading…
Reference in a new issue